From 04f79eab65aec630b36ded8b329c4f2dd2eecd4e Mon Sep 17 00:00:00 2001 From: hdy <1105738590@qq.com> Date: 星期五, 22 十一月 2024 09:42:24 +0800 Subject: [PATCH] opcUA界面优化 --- billion-ui/src/views/main/sc/opcConf/index.vue | 74 +++++++++++++++++++++++++++++++----- 1 files changed, 63 insertions(+), 11 deletions(-) diff --git a/billion-ui/src/views/main/sc/opcConf/index.vue b/billion-ui/src/views/main/sc/opcConf/index.vue index 9589179..24c30b2 100644 --- a/billion-ui/src/views/main/sc/opcConf/index.vue +++ b/billion-ui/src/views/main/sc/opcConf/index.vue @@ -1,6 +1,14 @@ <template> <div class="app-container"> <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px"> + <el-form-item label="宸ヤ綅缂栧彿" prop="locationCode"> + <el-input + v-model="queryParams.locationCode" + placeholder="璇疯緭鍏ュ伐浣嶇紪鍙�" + clearable + @keyup.enter.native="handleQuery" + /> + </el-form-item> <el-form-item label="宸ヤ綅鍚嶇О" prop="locationName"> <el-input v-model="queryParams.locationName" @@ -17,9 +25,20 @@ @keyup.enter.native="handleQuery" /> </el-form-item> - <el-form-item> + <el-form-item label="閲囬泦绫诲瀷" prop="type"> + <el-input + v-model="queryParams.node" + placeholder="璇疯緭鍏ラ噰闆嗙被鍨�" + clearable + @keyup.enter.native="handleQuery" + /> + </el-form-item> + + <el-form-item style="float: right" > <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">鎼滅储</el-button> +<!-- <el-button icon="el-icon-setting" size="mini" @click="toggleAdvancedSearch">楂樼骇鏌ヨ</el-button>--> <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">閲嶇疆</el-button> + </el-form-item> </el-form> @@ -69,26 +88,33 @@ <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> </el-row> - <el-table v-loading="loading" :data="opcConfList" @selection-change="handleSelectionChange"> + <el-table v-loading="loading" border :data="opcConfList" @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="locationCode" /> <el-table-column label="宸ヤ綅鍚嶇О" align="center" prop="locationName" /> <el-table-column label="鍦板潃" align="center" prop="node" /> <el-table-column label="閲囬泦绫诲瀷" align="center" prop="type" /> - <el-table-column label="鏄惁璁㈤槄" align="center" prop="subscribe" /> + <el-table-column label="鏄惁璁㈤槄" align="center" prop="subscribe" > + <template slot-scope="scope"> + <dict-tag :options="dict.type.sys_yes_no" :value="scope.row.subscribe"/> + </template> + </el-table-column> <el-table-column label="鎿嶄綔" align="center" class-name="small-padding fixed-width"> <template slot-scope="scope"> <el-button size="mini" - type="text" + style="width: 72px" + type="success" + plain icon="el-icon-edit" @click="handleUpdate(scope.row)" v-hasPermi="['sc:opcConf:edit']" >淇敼</el-button> <el-button size="mini" - type="text" + style="width: 72px" + type="danger" + plain icon="el-icon-delete" @click="handleDelete(scope.row)" v-hasPermi="['sc:opcConf:remove']" @@ -106,10 +132,10 @@ /> <!-- 娣诲姞鎴栦慨鏀筄PC浜や簰閰嶇疆瀵硅瘽妗� --> - <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body> + <el-dialog :title="title" :visible.sync="open" width="500px" append-to-body > <el-form ref="form" :model="form" :rules="rules" label-width="80px"> <el-form-item label="宸ヤ綅缂栫爜" prop="locationCode"> - <el-input v-model="form.locationCode" type="textarea" placeholder="璇疯緭鍏ュ唴瀹�" /> + <el-input v-model="form.locationCode" placeholder="璇疯緭鍏ュ唴瀹�" /> </el-form-item> <el-form-item label="宸ヤ綅鍚嶇О" prop="locationName"> <el-input v-model="form.locationName" placeholder="璇疯緭鍏ュ伐浣嶅悕绉�" /> @@ -117,9 +143,18 @@ <el-form-item label="鍦板潃" prop="node"> <el-input v-model="form.node" placeholder="璇疯緭鍏ュ湴鍧�" /> </el-form-item> -<!-- <el-form-item label="鍒犻櫎鏍囧織" prop="delFlag">--> -<!-- <el-input v-model="form.delFlag" placeholder="璇疯緭鍏ュ垹闄ゆ爣蹇�" />--> -<!-- </el-form-item>--> + <el-form-item label="閲囬泦绫诲瀷" prop="type"> + <el-input v-model="form.type" placeholder="璇疯緭鍏ラ噰闆嗙被鍨�" /> + </el-form-item> + <el-form-item label="鏄惁璁㈤槄" prop="subscribe"> + <el-radio-group v-model="form.subscribe"> + <el-radio + v-for="dict in dict.type.sys_yes_no" + :key="dict.value" + :label="dict.value" + >{{dict.label}}</el-radio> + </el-radio-group> + </el-form-item> </el-form> <div slot="footer" class="dialog-footer"> <el-button type="primary" @click="submitForm">纭� 瀹�</el-button> @@ -134,8 +169,10 @@ export default { name: "OpcConf", + dicts: ['sys_yes_no'], data() { return { + advancedSearchVisible: false, // 閬僵灞� loading: true, // 閫変腑鏁扮粍 @@ -168,6 +205,17 @@ form: {}, // 琛ㄥ崟鏍¢獙 rules: { + locationCode: [ + { required: true, message: "宸ヤ綅缂栫爜涓嶈兘涓虹┖", trigger: "blur" }, + { pattern: /^[a-zA-Z0-9]*$/, message: "鎬绘垚搴忓垪鍙蜂笉鑳藉寘鍚腑鏂囧瓧绗�", trigger: "blur" } + ], + locationName: [ + { required: true, message: "宸ヤ綅鍚嶇О涓嶈兘涓虹┖", trigger: "blur" }, + ], + node: [ + { required: true, message: "鍦板潃涓嶈兘涓虹┖", trigger: "blur" }, + { pattern: /^[a-zA-Z0-9]*$/, message: "鍦板潃涓嶈兘鍖呭惈涓枃瀛楃", trigger: "blur" } + ], } }; }, @@ -175,6 +223,10 @@ this.getList(); }, methods: { + toggleAdvancedSearch() { + this.advancedSearchVisible = !this.advancedSearchVisible; + + }, /** 鏌ヨOPC浜や簰閰嶇疆鍒楄〃 */ getList() { this.loading = true; -- Gitblit v1.9.3