| | |
| | | </el-pagination> |
| | | </div> |
| | | <el-dialog title="数采配置" :visible.sync="dialogVisible3" width="920px" :before-close="closeForm"> |
| | | <el-form :model="configForm" :rules="rules" label-position="top" size="small" |
| | | <el-form :model="configForm" label-position="top" size="small" |
| | | ref="configForm" label-width="100px" class="demo-ruleForm"> |
| | | <div class="fomItem1"> |
| | | <el-form-item class="fomItemInput" label="检测的文件类型:" prop="fileType"> |
| | | <!-- <div class="fomItem1"> --> |
| | | <!-- <el-form-item class="fomItemInput" label="检测的文件类型:" prop="fileType"> |
| | | <el-select v-model="configForm.fileType" placeholder="请选择文件类型"> |
| | | <el-option v-for="item in fileTypeOptions" |
| | | :key="item.value" |
| | |
| | | </el-form-item> |
| | | <el-form-item class="fomItemInput" label="储存地址:" prop="storageUrl"> |
| | | <el-input v-model="configForm.storageUrl"></el-input> |
| | | </el-form-item> |
| | | </div> |
| | | </el-form-item> --> |
| | | <!-- </div> --> |
| | | <div class="fomItem1" |
| | | v-for="(domain, index) in domains" |
| | | :key="index"> |
| | |
| | | </el-form-item> |
| | | </div> |
| | | <div class="fomItem1"> |
| | | <el-form-item class="fomItemInput" label="公式:" prop="formula"> |
| | | <el-form-item class="fomItemInput" label="公式:"> |
| | | <el-input v-model="configForm.formula" @change="evalResult"></el-input> |
| | | </el-form-item> |
| | | </div> |
| | |
| | | current: 1, |
| | | size: 20, |
| | | }, |
| | | rules: { |
| | | fileType: [{ required: true, message: '请选择活动区域', trigger: 'change' }], |
| | | collectUrl: [{ required: true, message: '请填写采集地址', trigger: 'blur' }], |
| | | storageUrl: [{ required: true, message: '请填写储存地址', trigger: 'blur' }], |
| | | formula: [{ required: true, message: '请填写公式', trigger: 'blur' }], |
| | | }, |
| | | dialogVisible3:false, |
| | | configForm:{ |
| | | fileType: '', |
| | | collectUrl: '', |
| | | storageUrl: '', |
| | | formula: '', |
| | | }, |
| | | domains: [ |
| | |
| | | const data = res.data |
| | | if(data[0]) { |
| | | this.domains.splice(0, 1) |
| | | this.$set(this.configForm, 'fileType', data[0].fileType) |
| | | this.$set(this.configForm, 'collectUrl', data[0].collectUrl) |
| | | this.$set(this.configForm, 'storageUrl', data[0].storageUrl) |
| | | this.$set(this.configForm, 'formula', data[0].formula) |
| | | data.forEach(i => { |
| | | this.domains.push({ |
| | |
| | | } |
| | | }) |
| | | this.domains.forEach(i => { |
| | | i.fileType = this.configForm.fileType |
| | | i.collectUrl = this.configForm.collectUrl |
| | | i.storageUrl = this.configForm.storageUrl |
| | | if(i.x == '') { |
| | | i.x = null |
| | | } |
| | | if(i.y == '') { |
| | | i.y = null |
| | | } |
| | | i.formula = this.configForm.formula |
| | | i.deviceId = this.configForm.deviceId |
| | | i.insProductItem = this.configForm.insProductItem |
| | | }) |
| | | this.$axios.post(this.$api.deviceScope.saveDataAcquisitionConfiguration, {dataConfigList: JSON.parse(JSON.stringify(this.domains))},{headers: { |
| | | this.$axios.post(this.$api.deviceScope.saveDataAcquisitionConfiguration, {dataConfigList: this.domains},{headers: { |
| | | 'Content-Type': 'application/json' |
| | | }}).then(res => { |
| | | this.dialogVisible3 = false |