diff --git a/src/styles/index.scss b/src/styles/index.scss index 0439e67..55e5096 100644 --- a/src/styles/index.scss +++ b/src/styles/index.scss @@ -197,3 +197,7 @@ top: 41px !important; #nprogress .bar{ background: $primaryColor !important; } + +.pickerTime .el-picker-panel__shortcut{ + margin-left:0; + } diff --git a/src/views/dashboard/components/PanelGroup.vue b/src/views/dashboard/components/PanelGroup.vue index 2c95404..c3ad2ea 100644 --- a/src/views/dashboard/components/PanelGroup.vue +++ b/src/views/dashboard/components/PanelGroup.vue @@ -54,7 +54,7 @@
- 当日到期提醒 + 到期提醒
diff --git a/src/views/dashboard/index.vue b/src/views/dashboard/index.vue index afaf5e7..fd76fa6 100644 --- a/src/views/dashboard/index.vue +++ b/src/views/dashboard/index.vue @@ -60,7 +60,8 @@ methods: { async getList() { this.nowDate = this.$moment().format("YYYY-MM-DD") - console.log("this.nowDate",this.nowDate) + this.startDate = this.$moment('1900-01-01').format("YYYY-MM-DD") + console.log("this.nowDate",this.nowDate,this.startDate) const res = await index({ page_size: 9999, page: 1, @@ -70,7 +71,7 @@ filter:[{ key:'end_date', op:'range', - value:[this.nowDate,this.nowDate] + value:[this.startDate,this.nowDate] },{ key:'status', op:'eq', diff --git a/src/views/record/components/addRecord.vue b/src/views/record/components/addRecord.vue index cf24e8a..c093203 100644 --- a/src/views/record/components/addRecord.vue +++ b/src/views/record/components/addRecord.vue @@ -18,7 +18,7 @@ *状态:
- + @@ -116,12 +116,12 @@ - +
@@ -133,6 +133,8 @@ } from "@/api/system/baseForm.js" import wangEditor from '@/components/wangEditor'; + import addRecordLink from './addRecordLink.vue'; + import { deepCopy, isNull @@ -143,7 +145,8 @@ import state from '@/store/modules/user.js' export default { components: { - wangEditor + wangEditor, + addRecordLink }, data() { return { @@ -151,7 +154,7 @@ isShow: false, id: '', showTinymce: false, - is_next: false, // 是否新建延续 + is_next: false, // 是否 可以延续 catalogList: [], statusList: [{ id: 0, @@ -221,11 +224,11 @@ changeEditor(e) { this.form.content = e }, - setList(cat,area,tag){ - this.catalogList = cat?cat:[] - this.areaList = area?area:[] - this.tagList = tag?tag:[] - }, + setList(cat, area, tag) { + this.catalogList = cat ? cat : [] + this.areaList = area ? area : [] + this.tagList = tag ? tag : [] + }, getSelectedNodes(data, node) { console.log("data", data) this.$refs.tree.setCheckedKeys([]); // 删除所有选中节点 @@ -242,9 +245,9 @@ this.checkArr = [] this.form.catalog_id = '' } - }, - setLinkId(e){ - this.form.link_id = e?e:'' + }, + setLinkId(e) { + this.form.link_id = e ? e : '' }, handleRemove(file, fileList) { this.filesList = fileList @@ -259,13 +262,24 @@ this.filesList = fileList }, clickSubmit(bol) { - if (bol === 'next') { - this.is_next = true - } else { - this.is_next = false - } this.$refs.dialog.submit() }, + // 创建延续 + addLink() { + this.$refs.addRecordLink.type = 'add' + this.$refs.addRecordLink.setLinkId(this.id) + this.$refs.addRecordLink.setList(this.catalogList, this.areaList, this.tagList) + 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 + this.form.next_link_id = id + this.clickSubmit() + } + }, submit() { if (this.id) { @@ -302,14 +316,9 @@ this.$message({ type: 'success', message: '保存成功' - }) - if(this.is_next){ - this.$emit('refresh', this.is_next, this.id) - }else{ - this.$emit('refresh') - } + }) + this.$emit('refresh') this.isShow = false - console.log("is_next", this.is_next) }) }, @@ -328,6 +337,10 @@ this.form.tag_ids = res.tag_ids ? res.tag_ids : [] this.form.files = res.files ? res.files : [], this.form.status = res.status ? res.status : 0 + // 是否已延续 如果已延续,则不能更改状态 + if (this.form.status === 2) { + this.is_next = true + } this.form.content = res.content ? res.content : '' if (res.files_details && res.files_details.length > 0) { this.filesList = [] @@ -358,7 +371,8 @@ this.id = '' this.showTinymce = false this.checkArr = [] - this.filesList = [] + this.filesList = [] + this.is_next = false this.form = { title: '', status: 0, diff --git a/src/views/record/components/addRecordLink.vue b/src/views/record/components/addRecordLink.vue index a47071d..291cf36 100644 --- a/src/views/record/components/addRecordLink.vue +++ b/src/views/record/components/addRecordLink.vue @@ -290,9 +290,9 @@ }).then(res => { this.$message({ type: 'success', - message: '保存成功' + message: '延续成功' }) - this.$emit('refresh') + this.$emit('refreshLink',true,res.id) this.isShow = false }) }, @@ -301,28 +301,13 @@ show({ id: id, table_name: this.table_name, - json_data_fields: ['files'] }).then(res => { - console.log("res---", res) - this.form = this.base.requestToForm(res, this.form) - console.log("form---", this.form) - this.checkArr = res.catalog_id ? [res.catalog_id] : [], + this.checkArr = res.catalog_id ? [res.catalog_id] : [], + this.form.catalog_id = res.catalog_id?res.catalog_id:'' this.form.area_ids = res.area_ids ? res.area_ids : [] this.form.tag_ids = res.tag_ids ? res.tag_ids : [] - this.form.files = res.files ? res.files : [], - this.form.status = 0 - this.form.content = res.content ? res.content : '' + this.form.status = 0 this.form.link_id = id - if (res.files_details && res.files_details.length > 0) { - this.filesList = [] - res.files_details.map(item => { - this.filesList.push({ - name: item.original_name, - id: item.id, - url: item.url - }) - }) - } this.showTinymce = true console.log("this.form", this.form) }) diff --git a/src/views/record/index.vue b/src/views/record/index.vue index f0375b6..131e4a6 100644 --- a/src/views/record/index.vue +++ b/src/views/record/index.vue @@ -16,11 +16,11 @@
- + - + @@ -41,15 +41,15 @@
- +
- +
@@ -59,7 +59,7 @@ 重置
- 新增 + 新增
@@ -125,6 +125,24 @@ + + +