{"remainingRequest":"D:\\jenkins\\workspace\\bzzgj-fvue\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\bzzgj-fvue\\src\\views\\Device\\deviceManage\\components\\modle\\AttrbuteDefinition.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\bzzgj-fvue\\src\\views\\Device\\deviceManage\\components\\modle\\AttrbuteDefinition.vue","mtime":1687861172289},{"path":"D:\\jenkins\\workspace\\bzzgj-fvue\\node_modules\\babel-loader\\lib\\index.js","mtime":315532800000},{"path":"D:\\jenkins\\workspace\\bzzgj-fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\bzzgj-fvue\\node_modules\\vue-loader\\lib\\index.js","mtime":499162500000}],"contextDependencies":[],"result":["//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\nimport PhysicalModel from '@/api/device/PhysicalModel.js'\nimport attributeDialog from '@/views/Device/deviceManage/components/modle/attributeDialog'\nimport {\n\tTableMixin\n} from '@/mixins/tableMixin'\nimport dictUtils from '@/components/dict/DictSelectUtils.js'\nexport default {\n\tname: 'AttrbuteDefinition',\n\tprops: {\n\t\tparameterData: {\n\t\t\ttype: Object,\n\t\t\tdefault: function() {\n\t\t\t\treturn\n\t\t\t}\n\t\t}\n\t},\n\tcomponents: {\n\t\tattributeDialog\n\t},\n\tmixins: [TableMixin],\n\tdata() {\n\t\treturn {\n\t\t\turl: {\n\t\t\t\tdelete: '/device/metadata/properties/'\n\t\t\t},\n\t\t\tpId: '',\n\t\t\tactiveName: 'first',\n\t\t\tAttributeTableData: [],\n\t\t\tparameterID: {},\n\t\t\tdataTypes: [],\n\t\t\tdataUnits: [],\n\t\t\tsortList: {}\n\t\t}\n\t},\n\tcreated() {\n\t\tthis.parameterID = this.parameterData\n\t\t// 数据单位\n\t\tthis.dataUnits = dictUtils.getDictItemsFromCache('sjdw')\n\t\t// 属性类型\n\t\tthis.dataTypes = dictUtils.getDictItemsFromCache('sxlx')\n\t},\n\tmethods: {\n\t\t// 新增\n\t\tAddAttribute() {\n\t\t\tthis.$refs.attributemodel.addShow()\n\t\t},\n\t\t// 修改\n\t\thandleUpdate(row) {\n\t\t\t// console.log(row.id)\n\t\t\tthis.$refs.attributemodel.Update(row)\n\t\t},\n\t\tloadData(page) {\n\t\t\tif (page) {\n\t\t\t\tthis.queryParam.pageBean.page = page\n\t\t\t}\n\t\t\tthis.queryParam.querys = [{\n\t\t\t\tgroup: 'main',\n\t\t\t\toperation: 'EQUAL',\n\t\t\t\tparentGroup: '',\n\t\t\t\tproperty: 'productId',\n\t\t\t\trelation: 'AND',\n\t\t\t\tvalue: this.parameterData.id\n\t\t\t}]\n\t\t\tthis.queryParam.sorter = [{\n\t\t\t\tdirection: 'ASC',\n\t\t\t\tproperty: 'sn'\n\t\t\t}]\n\t\t\tthis.AttributeTableData = []\n\t\t\tPhysicalModel.attributeList(this.queryParam, res => {\n\t\t\t\t// console.log(res, 'res')\n\t\t\t\tthis.total = res.total\n\t\t\t\tres.rows.sort((a, b) => {\n\t\t\t\t\treturn a.sn - b.sn\n\t\t\t\t})\n\t\t\t\tthis.AttributeTableData = res.rows\n\t\t\t\tthis.AttributeTableData.forEach(e => {\n\t\t\t\t\tthis.dataTypes.forEach(t => {\n\t\t\t\t\t\tif (t.value == e.dataType) {\n\t\t\t\t\t\t\te.typeName = t.name\n\t\t\t\t\t\t}\n\t\t\t\t\t})\n\t\t\t\t\tif (!!e.dataUnit) {\n\t\t\t\t\t\tthis.dataUnits.forEach(x => {\n\t\t\t\t\t\t\tif (x.value == e.dataUnit) {\n\t\t\t\t\t\t\t\te.dataUnitNane = x.name\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t})\n\t\t\t\t\t}\n\t\t\t\t})\n\t\t\t\tthis.$set(this.AttributeTableData)\n\t\t\t})\n\t\t},\n\t\tsavePropertyf() {\n\t\t\tPhysicalModel.saveAttributeProperty(this.sortList, res => {\n\t\t\t\tif (res.state) {\n\t\t\t\t\tthis.$notify({\n\t\t\t\t\t\ttype: 'success',\n\t\t\t\t\t\tmessage: res.message,\n\t\t\t\t\t\tduration: 2000\n\t\t\t\t\t})\n\t\t\t\t\tthis.loadData()\n\t\t\t\t} else {\n\t\t\t\t\tthis.$message.warning(res.message)\n\t\t\t\t}\n\t\t\t})\n\t\t},\n\t\tinsort(val) {\n\t\t\tlet id = val.id\n\t\t\tlet value = val.sn\n\t\t\tthis.sortList[id] = value\n\t\t}\n\t}\n}\n",null]}