Explorar el Código

设备档案卡房间改为房间名号

luoaoxuan hace 1 año
padre
commit
519ff3320c

+ 2 - 2
src/views/component/device/deviceDialog.vue

@@ -950,9 +950,9 @@ export default {
         'form.cunFangWeiZhi': {
         'form.cunFangWeiZhi': {
             async handler (val) {
             async handler (val) {
                 if (!val) return
                 if (!val) return
-                const sql = `select fang_jian_ming_ from t_jjqfjb where id_='${val}'`
+                const sql = `select fang_jian_ming_ha from t_jjqfjb where id_='${val}'`
                 const { variables: { data }} = await this.$common.request('sql', sql)
                 const { variables: { data }} = await this.$common.request('sql', sql)
-                this.form.cunFangDiDian = data[0].fang_jian_ming_
+                this.form.cunFangDiDian = data[0].fang_jian_ming_ha
             }
             }
         },
         },
         'form.sheBeiMingChen': {
         'form.sheBeiMingChen': {

+ 3 - 3
src/views/component/device/index.vue

@@ -1290,7 +1290,7 @@ export default {
         handlePositionInfo (list, positionList) {
         handlePositionInfo (list, positionList) {
             list.forEach(element => {
             list.forEach(element => {
                 if (element.cunFangDiDian !== '') {
                 if (element.cunFangDiDian !== '') {
-                    const postion = positionList.find(i => i.fang_jian_ming_ === element.cunFangDiDian.trim())
+                    const postion = positionList.find(i => (i.fang_jian_ming_ha.trim() || '') === element.cunFangDiDian.trim())
                     if (postion) {
                     if (postion) {
                         const positionId = postion.id_
                         const positionId = postion.id_
                         element.cunFangWeiZhi = positionId
                         element.cunFangWeiZhi = positionId
@@ -1352,7 +1352,7 @@ export default {
             })
             })
             const currentPosition = this.level
             const currentPosition = this.level
             const { userList = [], deptList = [] } = this.$store.getters || {}
             const { userList = [], deptList = [] } = this.$store.getters || {}
-            const positionSql = `select id_,fang_jian_ming_ from t_jjqfjb where di_dian_ = ${currentPosition}` // 房间信息
+            const positionSql = `select id_,fang_jian_ming_ha from t_jjqfjb where di_dian_ = ${currentPosition}` // 房间信息
             const supplierSql = `select id_,gong_ying_shang_m from t_gysxxb where di_dian_ = ${currentPosition}` // 供应商信息
             const supplierSql = `select id_,gong_ying_shang_m from t_gysxxb where di_dian_ = ${currentPosition}` // 供应商信息
             const deviceGroupSql = `select id_,suo_shu_bu_men_,wei_hu_gang_wei_ from t_sbwhgwpzb where di_dian_ =  ${currentPosition}` // 设备分组信息
             const deviceGroupSql = `select id_,suo_shu_bu_men_,wei_hu_gang_wei_ from t_sbwhgwpzb where di_dian_ =  ${currentPosition}` // 设备分组信息
             const currentTime = dayjs().format('YYYY-MM-DD HH:mm')
             const currentTime = dayjs().format('YYYY-MM-DD HH:mm')
@@ -1502,7 +1502,7 @@ export default {
             })
             })
             const currentPosition = this.level
             const currentPosition = this.level
             const { userList = [], deptList = [] } = this.$store.getters || {}
             const { userList = [], deptList = [] } = this.$store.getters || {}
-            const positionSql = `select id_,fang_jian_ming_ from t_jjqfjb where di_dian_ = ${currentPosition}` // 房间信息
+            const positionSql = `select id_,fang_jian_ming_ha from t_jjqfjb where di_dian_ = ${currentPosition}` // 房间信息
             const supplierSql = `select id_,gong_ying_shang_m from t_gysxxb where di_dian_ = ${currentPosition}` // 供应商信息
             const supplierSql = `select id_,gong_ying_shang_m from t_gysxxb where di_dian_ = ${currentPosition}` // 供应商信息
             const deviceGroupSql = `select id_,suo_shu_bu_men_,wei_hu_gang_wei_ from t_sbwhgwpzb where di_dian_ =  ${currentPosition}` // 设备分组信息
             const deviceGroupSql = `select id_,suo_shu_bu_men_,wei_hu_gang_wei_ from t_sbwhgwpzb where di_dian_ =  ${currentPosition}` // 设备分组信息
             const currentTime = dayjs().format('YYYY-MM-DD HH:mm')
             const currentTime = dayjs().format('YYYY-MM-DD HH:mm')