Commit 757199d3 by wangren
parents d2301b9e eb8a4e88
import Utils from "~/utils"
/**
* NOtice的Check规则
*
*/
let checkObj = {
"tid" :null,
"theme" :null,
"unit" :null,
"pubname" :null,
"dat" :null,
"content" :null,
"visunit" :null,
}
for (const key in checkObj) {
if (Object.hasOwnProperty.call(checkObj, key)) {
checkObj[key] = checkObj[key] ? checkObj[key] : Utils.reflectCheck(key)
}
}
export default checkObj
\ No newline at end of file
/**
* Notice Default规则
*/
import Api from "~/service/Api";
import Utils from "~/utils/index"
export default {
"tid" :Utils.defaultFunction,
"theme" :Utils.defaultFunction,
"unit" :Utils.defaultFunction,
"pubname" :Utils.defaultFunction,
"dat" :Utils.defaultFunction,
"content" :Utils.defaultFunction,
"visunit": Utils.defaultFunction,
}
\ No newline at end of file
import Api from "~/service/Api"
import Utils from "~/utils"
export default {
async onTheme(){
let rtnmsg = await this.executeRule("theme")
if(rtnmsg.respCode == SUCCESS)
{
//TODO 处理数据逻辑
}
else
{
this.$notify.error({title: '错误',message: '服务请求失败!'});
}
},
async onUnit(){
let rtnmsg = await this.executeRule( "unit")
if(rtnmsg.respCode == SUCCESS)
{
//TODO 处理数据逻辑
}
else
{
this.$notify.error({title: '错误',message: '服务请求失败!'});
}
},
async onPubname(){
let rtnmsg = await this.executeRule("pubname")
if(rtnmsg.respCode == SUCCESS)
{
//TODO 处理数据逻辑
}
else
{
this.$notify.error({title: '错误',message: '服务请求失败!'});
}
},
async onDat(){
let rtnmsg = await this.executeRule("dat")
if(rtnmsg.respCode == SUCCESS)
{
//TODO 处理数据逻辑
}
else
{
this.$notify.error({title: '错误',message: '服务请求失败!'});
}
},
async onContent(){
let rtnmsg = await this.executeRule("content")
if(rtnmsg.respCode == SUCCESS)
{
//TODO 处理数据逻辑
}
else
{
this.$notify.error({title: '错误',message: '服务请求失败!'});
}
},
}
\ No newline at end of file
export default{
"tid":[
{type: "int", required: false, message: "必输项"},
{max: 20,message:"长度不能超过20"}
],
"theme":[
{type: "string", required: false, message: "必输项"},
{max: 20,message:"长度不能超过20"}
],
"unit":[
{type: "string", required: false, message: "必输项"},
{max: 20,message:"长度不能超过20"}
],
"pubname":[
{type: "string", required: false, message: "必输项"},
{max: 20,message:"长度不能超过20"}
],
"dat":[
{type: "date", required: false, message: "输入正确的日期"},
],
"content":[
{type: "string", required: false, message: "必输项"},
{max: 2000,message:"长度不能超过2000"}
],
"visunit":[
{type: "string", required: false, message: "必输项"},
{max: 2000,message:"长度不能超过10"}
],
}
\ No newline at end of file
import Api from "~/service/Api"
import Pts from "../Common/Pts"
export default class Notice{
constructor(){
this.data={
tid:"",
theme:"", // 公告的标题
unit:"", // 发布机构
pubname:"", // 发布人
dat:"", // 发布时间
content:"", // 公告内容
visunit:"", //可见范围
edit:{
tid:"",
theme:"", // 公告的标题
unit:"", // 发布机构
pubname:"", // 发布人
dat:"", // 发布时间
content:"", // 公告内容
visunit:"", //可见范围
},
}
}
}
\ No newline at end of file
import Api from "~/service/Api"
export function my(data) {
return Api.post("/notice/task/my", data)
}
\ No newline at end of file
......@@ -125,6 +125,8 @@ import Letnot from "./Letnot"
import Ditdav from "./Ditdav"
import Infpty from "./Infpty"
import Dbipty from "./Dbipty"
import Notice from "./Notice"
/**
* 带有name的才会被添加进顶部的标签页里
*/
......@@ -264,6 +266,6 @@ const BusRouter = [
{ path: 'getset', component: Getset, name: 'Getset', meta: { title: 'Getset' } },
{ path: 'getsel', component: Getsel, name: 'Getsel', meta: { title: 'Getsel' } },
{ path: 'getcrq', component: Getcrq, name: 'Getcrq', meta: { title: 'Getcrq' } },
{ path: 'notice', component: Notice, name: 'Notice', meta: { title: '通知公告设置' } },
]
export default BusRouter
<template>
<div >
sdjcsvvhebn
</div>
</template>
<script>
export default {
name:"Display",
data(){
return{
}
},
// created(){
// console.log(id_2);
// }
}
</script>
<style>
</style>
\ No newline at end of file
<template >
<div class="eibs-tab">
<c-row>
<c-col :span="24">
<el-form label-width="80px">
<el-form-item label="标题:" >
<c-input
v-model="theme"
maxlength="20"
placeholder="请输入标题内容"
></c-input>
</el-form-item>
<el-form-item label="发布机构:" >
<c-input
v-model="unit"
maxlength="16"
placeholder="请输入机构名称"
></c-input>
</el-form-item>
<el-form-item label="发布人:" >
<c-input
v-model="pubname"
maxlength="10"
placeholder="请输入发布人名"
></c-input>
</el-form-item>
<el-form-item label="发布时间:" >
<c-date-picker
type="date"
v-model="dat"
value-format="yyyy-MM-dd"
placeholder="请选择时间"
>
</c-date-picker>
</el-form-item>
<el-form-item >
<c-input
v-model="content"
type="textarea"
rows ="20"
maxlength="1000"
show-word-limit
placeholder="请输入公告内容" >
</c-input>
</el-form-item>
<el-form-item>
<c-button size="small" type="primary" >
添加附件
</c-button>
<c-button size="small" type="primary" >
发布
</c-button>
</el-form-item>
</el-form>
</c-col>
</c-row>
</div>
</template>
<script>
import Api from "~/service/Api";
import commonProcess from "~/mixin/commonProcess";
import CodeTable from "~/config/CodeTable";
import Event from "~/model/Notice/Event";
// import commonFuncs from "~/mixin/commonFuncs";
export default {
prop: ["model"],
mixins: [commonProcess],
data(){
return {
theme:"",
unit:"",
pubname:"",
dat:"",
content:"",
}
},
methods: {
...Event,
},
created: function() {
}
};
</script>
<style>
</style>
\ No newline at end of file
<template>
<div class="eibs-tab">
<c-col :span="24">
<el-table
:border="true"
:data="itemList"
style="width:80%,text-align:center"
>
<el-table-column label="编号" prop="tid" width="200px" >
</el-table-column>
<el-table-column label="标题" prop="theme" width="400px" >
</el-table-column>
<el-table-column label="发布机构" prop="unit" width="200px" >
</el-table-column>
<el-table-column label="时间" prop="dat" width="200px " >
</el-table-column>
<el-table-column label="操作" width="200px" fixed="right">
<template slot-scope="scope">
<c-button type="primary" size="small" @click="handleEdit(scope.$index, scope.row)" >
修改</c-button>
<c-button type="danger" size="small" @click="handleDelete(scope.$index, scope.row)" >
删除</c-button>
</template>
</el-table-column>
</el-table>
</c-col>
<!-- <table border="1">
<tr>
<th>主题</th>
<th>发布机构</th>
<th>发布人</th>
</tr>
<tr v-for="notice in itemList" :key="notice.tid">
<td>{{notice.theme}}</td>
<td>{{notice.unit}}</td>
<td>{{notice.pubname}}</td>
</tr>
</table> -->
</div>
</template>
<script>
import Api from "~/service/Api";
import commonProcess from "~/mixin/commonProcess";
import CodeTable from "~/config/CodeTable";
import Utils from "~/utils/index";
import Event from "~/model/Notice/Event";
import { my } from "~/service/notice";
export default {
inject: ["root"],
// props: ["model", "codes"],
mixins: [commonProcess],
data(){
return {
itemList:[
{}
],
}
},
methods:{
handleEdit(index, row) {
console.log(index, row);
},
handleDelete(index, row) {
console.log(index, row);
},
// ...Event,
getList(){
my().then(res => {
// console.log(res);
this.itemList=res
console.log(this.itemList);
})
}
},
created(){
this.getList();
},
// mounted(){
// }
}
</script>
<style>
</style>
\ No newline at end of file
<template>
<c-page title="通知公告">
<div class="eContainer">
<el-form
:model="model"
:rules="rules"
ref="modelForm"
label-width="160px"
size="small"
label-position="left"
:validate-on-rule-change="false"
>
<c-tabs v-model="tabVal" ref="elment" type="card" @tab-click="tabClick">
<!-- PD000001 -->
<el-tab-pane
label="信息查询" name="infsea">
<c-content>
<m-infsea :model="model" :codes="codes"/>
</c-content>
</el-tab-pane>
</c-tabs>
</el-form>
<!-- <c-grid-ety-prompt-dialog ref="etyDialog" :promptData="promptData" v-on:select-ety="selectEty">
</c-grid-ety-prompt-dialog> -->
</div>
</c-page>
</template>
<script>
import Api from "~/service/Api"
import CodeTable from "~/config/CodeTable"
import Notice from "~/model/Notice"
import commonProcess from "~/mixin/commonProcess"
import commonFuncs from "~/mixin/commonFuncs"
import Check from "~/model/Notice/Check"
import Default from "~/model/Notice/Default"
import Pattern from "~/model/Notice/Pattern"
// import Publish from "./Publish";
// import Update from "./Update";
// import Display from "./Display";
import Infsea from "./Infsea";
import Ccvpan from "~/views/Public/Ccvpan"
import Coninfp from "~/views/Public/Coninfp";
import Setpan from "~/views/Public/Setpan";
import Docpan from "~/views/Public/Docpan";
//import Doctre from "~/views/Public/Doctre"
import Engp from "~/views/Public/Engp";
import Glepan from "~/views/Public/Glepan";
export default {
components:{
// "m-publish":Publish,
"m-ccvpan" : Ccvpan,
"m-setpan" : Setpan,
"m-glepan" : Glepan,
"m-engp":Engp,
"m-coninfp" : Coninfp,
"m-docpan" : Docpan,
// "m-update":Update,
// "m-Display":Display,
"m-infsea":Infsea,
},
provide() {
return {
root: this
}
},
mixins: [commonProcess,commonFuncs], // 里面包含了Default、Check等的公共处理
data(){
return {
tabVal: "infsea",
trnName: "notice",
model: new Notice().data,
checkRules: Check,
defaultRules: Default,
pattern: Pattern,
rules: null,
codes: {
},
}
},
methods:{
tabClick(){
}
},
created:async function(){
// console.log("进入notice交易");
// let rtnmsg = await this.init({})
// if(rtnmsg.respCode == SUCCESS)
// {
// //TODO 处理数据逻辑
// }
// else
// {
// this.$notify.error({title: '错误',message: '服务请求失败!'});
// }
}
}
</script>
<style>
</style>
......@@ -2,15 +2,19 @@
<CellWrapper title="通知公告" :cellContentHeight="cellContentHeight">
<template v-slot:header>
<span class="el-icon-refresh" title="刷新"></span>
<span class="el-icon-more" title="操作"></span>
<span class="el-icon-more" title="操作" @click="opening"></span>
</template>
<div class="notice-container">
<el-scrollbar style="height: 100%;">
<div class="notice-item" v-for="(item, idx) in noticeList" :key="idx">
<div class="notice-item" v-for="(item, idx) in testData" :key="idx">
<div class="notice-title" :class="{ active: idx === 0 }">
<a :href="item.url" target="_blank" rel="noopener noreferrer">
<!-- <router-link :to="'/Display/'+item.tid"> -->
{{ item.title }}
<!-- </router-link> -->
</a>
</div>
<div class="notice-date">
......@@ -126,6 +130,10 @@ export default {
// 查询加载数据
this.noticeList = this.testData;
},
opening(){
window.location.href="#/business/notice"
}
},
};
</script>
......
......@@ -47,11 +47,19 @@ module.exports = {
'^/gjjs/report': '/gjjs/report'
}
},
<<<<<<< HEAD
'/gjjs/notice/': {
target: 'http://127.0.0.1:8085',
changeOrigin: true,
pathRewrite: {
'^/gjjs/notice': '/gjjs/notice'
=======
'/gjjs/devtools/': {
target: 'http://127.0.0.1:8083',
changeOrigin: true,
pathRewrite: {
'^/gjjs/devtools': '/gjjs/devtools'
>>>>>>> e711bf965506eb41654c479eae2b7e633e370da4
}
},
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment