|
|
|
|
@ -31,8 +31,8 @@
|
|
|
|
|
<span style="color: red;font-weight: bold;padding-right: 4px;">*</span>开始日期:
|
|
|
|
|
</div>
|
|
|
|
|
<div class="xy-table-item-content">
|
|
|
|
|
<el-date-picker :disabled="is_search" v-model="form.date" style="width:100%" format="yyyy-MM-dd" value-format="yyyy-MM-dd"
|
|
|
|
|
type="date" placeholder="选择日期">
|
|
|
|
|
<el-date-picker :disabled="is_search" v-model="form.date" style="width:100%" format="yyyy-MM-dd"
|
|
|
|
|
value-format="yyyy-MM-dd" type="date" placeholder="选择日期">
|
|
|
|
|
</el-date-picker>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
@ -43,8 +43,8 @@
|
|
|
|
|
<span style="color: red;font-weight: bold;padding-right: 4px;"></span>结束日期:
|
|
|
|
|
</div>
|
|
|
|
|
<div class="xy-table-item-content">
|
|
|
|
|
<el-date-picker :disabled="is_search" v-model="form.end_date" style="width:100%" format="yyyy-MM-dd" value-format="yyyy-MM-dd"
|
|
|
|
|
type="date" placeholder="选择日期">
|
|
|
|
|
<el-date-picker :disabled="is_search" v-model="form.end_date" style="width:100%" format="yyyy-MM-dd"
|
|
|
|
|
value-format="yyyy-MM-dd" type="date" placeholder="选择日期">
|
|
|
|
|
</el-date-picker>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
@ -54,12 +54,11 @@
|
|
|
|
|
<div class="xy-table-item-label" style="font-weight: bold">
|
|
|
|
|
<span style="color: red;font-weight: bold;padding-right: 4px;">*</span>所属区域:
|
|
|
|
|
</div>
|
|
|
|
|
<div class="xy-table-item-content">
|
|
|
|
|
<div>
|
|
|
|
|
<el-checkbox :disabled="is_search" @change="changeAllArea" v-model="allArea">全部区域</el-checkbox>
|
|
|
|
|
<div class="xy-table-item-content">
|
|
|
|
|
<div>
|
|
|
|
|
<el-checkbox :disabled="is_search" @change="changeAllArea" v-model="allArea">全部区域</el-checkbox>
|
|
|
|
|
</div>
|
|
|
|
|
<el-select :disabled="is_search" style="width:100%" v-model="form.area_ids" multiple
|
|
|
|
|
placeholder="请选择">
|
|
|
|
|
<el-select :disabled="is_search" style="width:100%" v-model="form.area_ids" multiple placeholder="请选择">
|
|
|
|
|
<el-option v-for="item in areaList" :key="item.id" :label="item.name" :value="item.id">
|
|
|
|
|
</el-option>
|
|
|
|
|
</el-select>
|
|
|
|
|
@ -86,8 +85,7 @@
|
|
|
|
|
</div>
|
|
|
|
|
<div class="xy-table-item-content" style="height:150px;overflow: scroll;">
|
|
|
|
|
<el-tree v-if="isShow" :default-checked-keys="checkArr" :check-strictly="true" @check="getSelectedNodes"
|
|
|
|
|
:data="catalogList" show-checkbox node-key="id" ref="tree" highlight-current
|
|
|
|
|
:props="defaultProps">
|
|
|
|
|
:data="catalogList" show-checkbox node-key="id" ref="tree" highlight-current :props="defaultProps">
|
|
|
|
|
</el-tree>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
@ -98,10 +96,12 @@
|
|
|
|
|
<span style="color: red;font-weight: bold;padding-right: 4px;"></span>附件:
|
|
|
|
|
</div>
|
|
|
|
|
<div class="xy-table-item-content">
|
|
|
|
|
<el-upload :disabled="is_search" :action="action" class='upload-demo' multiple :file-list="filesList" ref="pictureUpload"
|
|
|
|
|
:auto-upload="true" :data="uploadOther" :on-success="handlesuccess" :on-remove="handleRemove">
|
|
|
|
|
<el-upload :disabled="is_search" :action="action" class='upload-demo' multiple :file-list="filesList"
|
|
|
|
|
ref="pictureUpload" :auto-upload="true" :data="uploadOther" :on-progress="handleProgress"
|
|
|
|
|
:on-success="handlesuccess" :on-remove="handleRemove">
|
|
|
|
|
<el-button v-if="!is_search" size="small" type="primary">点击上传</el-button>
|
|
|
|
|
</el-upload>
|
|
|
|
|
</el-upload>
|
|
|
|
|
<el-progress v-if="showProgress" :percentage="uploadProgress"></el-progress>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
@ -112,8 +112,9 @@
|
|
|
|
|
</div>
|
|
|
|
|
<div class="xy-table-item-content">
|
|
|
|
|
<!-- <wangEditor :isShow="isShow && !is_search" v-show="showTinymce" :value="form.content" @change="changeEditor"></wangEditor> -->
|
|
|
|
|
<my-tinymce v-if="isShow && !is_search && showTinymce" @input="changeEditor" :value="form.content"></my-tinymce>
|
|
|
|
|
<div v-if="is_search" v-html="form.content"></div>
|
|
|
|
|
<my-tinymce v-if="isShow && !is_search && showTinymce" @input="changeEditor"
|
|
|
|
|
:value="form.content"></my-tinymce>
|
|
|
|
|
<div v-if="is_search" v-html="form.content"></div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
@ -159,16 +160,18 @@
|
|
|
|
|
id: '',
|
|
|
|
|
showTinymce: false,
|
|
|
|
|
is_next: false, // 是否 可以延续
|
|
|
|
|
catalogList: [],
|
|
|
|
|
is_search:false, // 是否到期 预警提醒的编辑
|
|
|
|
|
allArea:false,
|
|
|
|
|
catalogList: [],
|
|
|
|
|
is_search: false, // 是否到期 预警提醒的编辑
|
|
|
|
|
allArea: false,
|
|
|
|
|
showProgress:false,
|
|
|
|
|
uploadProgress:0,
|
|
|
|
|
statusList: [{
|
|
|
|
|
id: 0,
|
|
|
|
|
name: '正常'
|
|
|
|
|
}, {
|
|
|
|
|
id: 3,
|
|
|
|
|
name: '已结束'
|
|
|
|
|
},{
|
|
|
|
|
}, {
|
|
|
|
|
id: 1,
|
|
|
|
|
name: '已到期'
|
|
|
|
|
}, {
|
|
|
|
|
@ -229,19 +232,19 @@
|
|
|
|
|
this.stateObj = state.state
|
|
|
|
|
this.uploadOther.token = getToken();
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
changeAllArea(e){
|
|
|
|
|
console.log(e)
|
|
|
|
|
if(e){
|
|
|
|
|
|
|
|
|
|
let arr = []
|
|
|
|
|
this.areaList.map(item=>{
|
|
|
|
|
arr.push(item.id)
|
|
|
|
|
})
|
|
|
|
|
this.form.area_ids = arr
|
|
|
|
|
}else{
|
|
|
|
|
this.form.area_ids = []
|
|
|
|
|
}
|
|
|
|
|
methods: {
|
|
|
|
|
changeAllArea(e) {
|
|
|
|
|
console.log(e)
|
|
|
|
|
if (e) {
|
|
|
|
|
|
|
|
|
|
let arr = []
|
|
|
|
|
this.areaList.map(item => {
|
|
|
|
|
arr.push(item.id)
|
|
|
|
|
})
|
|
|
|
|
this.form.area_ids = arr
|
|
|
|
|
} else {
|
|
|
|
|
this.form.area_ids = []
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
changeEditor(e) {
|
|
|
|
|
this.form.content = e
|
|
|
|
|
@ -252,13 +255,13 @@
|
|
|
|
|
this.tagList = tag ? tag : []
|
|
|
|
|
},
|
|
|
|
|
getSelectedNodes(data, node) {
|
|
|
|
|
console.log("data", data)
|
|
|
|
|
if(data.children && data.children.length>0){
|
|
|
|
|
this.$Message.warning('当前节点不可选择')
|
|
|
|
|
this.form.catalog_name = ''
|
|
|
|
|
this.form.catalog_id = ''
|
|
|
|
|
this.$refs.tree.setCheckedKeys([]);
|
|
|
|
|
return
|
|
|
|
|
console.log("data", data)
|
|
|
|
|
if (data.children && data.children.length > 0) {
|
|
|
|
|
this.$Message.warning('当前节点不可选择')
|
|
|
|
|
this.form.catalog_name = ''
|
|
|
|
|
this.form.catalog_id = ''
|
|
|
|
|
this.$refs.tree.setCheckedKeys([]);
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
this.$refs.tree.setCheckedKeys([]); // 删除所有选中节点
|
|
|
|
|
this.$refs.tree.setCheckedNodes([data]); // 选中已选中节点
|
|
|
|
|
@ -290,6 +293,10 @@
|
|
|
|
|
}
|
|
|
|
|
this.filesList = fileList
|
|
|
|
|
},
|
|
|
|
|
handleProgress(event, file, fileList) {
|
|
|
|
|
this.showProgress = true;
|
|
|
|
|
this.uploadProgress = event.percent;
|
|
|
|
|
},
|
|
|
|
|
clickSubmit(bol) {
|
|
|
|
|
this.$refs.dialog.submit()
|
|
|
|
|
},
|
|
|
|
|
@ -301,10 +308,10 @@
|
|
|
|
|
this.$refs.addRecordLink.setCheck(this.form.catalog_id)
|
|
|
|
|
this.$refs.addRecordLink.isShow = true
|
|
|
|
|
},
|
|
|
|
|
saveLink(e,id) {
|
|
|
|
|
console.log("e", e,id)
|
|
|
|
|
if (e) {
|
|
|
|
|
this.is_next = true
|
|
|
|
|
saveLink(e, id) {
|
|
|
|
|
console.log("e", e, id)
|
|
|
|
|
if (e) {
|
|
|
|
|
this.is_next = true
|
|
|
|
|
this.form.next_link_id = id
|
|
|
|
|
this.clickSubmit()
|
|
|
|
|
}
|
|
|
|
|
@ -362,9 +369,9 @@
|
|
|
|
|
this.form = this.base.requestToForm(res, this.form)
|
|
|
|
|
console.log("form---", this.form)
|
|
|
|
|
this.checkArr = res.catalog_id ? [res.catalog_id] : []
|
|
|
|
|
this.form.area_ids = res.area_ids ? res.area_ids : []
|
|
|
|
|
if(this.form.area_ids.length===this.areaList.length){
|
|
|
|
|
this.allArea = true
|
|
|
|
|
this.form.area_ids = res.area_ids ? res.area_ids : []
|
|
|
|
|
if (this.form.area_ids.length === this.areaList.length) {
|
|
|
|
|
this.allArea = true
|
|
|
|
|
}
|
|
|
|
|
this.form.tag_ids = res.tag_ids ? res.tag_ids : []
|
|
|
|
|
this.form.files = res.files ? res.files : []
|
|
|
|
|
@ -403,9 +410,11 @@
|
|
|
|
|
this.id = ''
|
|
|
|
|
this.showTinymce = false
|
|
|
|
|
this.checkArr = []
|
|
|
|
|
this.filesList = []
|
|
|
|
|
this.is_next = false
|
|
|
|
|
this.allArea = false
|
|
|
|
|
this.filesList = []
|
|
|
|
|
this.is_next = false
|
|
|
|
|
this.allArea = false
|
|
|
|
|
this.showProgress = false;
|
|
|
|
|
this.uploadProgress = 0;
|
|
|
|
|
this.form = {
|
|
|
|
|
title: '',
|
|
|
|
|
status: 0,
|
|
|
|
|
|