| | |
| | | </el-upload> |
| | | </div> |
| | | </el-form-item> |
| | | <el-form-item label="检测的文件类型:" required> |
| | | <el-select :disabled="isUp" v-model="formData.fileType" placeholder="请选择文件类型" clearable> |
| | | <el-option v-for="item in fileTypeOptions" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="采集地址:" required clearable> |
| | | <el-input :disabled="isUp" v-model="formData.collectUrl"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="储存地址:"> |
| | | <el-input :disabled="isUp" v-model="formData.storageUrl"></el-input> |
| | | </el-form-item> |
| | | </el-form> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | </el-upload> |
| | | </div> |
| | | </el-form-item> |
| | | <el-form-item label="检测的文件类型:" required> |
| | | <el-select v-model="formData.fileType" placeholder="请选择文件类型" clearable> |
| | | <el-option v-for="item in fileTypeOptions" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="采集地址:" required clearable> |
| | | <el-input v-model="formData.collectUrl"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="储存地址:"> |
| | | <el-input v-model="formData.storageUrl"></el-input> |
| | | </el-form-item> |
| | | </el-form> |
| | | </el-col> |
| | | </el-row> |
| | |
| | | </el-row> |
| | | </span> |
| | | </el-dialog> |
| | | <dataAcquisitionConfig v-if="showData" :tableList="tableList"/> |
| | | <dataAcquisitionConfig v-if="showData" :deviceId="deviceId"/> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | }, |
| | | data() { |
| | | return { |
| | | deviceId: '', |
| | | fileTypeOptions: [ |
| | | {label: 'csv', value: '.csv'}, |
| | | {label: 'db', value: '.db'}, |
| | |
| | | font: '档案修订', |
| | | type: 'text', |
| | | method: 'isUpdate' |
| | | }, { |
| | | id: 'handleConfig', |
| | | font: '数采配置', |
| | | type: 'text', |
| | | method: 'handleConfig', |
| | | disabFun: (row, index) => { |
| | | return row.insProductItem === '' |
| | | } |
| | | }], |
| | | } |
| | | // , { |
| | | // id: 'handleConfig', |
| | | // font: '数采配置', |
| | | // type: 'text', |
| | | // method: 'handleConfig', |
| | | // disabFun: (row, index) => { |
| | | // return row.insProductItem === '' |
| | | // } |
| | | // } |
| | | ], |
| | | headNoShow:['enDeviceName'], |
| | | tagField: { |
| | | deviceStatus: { |
| | |
| | | } |
| | | }, |
| | | requiredAdd: [], |
| | | requiredUp: [] |
| | | requiredUp: [], |
| | | needSort: ['deviceName', 'acquisitionDate', 'activationDate', 'lastCalibrationDate', 'nextCalibrationDate', 'deviceStatus'], |
| | | }, |
| | | entityCopy: {}, |
| | | upIndex: 0, |
| | |
| | | this.subordinateDepartmentsList = data |
| | | }) |
| | | }, |
| | | refreshTable() { |
| | | this.$refs['ValueTable'].selectList() |
| | | refreshTable(e) { |
| | | this.$refs['ValueTable'].selectList(e) |
| | | }, |
| | | refresh() { |
| | | this.componentData.entity = this.HaveJson(this.entityCopy) |
| | |
| | | config = true |
| | | } |
| | | } |
| | | if (!config) { |
| | | this.componentData.do.splice(2, 1) |
| | | } |
| | | if (!up) { |
| | | this.componentData.do.splice(1, 1) |
| | | } |
| | | if (!del) { |
| | | this.componentData.do.splice(0, 1) |
| | | } |
| | | this.addPower = add |
| | | }, |
| | | // if (!config) { |
| | | // this.componentData.do.splice(2, 1) |
| | | // } |
| | | if (!up) { |
| | | this.componentData.do.splice(1, 1) |
| | | } |
| | | if (!del) { |
| | | this.componentData.do.splice(0, 1) |
| | | } |
| | | this.addPower = add |
| | | }, |
| | | // 获取字典 |
| | | selectEnumByCategory() { |
| | | this.$axios.post(this.$api.enums.selectEnumByCategory, { |
| | |
| | | this.$message.error('未输入校准周期(月)') |
| | | return |
| | | } |
| | | if(!this.formData.fileType){ |
| | | this.$message.error('未选择文件后缀!') |
| | | return |
| | | } |
| | | if(!this.formData.collectUrl){ |
| | | this.$message.error('请输入采集地址!') |
| | | return |
| | | } |
| | | delete this.formData.createTime |
| | | delete this.formData.updateTime |
| | | delete this.formData.createUser |
| | |
| | | } |
| | | this.$message.success('修改成功') |
| | | this.upLoad = false |
| | | this.refreshTable() |
| | | this.refreshTable('page') |
| | | this.dialogVisible = false |
| | | }).catch(e => { |
| | | this.$message.error('修改失败') |
| | |
| | | this.$message.error('未输入启用日期') |
| | | return |
| | | } |
| | | if(!this.formData2.deviceStatus){ |
| | | if(this.formData2.deviceStatus==='' || this.formData2.deviceStatus===null){ |
| | | this.$message.error('未选择当前状态') |
| | | return |
| | | } |
| | |
| | | this.$message.error('输入校准周期(月)') |
| | | return |
| | | } |
| | | if(!this.formData2.fileType){ |
| | | this.$message.error('未选择文件后缀!') |
| | | return |
| | | } |
| | | if(!this.formData2.collectUrl){ |
| | | this.$message.error('请输入采集地址!') |
| | | return |
| | | } |
| | | this.upLoad2 = true; |
| | | this.formData2.insProductIds = this.formData2.insProductIds.join() |
| | | this.formData2.insProductIds = this.formData2.insProductIds?this.formData2.insProductIds.join():'' |
| | | this.$axios.post(this.$api.deviceScope.addDeviceParameter, this.formData2, { |
| | | headers: { |
| | | 'Content-Type': 'application/json' |
| | |
| | | } |
| | | this.$message.success('提交成功') |
| | | this.upLoad2 = false |
| | | this.refreshTable() |
| | | this.refreshTable('page') |
| | | this.dialogVisible2 = false |
| | | this.formData2 = { |
| | | imageUpload: '', |
| | |
| | | list2.push(obj) |
| | | }) |
| | | this.tableList = list2 |
| | | this.deviceId = row.id |
| | | }, |
| | | closeDataVue () { |
| | | this.showData = false |
| | |
| | | return |
| | | } |
| | | this.$message.success('操作成功') |
| | | this.refreshTable() |
| | | this.refreshTable('page') |
| | | this.dialogVisible3 = false |
| | | }).catch(e => { |
| | | this.$message.error('操作失败') |