| | |
| | | <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">富顺县,荣县,高新区,自流井区,贡井区,大安区,沿滩区</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 |
| | |
| | | <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"> |
| | |
| | | <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: '荣县', |
| | | },{ |
| | | 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: [], |
| | | // 临时规则表单 |
| | |
| | | }, |
| | | 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) { |
| | |
| | | }) |
| | | }, |
| | | // 运维公司下拉数据 |
| | | selectUnit() { |
| | | unitSelect().then(res => { |
| | | this.unitList = res.data; |
| | | areaSelect() { |
| | | areaSelect().then(res => { |
| | | this.areaList = res.data; |
| | | }) |
| | | }, |
| | | /** 查询考核模板列表 */ |
| | |
| | | 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; |
| | | }); |