From 411a83cfc3c7caafa0d0bac14193a0f91e022af1 Mon Sep 17 00:00:00 2001 From: zhangzhang <1747194829@qq.com> Date: Thu, 9 May 2024 11:16:00 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B8=A0=E9=81=93=E5=8F=91=E5=B8=83=E5=AE=8C?= =?UTF-8?q?=E5=96=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ruoyi-ui/package.json | 1 + ruoyi-ui/src/api/commandDispatch/index.js | 8 + .../strategy/components/AddNEditDialog.vue | 317 +++++++++++------- .../DisposalProcess/DialogVisible/index.vue | 128 ++++--- .../components/weaterData/index.vue | 6 +- .../components/infoWarning/index.vue | 49 ++- .../components/AddNEditDialog.vue | 32 +- .../PublishingChannelManagement/index.vue | 3 + 8 files changed, 337 insertions(+), 207 deletions(-) diff --git a/ruoyi-ui/package.json b/ruoyi-ui/package.json index 7272b6b1..2ffefe92 100644 --- a/ruoyi-ui/package.json +++ b/ruoyi-ui/package.json @@ -63,6 +63,7 @@ "gis-map-admin": "^0.9.2", "gis-map-tunnel": "^0.1.3", "highlight.js": "9.18.5", + "html-docx-js": "^0.3.1", "imports-loader": "^0.8.0", "iview": "^3.3.3", "jquery": "^3.6.0", diff --git a/ruoyi-ui/src/api/commandDispatch/index.js b/ruoyi-ui/src/api/commandDispatch/index.js index 0bcaa0a8..f240d74d 100644 --- a/ruoyi-ui/src/api/commandDispatch/index.js +++ b/ruoyi-ui/src/api/commandDispatch/index.js @@ -116,3 +116,11 @@ export function downloadEventImportantFile(data) { data, }); } + +// 无分页查询事件列表 +export function deventImportantFileList(eventId, type) { + return request({ + url: `/business/eventImportantFile/list/?eventId=${eventId}/&type=${type}`, + method: "get", + }); +} diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/control/device/strategy/components/AddNEditDialog.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/control/device/strategy/components/AddNEditDialog.vue index 4991394e..4920e0b0 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/control/device/strategy/components/AddNEditDialog.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/control/device/strategy/components/AddNEditDialog.vue @@ -1,65 +1,122 @@ @@ -84,7 +141,7 @@ export default { Form, TaskItem, taskEditDialog, - timeEditDialog + timeEditDialog, }, model: { prop: "visible", @@ -94,33 +151,33 @@ export default { visible: Boolean, propData: { type: Object, - default: ()=>{} - }, + default: () => {}, + }, }, data() { - let gNameValidator = (rule, value, callback)=>{ - return callback(new Error('请输入任务组名称')); + let gNameValidator = (rule, value, callback) => { + return callback(new Error("请输入任务组名称")); // if (value.trim().length<=0){ // return callback(new Error('请输入任务组名称')); // } }; return { - editingTime:"", - editData:{}, - mode:"", - isEditing:false, - isShowTimeEdit:false, - group:{}, + editingTime: "", + editData: {}, + mode: "", + isEditing: false, + isShowTimeEdit: false, + group: {}, submitting: false, formList: addEditFormList, - taskGroupsEditing:[], - selectedTaskGroup:{}, - groupBasicRules:{ + taskGroupsEditing: [], + selectedTaskGroup: {}, + groupBasicRules: { groupName: [ // { validator: gNameValidator, trigger: 'blur' } - { required: true, message: '请输入活动名称', trigger: 'blur' }, + { required: true, message: "请输入活动名称", trigger: "blur" }, ], - } + }, }; }, computed: { @@ -152,7 +209,6 @@ export default { }, }, mounted() { - // "ABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890".split('').forEach(item => { // request({ // url: `/business/dcInfoBoardVocabulary`, @@ -164,115 +220,115 @@ export default { // }); }, methods: { - onSubmitTaskItem(){ + onSubmitTaskItem() { this.isEditing = false; this.selectedTaskGroup = {}; console.log("onSubmitTaskItemonSubmitTaskItemonSubmitTaskItem"); request({ url: `/business/dcBatchFunctionsJobGroup/${this.editData.id}`, - method: "GET" - }).then(res=>{ + method: "GET", + }).then((res) => { this.editData = { id: res.data.id, groupName: res.data.groupName, // status: res.data.status, remark: res.data.remark, - detailedConfiguration: res.data.detailedConfiguration - } - this.getTaskList(); //新增task后自动刷新任务列表 + detailedConfiguration: res.data.detailedConfiguration, + }; + this.getTaskList(); //新增task后自动刷新任务列表 }); }, - onAddTaskGroup(){ + onAddTaskGroup() { this.isShowTimeEdit = true; }, - onModifyTime(taskG){ + onModifyTime(taskG) { this.editingTime = taskG.time; this.selectedTaskGroup = taskG; this.isShowTimeEdit = true; }, - onDeleteTaskGroup(taskG){ + onDeleteTaskGroup(taskG) { this.$confirm("确定要删除该任务组么?", "操作确认", { confirmButtonText: "确定", cancelButtonText: "取消", type: "warning", - }).then(() => { - - request({ - url: `/business/dcBatchFunctionsJob/time/${this.editData.id}/${taskG.time}`, - method: "DELETE" - }).then(res => { + }) + .then(() => { request({ - url: `/business/dcBatchFunctionsJobGroup/${this.editData.id}`, - method: "GET" - }).then(res => { - this.editData = { - id: res.data.id, - groupName: res.data.groupName, - // status: res.data.status, - remark: res.data.remark, - detailedConfiguration: res.data.detailedConfiguration - } - this.getTaskList(); //新增task后自动刷新任务列表 + url: `/business/dcBatchFunctionsJob/time/${this.editData.id}/${taskG.time}`, + method: "DELETE", + }).then((res) => { + request({ + url: `/business/dcBatchFunctionsJobGroup/${this.editData.id}`, + method: "GET", + }).then((res) => { + this.editData = { + id: res.data.id, + groupName: res.data.groupName, + // status: res.data.status, + remark: res.data.remark, + detailedConfiguration: res.data.detailedConfiguration, + }; + this.getTaskList(); //新增task后自动刷新任务列表 + }); }); - }); - }) .catch(() => { this.$message.warn("取消删除。"); }); }, - onSubmitTime(time){ + onSubmitTime(time) { this.isShowTimeEdit = false; - if (Object.keys(this.selectedTaskGroup).length>0){ + if (Object.keys(this.selectedTaskGroup).length > 0) { this.selectedTaskGroup.time = time; this.selectedTaskGroup = {}; - }else{ + } else { this.taskGroupsEditing.push({ time, tasks: [] }); } - let detailedConfiguration =[]; - this.taskGroupsEditing.forEach(item=>{ - detailedConfiguration.push({time:item.time, tasks:_.map(item.tasksEdit, "jobId")}); + let detailedConfiguration = []; + this.taskGroupsEditing.forEach((item) => { + detailedConfiguration.push({ + time: item.time, + tasks: _.map(item.tasksEdit, "jobId"), + }); }); request({ url: `/business/dcBatchFunctionsJobGroup`, method: "PUT", data: { id: this.editData.id, - detailedConfiguration: JSON.stringify(detailedConfiguration) + detailedConfiguration: JSON.stringify(detailedConfiguration), }, - }) - .then((result) => { - if (result.code != 200) return; - Message.success(`提交成功!`); - }) + }).then((result) => { + if (result.code != 200) return; + Message.success(`提交成功!`); + }); }, - onAddTaskItem(taskG){ + onAddTaskItem(taskG) { this.selectedTaskGroup = taskG; this.isEditing = true; }, - initEditingData(){ - if(this.propData?.id){ - this.mode = "edit" + initEditingData() { + if (this.propData?.id) { + this.mode = "edit"; this.editData = { id: this.propData.id, - groupName : this.propData.groupName, + groupName: this.propData.groupName, // status: this.propData.status, remark: this.propData.remark, - detailedConfiguration: this.propData.detailedConfiguration - } + detailedConfiguration: this.propData.detailedConfiguration, + }; } else { - this.mode = "add" + this.mode = "add"; this.editData = { groupName: "", // status: "1", remark: "", - detailedConfiguration: "" - } + detailedConfiguration: "", + }; } - }, - getTaskList(){ + getTaskList() { this.taskGroupsEditing = JSON.parse(this.editData.detailedConfiguration); // this.taskGroupsEditing = [{time:"08:00:00",tasks:[1],tasksEdit:[]}]; @@ -295,45 +351,46 @@ export default { url: `/business/dcBatchFunctionsJob/query`, method: "GET", params: { - jobGroup: this.propData.id + jobGroup: this.propData.id, }, - }) - .then((result) => { - if (result.code != 200) return; - console.log("当前任务组下的任务", result.data); - // result.data = [ - // { - // id:1, - // callParameter: '{"deviceType":"2","devices":[{"id":904,"iotDeviceId":"81221 - 65535","deviceType":"2","direction":"1"},{"id":2116,"iotDeviceId":"26113 - 65535","deviceType":"2","direction":"1"}],"functions":[{"functionId":"11","params":{"size":"65535","fileName":"play012.lst"}},{"functionId":"13","params":{"STAY":90,"ACTION":"1","SPEED":"0","COLOR":"ffff00","FONT":"3","FONT_SIZE":"24","CONTENT":"长清收费站\\\\n出入口封闭","width":"160","height":"80","formatStyle":"2"}},{"functionId":"1B","params":{"fileId":"12"}}]}', - // jobGroup:1 - // } - // ] - this.taskGroupsEditing.forEach(item=>{ - let arr = _.filter(result.data, itm => { return item.tasks.includes(itm.jobId)}); - this.$set(item, "tasksEdit", arr); - // item.tasksEdit = arr; + }).then((result) => { + if (result.code != 200) return; + console.log("当前任务组下的任务", result.data); + // result.data = [ + // { + // id:1, + // callParameter: '{"deviceType":"2","devices":[{"id":904,"iotDeviceId":"81221 - 65535","deviceType":"2","direction":"1"},{"id":2116,"iotDeviceId":"26113 - 65535","deviceType":"2","direction":"1"}],"functions":[{"functionId":"11","params":{"size":"65535","fileName":"play012.lst"}},{"functionId":"13","params":{"STAY":90,"ACTION":"1","SPEED":"0","COLOR":"ffff00","FONT":"3","FONT_SIZE":"24","CONTENT":"长清收费站\\\\n出入口封闭","width":"160","height":"80","formatStyle":"2"}},{"functionId":"1B","params":{"fileId":"12"}}]}', + // jobGroup:1 + // } + // ] + this.taskGroupsEditing.forEach((item) => { + let arr = _.filter(result.data, (itm) => { + return item.tasks.includes(itm.jobId); }); - }) + this.$set(item, "tasksEdit", arr); + // item.tasksEdit = arr; + }); + }); }, onSaveTaskGroup(formName) { - this.$refs[formName].validate(valid => { - if (!valid){ - return ; + this.$refs[formName].validate((valid) => { + if (!valid) { + return; } this.editData.groupName = this.editData.groupName.trim(); this.editData.remark = this.editData.remark.trim(); - + this.submitting = true; - + //测试数据开始 // this.$set(this.editData, "id", 11); // this.submitting = false; // return //测试数据结束 - + request({ url: `/business/dcBatchFunctionsJobGroup`, - method: this.mode=="edit" ? "PUT" : "POST", + method: this.mode == "edit" ? "PUT" : "POST", data: this.editData, }) .then((result) => { @@ -342,8 +399,7 @@ export default { Message.success(`提交成功!`); this.$emit("onSuccess"); this.editData = { ...result.data }; - this.mode = "edit" - + this.mode = "edit"; }) .catch((err) => { console.log( @@ -373,19 +429,20 @@ export default { font-size: 12px; } } -.all_groups{ - border: 1px solid #09B; - max-height:500px; +.all_groups { + border: 1px solid #09b; + max-height: 500px; overflow-y: scroll; } -.task_group{ - .task_info{ - padding:10px; background: #004050; - .time_show{ - color: #0AC; +.task_group { + .task_info { + padding: 10px; + background: #004050; + .time_show { + color: #0ac; } - } - .task_op{ - } + } + .task_op { + } } diff --git a/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/DisposalProcess/DialogVisible/index.vue b/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/DisposalProcess/DialogVisible/index.vue index 17ae4079..be554ad2 100644 --- a/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/DisposalProcess/DialogVisible/index.vue +++ b/ruoyi-ui/src/views/JiHeExpressway/pages/control/event/commandDispatch/Cards/DisposalProcess/DialogVisible/index.vue @@ -36,50 +36,69 @@ - -
- -
重要事件
-
- 报送单位: - - - 报送时间: {{ createTime }} - -
-
-
- -
-
- : + +
+
+ +
重要事件
+
+ 报送单位: + + + 报送时间: {{ createTime }} +
+
+
+ +
+
+ : +
- -
- +
+ @@ -88,13 +107,20 @@