匹配不上使用'/'替换

dhy
吕天方 1 year ago
parent d4c37c7945
commit 8be9fedb11

@ -2,7 +2,7 @@
# @Author: 张涛
# @Date: 2023-07-18 13:04:50
# @LastEditors: JC9527
# @LastEditTime: 2023-10-10 15:17:22
# @LastEditTime: 2023-10-11 08:53:18
# @FilePath: \Mudu2PC\.env.development
###
# 页面标题

@ -4,6 +4,8 @@ import DataDict from '@/utils/dict'
import { getDicts as getDicts } from '@/api/system/dict/data'
function searchDictByKey(dict, key) {
// console.log(dict,'dict')
// console.log(key,'key')
if (key == null && key == "") {
return null
}
@ -31,6 +33,8 @@ function install() {
} else {
return new Promise((resolve, reject) => {
getDicts(dictMeta.type).then(res => {
// console.log(res,'字典数据')
// console.log(dictMeta,'dictMeta')
store.dispatch('dict/setDict', { key: dictMeta.type, value: res.data })
resolve(res.data)
}).catch(error => {

@ -61,7 +61,15 @@ export default {
//
if(!Array.isArray(this.value)){
if(this.options.some(v=> v.value == this.value )) return false;
this.unmatchArray.push(this.value);
let str;
this.options.forEach((item)=>{
if(item.label == this.value) {
str = this.value
} else {
str = '/'
}
})
this.unmatchArray.push(str);
return true;
}
// Array

@ -161,7 +161,7 @@
header-align="center"
>
<template slot-scope="scope">
<span>{{ componendDistrict(scope.row.subdistrict) || '/' }}</span>
<span>{{ componendDistrict(scope.row.subdistrict)}}</span>
</template>
</el-table-column>
<el-table-column
@ -201,7 +201,7 @@
<template slot-scope="scope">
<dict-tag
:options="dict.type.major_hazard_level"
:value="scope.row.majorHazardLevel"
:value="scope.row.majorHazardLevel == 'null' ? '/':scope.row.majorHazardLevel"
>
</dict-tag>
</template>
@ -715,7 +715,7 @@ export default {
let arr2 = [];
let keyCount = 0;
this.multipleSelection.map((item) => {
arr.push('0' + item.subdistrict);
arr.push(item.subdistrict);
arr2.push(item.uscCode);
if (item.isPoint == "1") {
keyCount++;

@ -4,7 +4,7 @@
* @Author: JC9527
* @Date: 2023-09-04 10:20:06
* @LastEditors: JC9527
* @LastEditTime: 2023-10-10 10:08:28
* @LastEditTime: 2023-10-10 16:14:06
-->
<template>
<div class="plan-management">
@ -341,7 +341,7 @@
} else {
if(this.form.district.length == 2) {
district = this.form.district[1].slice(0, 11);
} else {
} else if(this.form.district.length == 1){
district = this.form.district[0].slice(0, 8);
}
}

Loading…
Cancel
Save