shuishen
2025-01-19 0447d7addbb89b0c57c1918c28ac7822b233454e
警力资源名称为空的显示处理
1 files modified
22 ■■■■ changed files
src/views/police/index.vue 22 ●●●● patch | view | raw | blame | history
src/views/police/index.vue
@@ -2,7 +2,7 @@
 * @Author: shuishen 1109946754@qq.com
 * @Date: 2022-08-18 16:18:17
 * @LastEditors: shuishen 1109946754@qq.com
 * @LastEditTime: 2025-01-18 21:49:33
 * @LastEditTime: 2025-01-19 18:21:14
 * @FilePath: \srs-police-affairs\src\views\police\index.vue
 * @Description: 辖区管理
 * 
@@ -324,16 +324,18 @@
        }).then(res => {
          if (res.data.data && res.data.data.length > 0) {
            let arrAll = res.data.data.map(item => {
              let newName = ''
              if (params.type == 0) {
                newName = item.name.replace('上饶-', '')
              } else if (params.type == 2 || params.type == 3) {
                newName = item.name
              } else {
                if (item.name.charAt(7) == '-') {
                  newName = item.name.slice(8)
              let newName = '--'
              if (item.name != null) {
                if (params.type == 0) {
                  newName = item.name.replace('上饶-', '')
                } else if (params.type == 2 || params.type == 3) {
                  newName = item.name
                } else {
                  newName = item.name.slice(7)
                  if (item.name.charAt(7) == '-') {
                    newName = item.name.slice(8)
                  } else {
                    newName = item.name.slice(7)
                  }
                }
              }