From 5a2b48346d72b8b72fe86566247f1f6399ca16c1 Mon Sep 17 00:00:00 2001 From: RenCheng Date: Tue, 29 Apr 2025 10:13:54 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BB=BB=E5=8A=A1=E7=AE=A1?= =?UTF-8?q?=E7=90=86=E6=8C=89=E9=92=AE=E9=80=BB=E8=BE=91,=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D=E4=BB=BB=E5=8A=A1=E6=97=B6=E9=97=B4=E5=A4=8D=E5=86=99?= =?UTF-8?q?bug,=E6=B7=BB=E5=8A=A0=E7=B4=A2=E5=BC=95=E5=AD=97=E6=AE=B5?= =?UTF-8?q?=E9=80=89=E6=8B=A9=E5=8A=9F=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/data/modules/dataIndexingModal.vue | 35 ++++++++++++++------ src/views/task/index.vue | 14 ++++++-- src/views/task/modules/taskModal.vue | 3 +- 3 files changed, 37 insertions(+), 15 deletions(-) diff --git a/src/views/data/modules/dataIndexingModal.vue b/src/views/data/modules/dataIndexingModal.vue index 508e3c1..d239517 100644 --- a/src/views/data/modules/dataIndexingModal.vue +++ b/src/views/data/modules/dataIndexingModal.vue @@ -20,15 +20,6 @@ validateTrigger: 'change' }]" > - - - + + @@ -56,9 +52,8 @@ import moment from "moment" import { getAction, deleteAction, putAction, postAction } from '@/api/manage' - import pick from 'lodash.pick' +import pick from 'lodash.pick' - export default { name: "dataIndexingModal", components: { @@ -87,6 +82,7 @@ import { getAction, deleteAction, putAction, postAction } from '@/api/manage' }, shipNum:{}, rangeTime:[], + treeData: [], schemaMass:"", tableName:"" } @@ -94,10 +90,27 @@ import { getAction, deleteAction, putAction, postAction } from '@/api/manage' created () { }, methods: { + getQuerytableColumns() { + getAction("/dataManager/getTableColumnNames?schemaMass="+this.schemaMass+"&tableName="+this.tableName, {}).then((res) => { + if (res.success) { + this.treeData = [] + res.result.forEach(element => { + this.treeData.push({ + title: element, + value: element, + key: element, + }) + }); + } else { + this.$message.warning(res.message); + } + }); + }, add () { this.edit({}); }, edit (record) { + this.getQuerytableColumns() this.visible =true; let that = this; that.form.resetFields(); diff --git a/src/views/task/index.vue b/src/views/task/index.vue index 9ea4b6f..8fe36e6 100644 --- a/src/views/task/index.vue +++ b/src/views/task/index.vue @@ -76,7 +76,7 @@ 编辑 - 下发任务 + 下发任务 删除 @@ -213,12 +213,20 @@ }); }, handleEdit: function (record) { + if(record.issuingTime != null){ + this.$message.warning("任务已下发禁止编辑"); + return; + } this.$refs.modalForm.edit(record); this.$refs.modalForm.title = "编辑"; }, - handleDistribute:function (id) { + handleDistribute:function (record) { + if(record.issuingTime != null){ + this.$message.warning("任务已下发禁止重复下发"); + return; + } var that = this; - taskDistributeTask({id: id}).then((res) => { + taskDistributeTask({id: record.id}).then((res) => { if (res.success) { that.$message.success(res.message); that.loadData(); diff --git a/src/views/task/modules/taskModal.vue b/src/views/task/modules/taskModal.vue index 6d0d1a5..a8bb9af 100644 --- a/src/views/task/modules/taskModal.vue +++ b/src/views/task/modules/taskModal.vue @@ -165,11 +165,12 @@ import { taskCreate, this.visible =true; let that = this; that.form.resetFields(); + this.rangeTime=[]; this.model = Object.assign({},record); - this.rangeTime.push(moment(this.model.startTime),moment(this.model.endTime)) this.$nextTick(() => { this.form.setFieldsValue(pick(this.model,'name','describe','shipModelId','shipNumId')); }); + this.rangeTime.push(moment(this.model.startTime),moment(this.model.endTime)) }, onChange(value, dateString) { this.model.startTime = dateString[0];