From c74dcb8dca7b9e3eded0d20299f19a26a6b70974 Mon Sep 17 00:00:00 2001 From: wujian <14790700720@163.com> Date: 星期三, 31 一月 2024 12:48:45 +0800 Subject: [PATCH] add 追溯报表 --- jcdm-ui/src/views/main/da/opcuaconfig/index.vue | 126 +++++++++++++++++++++-------------------- 1 files changed, 65 insertions(+), 61 deletions(-) diff --git a/jcdm-ui/src/views/main/da/opcuaconfig/index.vue b/jcdm-ui/src/views/main/da/opcuaconfig/index.vue index 228e2ed..17215a4 100644 --- a/jcdm-ui/src/views/main/da/opcuaconfig/index.vue +++ b/jcdm-ui/src/views/main/da/opcuaconfig/index.vue @@ -21,25 +21,15 @@ </el-select> </el-form-item> <el-form-item label="宸ュ簭缂栫爜" prop="process"> - <el-select v-model="queryParams.process" placeholder="璇烽�夋嫨宸ュ簭缂栫爜" clearable> -<!-- <el-option--> -<!-- v-for="dict in dict.type.${dictType}"--> -<!-- :key="dict.value"--> -<!-- :label="dict.label"--> -<!-- :value="dict.value"--> -<!-- />--> - </el-select> - </el-form-item> - <el-form-item label="宸ュ簭鍚嶇О" prop="processName"> <el-input - v-model="queryParams.processName" - placeholder="璇疯緭鍏ュ伐搴忓悕绉�" + v-model="queryParams.process" + placeholder="璇疯緭鍏ュ伐搴忕紪鐮�" clearable @keyup.enter.native="handleQuery" /> </el-form-item> <el-form-item label="鐘舵��" prop="state"> - <el-select v-model="queryParams.state" placeholder="璇烽�夋嫨鐘舵��" clearable> + <el-select v-model="queryParams.state" placeholder="璇烽�夋嫨鐘舵��" clearable> <el-option v-for="dict in dict.type.sys_normal_disable" :key="dict.value" @@ -64,7 +54,7 @@ icon="el-icon-plus" size="mini" @click="handleAdd" - v-hasPermi="['main:opcuaconfig:add']" + v-hasPermi="['da:opcuaconfig:add']" >鏂板</el-button> </el-col> <el-col :span="1.5"> @@ -75,7 +65,7 @@ size="mini" :disabled="single" @click="handleUpdate" - v-hasPermi="['main:opcuaconfig:edit']" + v-hasPermi="['da:opcuaconfig:edit']" >淇敼</el-button> </el-col> <el-col :span="1.5"> @@ -86,7 +76,7 @@ size="mini" :disabled="multiple" @click="handleDelete" - v-hasPermi="['main:opcuaconfig:remove']" + v-hasPermi="['da:opcuaconfig:remove']" >鍒犻櫎</el-button> </el-col> <el-col :span="1.5"> @@ -105,17 +95,17 @@ <el-table border v-loading="loading" :data="opcuaconfigList" @selection-change="handleSelectionChange"> <el-table-column type="selection" width="55" align="center" /> <!-- <el-table-column label="ID" align="center" prop="id" />--> - <el-table-column label="宸ュ簭缂栫爜" align="center" prop="process"> - <!-- <template slot-scope="scope">--> - <!-- <dict-tag :options="dict.type.${column.dictType}" :value="scope.row.process"/>--> - <!-- </template>--> - </el-table-column> <el-table-column label="宸ュ簭鍚嶇О" align="center" prop="processName"> <!-- <template slot-scope="scope">--> <!-- <dict-tag :options="dict.type.${column.dictType}" :value="scope.row.processName"/>--> <!-- </template>--> </el-table-column> - <el-table-column label="鑺傜偣" align="center" prop="node"> + <el-table-column label="宸ュ簭缂栫爜" align="center" prop="process"> + <!-- <template slot-scope="scope">--> + <!-- <dict-tag :options="dict.type.${column.dictType}" :value="scope.row.process"/>--> + <!-- </template>--> + </el-table-column> + <el-table-column label="浜や簰鑺傜偣" align="center" prop="node"> <!-- <template slot-scope="scope">--> <!-- <dict-tag :options="dict.type.${column.dictType}" :value="scope.row.node"/>--> <!-- </template>--> @@ -135,15 +125,15 @@ <dict-tag :options="dict.type.subscription_type" :value="scope.row.rFunction"/> </template> </el-table-column> - <el-table-column label="澶囨敞" align="center" prop="remarks"> -<!-- <template slot-scope="scope">--> -<!-- <dict-tag :options="dict.type.${column.dictType}" :value="scope.row.remarks"/>--> -<!-- </template>--> - </el-table-column> <el-table-column label="鐘舵��" align="center" prop="state"> <template slot-scope="scope"> <dict-tag :options="dict.type.sys_normal_disable" :value="scope.row.state"/> </template> + </el-table-column> + <el-table-column label="澶囨敞" align="center" prop="remarks"> + <!-- <template slot-scope="scope">--> + <!-- <dict-tag :options="dict.type.${column.dictType}" :value="scope.row.remarks"/>--> + <!-- </template>--> </el-table-column> <el-table-column fixed="right" width="200" label="鎿嶄綔" align="center" class-name="small-padding fixed-width"> <template slot-scope="scope"> @@ -154,7 +144,7 @@ style="width: 72px" icon="el-icon-edit" @click="handleUpdate(scope.row)" - v-hasPermi="['da:opcuaconfig:edit']" + v-hasPermi="['main:opcuaconfig:edit']" >淇敼</el-button> <el-button size="mini" @@ -185,7 +175,7 @@ {{titleName}} </span> <el-form ref="form" :model="form" :rules="rules" label-width="80px"> - <el-form-item label="鑺傜偣" prop="node"> + <el-form-item label="浜や簰鑺傜偣" prop="node"> <el-input v-model="form.node" placeholder="璇疯緭鍏ヨ妭鐐�" /> </el-form-item> <el-form-item label="鏁版嵁绫诲瀷" prop="sysTypes"> @@ -204,7 +194,7 @@ v-for="dict in dict.type.sys_yes_no" :key="dict.value" :label="dict.label" - :value="parseInt(dict.value)" + :value="dict.value" ></el-option> </el-select> </el-form-item> @@ -218,20 +208,24 @@ ></el-option> </el-select> </el-form-item> - <el-form-item label="澶囨敞" prop="remarks"> - <el-input v-model="form.remarks" placeholder="璇疯緭鍏ュ娉�" /> - </el-form-item> +<!-- <el-form-item label="宸ュ簭鍚嶇О" prop="processName">--> +<!-- <el-input v-model="form.processName" placeholder="璇疯緭鍏ュ伐搴忓悕绉�" />--> +<!-- </el-form-item>--> +<!-- <el-form-item label="宸ュ簭缂栫爜" prop="process">--> +<!-- <el-input v-model="form.process" placeholder="璇疯緭鍏ュ伐搴忕紪鐮�" />--> +<!-- </el-form-item>--> <el-form-item label="宸ュ簭缂栫爜" prop="process"> - <el-radio-group v-model="form.process"> -<!-- <el-radio--> -<!-- v-for="dict in dict.type.${dictType}"--> -<!-- :key="dict.value"--> -<!-- :label="dict.value"--> -<!-- >{{dict.label}}</el-radio>--> - </el-radio-group> + <el-select style="width: 100%" @change="handleSelectChange(form.process)" v-model="form.process" placeholder="璇烽�夋嫨"> + <el-option + v-for="item in options" + :key="item.processesCode" + :label="item.processesCode" + :value="item.processesCode"> + </el-option> + </el-select> </el-form-item> <el-form-item label="宸ュ簭鍚嶇О" prop="processName"> - <el-input v-model="form.processName" placeholder="璇疯緭鍏ュ伐搴忓悕绉�" /> + <el-input disabled v-model="form.processName" placeholder="璇疯緭鍏ュ伐搴忓悕绉�" /> </el-form-item> <el-form-item label="鐘舵��" prop="state"> <el-select v-model="form.state" placeholder="璇烽�夋嫨鐘舵��"> @@ -242,6 +236,9 @@ :value="parseInt(dict.value)" ></el-option> </el-select> + </el-form-item> + <el-form-item label="澶囨敞" prop="remarks"> + <el-input v-model="form.remarks" placeholder="璇疯緭鍏ュ娉�" /> </el-form-item> </el-form> <div slot="footer" class="dialog-footer"> @@ -254,12 +251,14 @@ <script> import { listOpcuaconfig, getOpcuaconfig, delOpcuaconfig, addOpcuaconfig, updateOpcuaconfig } from "@/api/main/da/opcuaconfig/opcuaconfig"; +import {listProcesses} from "@/api/main/bs/processes/processes"; export default { name: "Opcuaconfig", - dicts: ['subscription_type', 'sys_yes_no', 'sys_normal_disable', 'data_type'], + dicts: ['subscription_type', 'sys_yes_no', 'data_type','sys_normal_disable'], data() { return { + options: [], // 閬僵灞� loading: true, titleName: "", @@ -284,11 +283,17 @@ pageNum: 1, pageSize: 10, node: null, - sysTypes: null, rFunction: null, process: null, - processName: null, state: null + }, + ProcessesqueryParams: { + pageNum: 1, + pageSize: 10, + process: null, + processName: null, + keyProcessesFlag: null, + routeCode: undefined, }, // 琛ㄥ崟鍙傛暟 form: {}, @@ -297,25 +302,28 @@ id: [ { required: true, message: "ID涓嶈兘涓虹┖", trigger: "blur" } ], - node: [ - { required: true, message: "鑺傜偣涓嶈兘涓虹┖", trigger: "blur" } - ], - sysTypes: [ - { required: true, message: "鏁版嵁绫诲瀷涓嶈兘涓虹┖", trigger: "change" } - ], - subscribe: [ - { required: true, message: "鏄惁璁㈤槄涓嶈兘涓虹┖", trigger: "change" } - ], - rFunction: [ - { required: true, message: "璁㈤槄绫诲瀷涓嶈兘涓虹┖", trigger: "change" } - ], } }; }, created() { this.getList(); + this.getProcessesList(); + }, methods: { + /** 鏌ヨ宸ュ簭淇℃伅鍒楄〃 */ + getProcessesList() { + this.loading = true; + listProcesses(this.queryParams).then(response => { + this.options = response.rows; + }); + }, + handleSelectChange(selectedOption) { + this.ProcessesqueryParams.process = selectedOption; + listProcesses(this.ProcessesqueryParams).then(response => { + this.form.processName = response.rows[0].processesName; + }); + }, /** 鏌ヨ浜や簰淇″彿閰嶇疆鍒楄〃 */ getList() { this.loading = true; @@ -334,17 +342,13 @@ reset() { this.form = { id: null, - module: null, node: null, - length: null, sysTypes: null, - functionality: null, subscribe: null, - rModule: null, rFunction: null, remarks: null, - process: null, processName: null, + process: null, state: null }; this.resetForm("form"); -- Gitblit v1.9.3