From 39e843701bf637cd653bfdeb0d88ef4cacbc8152 Mon Sep 17 00:00:00 2001 From: fuliqi <fuliqi@qq.com> Date: 星期日, 07 四月 2024 18:00:21 +0800 Subject: [PATCH] 考核规则 --- src/views/system/template/city/index.vue | 93 +++++++++++++++------------------------------- 1 files changed, 30 insertions(+), 63 deletions(-) diff --git a/src/views/system/template/city/index.vue b/src/views/system/template/city/index.vue index 4b0cce7..c38e5ef 100644 --- a/src/views/system/template/city/index.vue +++ b/src/views/system/template/city/index.vue @@ -79,16 +79,14 @@ <el-table v-loading="loading" :data="checkTemplateList" @selection-change="handleSelectionChange"> <el-table-column type="selection" width="55" align="center" /> <el-table-column label="妯℃澘鍚嶇О" align="center" prop="templateName" width="220px"/> - <el-table-column label="鑰冩牳绫诲瀷" align="center" prop="examineCategory" /> - <el-table-column label="鑰冩牳瀵硅薄" align="center" prop="unitId" width="400px" > + <el-table-column label="鑰冩牳绫诲瀷" align="center" prop="examineCategory" > <template slot-scope="scope"> - <div v-if="scope.row.unitId === 2">鎴愰兘x杩愮淮</div> - <div v-else-if="scope.row.unitId === 3">瀵岄『鍘�,鑽e幙,楂樻柊鍖�,鑷祦浜曞尯,璐′簳鍖�,澶у畨鍖�,娌挎哗鍖�</div> + <dict-tag :options="dict.type.platform_examine_category" :value="scope.row.examineCategory"/> </template> </el-table-column> + <el-table-column label="鑰冩牳瀵硅薄" align="center" prop="deptId" width="400px" /> <el-table-column label="璋冩暣绯绘暟" align="center" prop="adjustCoefficient" /> <el-table-column label="璋冩暣绯绘暟璁$畻鏂瑰紡" align="center" prop="adjustWay"/> - <el-table-column label="鐘舵��" align="center" prop="status" /> <el-table-column label="鎿嶄綔" align="center" class-name="small-padding fixed-width"> <template slot-scope="scope"> <el-button @@ -122,22 +120,24 @@ <el-input v-model="form.templateName" placeholder="璇疯緭鍏ユā鏉垮悕绉�" /> </el-form-item> <el-form-item label="鑰冩牳绫诲瀷" prop="examineCategory"> - <el-select v-model="form.examineCategory" placeholder="璇烽�夋嫨鑰冩牳绫诲瀷"> - <el-option label="鐪佸巺鑰冩牳" value="鐪佸巺鑰冩牳"/> - <el-option label="鍖哄幙鑰冩牳" value="鍖哄幙鑰冩牳"/> - <el-option label="杩愮淮鑰冩牳" value="鍏徃鑰冩牳"/> + <el-select v-model="form.examineCategory" placeholder="鑰冩牳绫诲瀷"> + <el-option + v-for="dict in dict.type.platform_examine_category" + :key="dict.value" + :label="dict.label" + :value="parseInt(dict.value)" + /> </el-select> </el-form-item> - <el-form-item label="鑰冩牳瀵硅薄" prop="unitName"> - <div class="block"> - <span class="demonstration"></span> - <el-cascader - v-model="value" - :options="options" - :props = "props" - @change="handleChange"></el-cascader> - </div> - + <el-form-item label="鑰冩牳瀵硅薄" prop="deptId"> + <el-select v-model="form.deptId" multiple placeholder="璇烽�夋嫨"> + <el-option + v-for="item in areaList" + :key="item.id" + :label="item.value" + :value="item.id"> + </el-option> + </el-select> </el-form-item> <el-form-item label="鑰冩牳瑙勫垯" prop="tempRuleFormList"> <div class="row-warp"> @@ -201,52 +201,16 @@ <script> import { listCheckTemplate, getCheckTemplate, delCheckTemplate, addCheckTemplate, updateCheckTemplate } from "@/api/platform/check-template"; // import { ruleSelect } from '@/api/platform/check-rule' -import { unitSelect } from '@/api/platform/unit' + import { areaSelect } from '@/api/system/dept' export default { name: "CheckTemplate", + dicts: ['platform_audit_state','platform_examine_category','platform_rule_category'], data() { return { props: { multiple: true }, value: [], - options: [{ - value: 'city', - label: '鍖哄幙', - children: [{ - value: 'fushun', - label: '瀵岄『鍘�', - }, { - value: 'rong', - label: '鑽e幙', - },{ - value: 'gaoxin', - label: '楂樻柊鍖�', - },{ - value: 'ziliujing', - label: '鑷祦浜曞尯', - },{ - value: 'gongjing', - label: '璐′簳鍖�', - },{ - value: 'daan', - label: '澶у畨鍖�', - },{ - value: 'yantan', - label: '娌挎哗鍖�', - }, - ] - }, { - value: 'company', - label: '鍏徃', - children: [{ - value: 'yunwei', - label: '鎴愰兘x杩愮淮', - }, { - value: 'yunwei2', - label: '鑷础x杩愮淮', - }, ] - }, - ], + areaList:[], ruleList: [], unitList: [], // 涓存椂瑙勫垯琛ㄥ崟 @@ -300,8 +264,11 @@ }, created() { this.getList(); + this.areaSelect(); this.selectCheckRule(); - this.selectUnit(); + if (typeof this.form.deptId === 'string' && this.form.deptId.length > 0) { + this.form.deptId = this.form.deptId.split(',').map(Number); // 鍋囪deptId鐨勫�兼槸浠ラ�楀彿鍒嗛殧鐨勬暟瀛楀瓧绗︿覆 + } }, methods: { handleChange(value) { @@ -329,9 +296,9 @@ }) }, // 杩愮淮鍏徃涓嬫媺鏁版嵁 - selectUnit() { - unitSelect().then(res => { - this.unitList = res.data; + areaSelect() { + areaSelect().then(res => { + this.areaList = res.data; }) }, /** 鏌ヨ鑰冩牳妯℃澘鍒楄〃 */ @@ -342,7 +309,7 @@ this.queryParams["end"] = this.daterangeCreateTime[1]; } listCheckTemplate(this.queryParams).then(response => { - this.checkTemplateList = response.data; + this.checkTemplateList = response.rows; this.total = response.total; this.loading = false; }); -- Gitblit v1.8.0