{"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\\EquipAttrbuteDefinition.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\bzzgj-fvue\\src\\views\\Device\\deviceManage\\components\\modle\\EquipAttrbuteDefinition.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//\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\r\nimport PhysicalModel from '@/api/device/PhysicalModel.js'\r\nimport EquipAttributeDialog from '@/views/Device/deviceManage/components/modle/EquipAttributeDialog'\r\nimport {TableMixin} from '@/mixins/tableMixin'\r\nimport dictUtils from '@/components/dict/DictSelectUtils.js'\r\nexport default {\r\n name: 'EquipAttrbuteDefinition',\r\n props: {\r\n parameterData: {\r\n type: Object,\r\n default: function() {\r\n return\r\n }\r\n }\r\n },\r\n components: {\r\n EquipAttributeDialog\r\n },\r\n mixins: [TableMixin],\r\n data() {\r\n return {\r\n pId: '',\r\n activeName: 'first',\r\n AttributeTableData: [],\r\n parameterID: {},\r\n dataFormarts: [],\r\n dataTypes: [],\r\n dataUnits: [],\r\n sortList: {}\r\n }\r\n },\r\n created() {\r\n this.parameterID = this.parameterData\r\n // 数据单位\r\n this.dataUnits = dictUtils.getDictItemsFromCache('bjdw')\r\n // 属性类型\r\n this.dataTypes = dictUtils.getDictItemsFromCache('sxlx')\r\n },\r\n methods: {\r\n // 修改\r\n handleUpdate(row) {\r\n // console.log(row.id)\r\n this.$refs.attributemodel.Update(row)\r\n },\r\n loadData(page) {\r\n console.log(this.parameterData.productId, 'res')\r\n if (page) {\r\n this.queryParam.pageBean.page = page\r\n }\r\n this.queryParam.querys = [\r\n {\r\n group: 'main',\r\n operation: 'EQUAL',\r\n parentGroup: '',\r\n property: 'productId',\r\n relation: 'AND',\r\n value: this.parameterData.productId\r\n }\r\n ]\r\n this.queryParam.sorter = [\r\n {\r\n direction: 'ASC',\r\n property: 'sn'\r\n }\r\n ]\r\n this.AttributeTableData = []\r\n PhysicalModel.attributeList(this.queryParam, res => {\r\n // console.log(res, 'res')\r\n this.total = res.total\r\n res.rows.sort((a, b) => {\r\n return a.sn - b.sn\r\n })\r\n this.AttributeTableData = res.rows\r\n this.AttributeTableData.forEach(e => {\r\n this.dataTypes.forEach(t => {\r\n if (t.value == e.dataType) {\r\n e.typeName = t.name\r\n }\r\n })\r\n this.dataUnits.forEach(x => {\r\n if (x.value == e.dataUnit) {\r\n e.dataUnitNane = x.name\r\n }\r\n })\r\n })\r\n this.$set(this.AttributeTableData)\r\n })\r\n },\r\n savePropertyf() {\r\n PhysicalModel.saveAttributeProperty(this.sortList, res => {\r\n if (res.state) {\r\n this.$notify({\r\n type: 'success',\r\n message: res.message,\r\n duration: 2000\r\n })\r\n this.loadData()\r\n } else {\r\n this.$message.warning(res.message)\r\n }\r\n })\r\n },\r\n insort(val) {\r\n let id = val.id\r\n let value = val.sn\r\n this.sortList[id] = value\r\n }\r\n }\r\n}\r\n",null]}