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">
<el-form
class="m-table-search-form"
ref="paramsForm"
:inline="true"
label-position="right"
label-width="110px"
size="small"
>
<c-row>
<c-col :span="24">
<c-col :span="8">
<el-form-item
label="标题"
prop="theme"
style="width: 100%"
>
<c-input
v-model="model.theme"
maxlength="50"
placeholder="请输入公告标题"
></c-input>
</el-form-item>
</c-col>
<c-col :span="8">
<el-form-item
label="创建时间"
prop="opndatfrom"
style="width: 100%"
>
<c-col :span="11">
<c-date-picker
type="date"
v-model="model.opndatfrom"
style="width: 100%"
placeholder="请选择"
></c-date-picker>
</c-col>
<c-col :span="2" style="text-align: center">
<label style="display: inline-block; width: 100%">-</label>
</c-col>
<c-col :span="11">
<c-date-picker
type="date"
v-model="model.opndatto"
style="width: 100%"
placeholder="请选择"
></c-date-picker>
</c-col>
</el-form-item>
</c-col>
<c-col :span="8">
<el-form-item label="发布机构" prop="unit" style="width: 100%">
<c-input
v-model="model.unit"
maxlength="40"
placeholder="请输入机构名称"
></c-input>
</el-form-item>
</c-col>
</c-col>
</c-row>
<!-- </template> -->
<c-col
:span="24"
style="text-align: right; height: 36.8px"
>
<el-button size="small" @click="handleReset">重置</el-button>
<el-button
type="primary"
icon="el-icon-search"
size="small"
@click="handleSearch"
>查询</el-button
>
</c-col>
</el-form>
<c-col :span="24">
<div style="border-bottom: 10px solid rgb(232, 232, 232)"></div>
</c-col>
<c-col style="margin-top: 10px">
<c-button class="medium_bcs" size="medium" type="primary" style="margin-left: 0 ; float :right" @click="ruleAdd()"
>+添加公告</c-button
>
</c-col>
<c-col :span="24">
<!-- <c-istream-table :list="stmData.data" :columns="stmData.columns"> -->
<el-table
:border="true"
:data="stmData.data.slice((currentPage - 1) * pagesize, currentPage * pagesize)"
style="width:80%,text-align:center" :header-cell-style="{background:'rgb(235, 235, 235)',color:'#000'}" >
<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 fixed="right" prop="op" label="操作" width="200px">
<template slot-scope="scope">
<c-button
style="margin-left: 0"
size="small"
type="primary"
@click="ruleDetail(scope)"
>
详情
</c-button>
<c-button
style="margin-left: 0"
size="small"
type="primary"
@click="ruleEdit(scope)"
>
编辑
</c-button>
<c-button
style="margin-left: 0"
size="small"
type="primary"
@click="ruleDel(scope.$index)"
>
删除
</c-button>
</template>
</el-table-column>
</el-table>
<el-pagination
style="margin: 12px 0px"
background
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="currentPage"
:page-sizes="[2, 4, 6, 8]"
:page-size="pagesize"
layout="total, sizes, prev, pager, next, jumper"
:total="stmData.data.length"
>
</el-pagination>
<!-- </c-istream-table> -->
</c-col>
<el-dialog :visible.sync="showPanel" :title="opttitle" append-to-body :before-close="cancel">
<el-form
class="m-table-search-form"
ref="paramsForm"
:inline="true"
label-position="right"
label-width="110px"
size="small"
>
<c-row>
<c-col :span="24">
<c-col :span="24">
<c-input v-if="showIndex" style="visibility: hidden" v-model="model.edit.index" ></c-input>
<el-form-item label="标题:" prop="edit.theme" style="width: 100%">
<c-input
v-model="model.edit.theme"
maxlength="200"
placeholder="请输入标题内容"
:disabled="isDetail"
></c-input>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="发布机构:" prop="edit.unit" style="width: 100%" >
<c-input
v-model="model.edit.unit"
maxlength="20"
placeholder="请输入机构名称"
:disabled="isDetail"
></c-input>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="发布人:" prop="edit.pubname" style="width: 50%" >
<c-input
v-model="model.edit.pubname"
maxlength="10"
placeholder="请输入发布人名"
:disabled="isDetail"
></c-input>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="发布时间:" prop="edit.dat" style="width: 50%">
<c-date-picker
type="date"
v-model="model.edit.dat"
value-format="yyyy-MM-dd"
placeholder="请选择时间"
disabled
>
</c-date-picker>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="可见范围:" prop="edit.visunit" style="width: 100%" >
<c-select
v-model="model.edit.visunit"
style="width: 100%"
placeholder="请选择可见范围"
:disabled="isDetail"
>
<el-option
v-for="item in range"
:key="item.value"
:label="item.label"
:value="item.value"
>
</el-option>
</c-select>
</el-form-item>
</c-col>
<c-col :span="24">
<el-form-item label="公告内容:" prop="edit.content" style="width: 100%" >
<c-input
v-model="model.edit.content"
type="textarea"
rows ="20"
maxlength="2000"
show-word-limit
placeholder="请输入公告内容"
:disabled="isDetail"
>
</c-input>
</el-form-item>
</c-col>
</c-col>
</c-row>
<c-col
:span="24"
style="text-align: center; height: 36.8px"
>
<el-button
type="primary"
size="small"
@click="submitData"
v-if="optType"
>提交</el-button
>
<el-button style="margin-left: 0" size="small" @click="cancel">
返回
</el-button>
</c-col>
</el-form>
</el-dialog>
</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 { my } from "~/service/notice";
export default {
inject: ["root"],
props: ["model"],
mixins: [commonProcess],
components: {},
data() {
return {
showPanel: false,
opttitle:"",
optType:true,
dialogTableVisible: false,
isDetail:true,
showIndex:false,
nowDate:'',
currentPage: 1, //初始页
pagesize: 2, // 每页的数据
total: 0,
indexNum:0,//定义一级菜单的下标
trnData: {
columns: [
'1 1 "附加条款内容文本" 300',
'2 2 "智能审单规则" 500',
],
data: [],
},
stmData: {
columns: [
'1 1 "标题" 400',
'2 2 "发布机构" 400',
'3 3 "发布时间" 200'
],
data: [],
},
range:[
{
value: 'all',
label: '所有机构可见'
},
{
value: 'under',
label: '下属机构可见'
},
{
value: 'sl',
label: '平级机构可见'
}
],
};
},
methods: {
...Event,
ruleDetail(scope){
this.model.edit.theme=scope.row.theme;
this.model.edit.unit=scope.row.unit;
this.model.edit.dat=scope.row.dat;
this.model.edit.pubname=scope.row.pubname;
this.model.edit.content=scope.row.content;
this.model.edit.index=scope.row.tid;
this.model.edit.visunit=scope.row.visunit;
this.isDetail = true;
this.opttitle = "公告详情";
this.optType = false;
this.showPanel = true;
},
ruleEdit(scope){
this.model.edit.theme=scope.row.theme;
this.model.edit.unit=scope.row.unit;
this.model.edit.dat=scope.row.dat;
this.model.edit.pubname=scope.row.pubname;
this.model.edit.content=scope.row.content;
this.model.edit.visunit=scope.row.visunit;
this.isDetail = false;
this.opttitle = "公告修改";
this.optType = true;
this.showPanel = true;
},
ruleAdd(){
this.model.edit.dat = this.nowDate;
this.isDetail =false;
this.opttitle = "公告新增";
this.optType = true;
this.showPanel = true;
},
ruleDel(idx){
this.stmData.data.splice(idx,1);
},
changeMod(){
let i = 0;
for (i = 0;i<this.select01.length;i++) {
if (this.select01[i].value == this.model.edit.mod){
this.indexNum = i;
break
}
}
this.select02 = this.select01[this.indexNum].obj;
},
chooseField(){
this.model.edit.ruleInfo = this.model.edit.ruleInfo +'{' + this.model.edit.mod + this.model.edit.field +'}';
},
submitData(){
const length = this.stmData.data.length;
let btnStr = this.stmData.data;
let str ;
if(this.model.edit.index == ""){ //新增
let max = 0;
for(let i=0; i < length; i++){
//获取数组中每行的数据
let arr = btnStr[i] ;
if(arr[0] > max) {
max = arr[0];
}
}
max++;
newObj={"edit.theme":this.model.edit.theme,"edit.unit":this.model.edit.unit,
"edit.theme":this.model.edit.theme,"edit.theme":this.model.edit.theme,"edit.":this.model.edit.theme,}
// str = max +'\t' + this.model.edit.theme + '\t' + this.model.edit.unit + '\t' + this.model.edit.dat + '\t'+ + 'mbf';
this.stmData.data.splice(length,0,newObj);
console.log(this.stmData.data);
}
// else{ //修改
// let num = 0;
// for(let i=0; i < length; i++){
// //获取数组中每行的数据
// let arr = btnStr[i].split("\t");
// if(arr[0] == this.model.edit.index ) {
// str = arr[0]+'\t' + this.model.edit.ruleDesc + '\t' + this.model.edit.ruleInfo + '\t' + arr[3] + '\t' + arr[4];
// num = i;
// break;
// }
// }
// this.stmData.data.splice(num,1,str);
// }
// this.$store.commit('setCheckRuleData', this.stmData.data)
this.model.edit.theme = '';
this.model.edit.unit = '';
this.model.edit.pubname = '';
this.model.edit.dat = '';
this.model.edit.content = '';
this.model.edit.index='';
this.showPanel = false;
},
cancel(){
this.model.edit.theme = '';
this.model.edit.unit = '';
this.model.edit.pubname = '';
this.model.edit.dat = '';
this.model.edit.content = '';
this.model.edit.index='';
this.showPanel = false;
},
handleReset() {},
handleSizeChange: function (size) {
this.pagesize = size;
console.log(this.pagesize); //每页下拉显示数据
},
handleCurrentChange: function (currentPage) {
this.currentPage = currentPage;
console.log(this.currentPage); //点击第几页
},
},
created: function () {
// this.stmData.data = this.$store.state.Status.checkRuleData;
let date = new Date();
let year = date.getFullYear();
let month = date.getMonth() + 1;
let day = date.getDate();
this.nowDate = year + '-' + month + '-' + day;
this.model.opndatfrom = this.nowDate;
this.model.opndatto = this.nowDate;
my().then(res => {
this.stmData.data=res
})
},
};
</script>
<style>
.el-dialog__body {
padding: 10px 5px 50px;
}
.m-table-search-form {
position: flex;
flex-direction: row;
}
.m-table-search-form .el-form-item__content {
width: calc(100% - 110px);
}
</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