| | |
| | | v-for="item in descriptionOptions" |
| | | :key="item.guid" |
| | | :label="item.description" |
| | | :value="item.guid" |
| | | :value="item.description" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | |
| | | watch: { |
| | | fileList: { |
| | | handler(newFileList, oldFileList) { |
| | | console.log('newFileList', newFileList); |
| | | // 图片校验 |
| | | this.pictureValidate(); |
| | | }, |
| | |
| | | }, |
| | | adviseOptions() { |
| | | var problemGuid = this.currProTypeGuid || this.problem.guid; |
| | | console.log("problemGuid", problemGuid); |
| | | |
| | | var array = this.suggestions.filter((item) => item.adProblemtypeguid == problemGuid); |
| | | console.log("array", array); |
| | | return array; |
| | | } |
| | | }, |
| | |
| | | // 将一个js对象中所有di,wi,pi开头的属性全部改成去掉这些前缀并且重新变为驼峰式命名 |
| | | const newObj = {}; |
| | | for (const key in obj) { |
| | | if (obj.hasOwnProperty(key)) { |
| | | let newKey = key; |
| | | let newKey = key; |
| | | if (key.startsWith('di')) { |
| | | newKey = key.substring(2); |
| | | } else if (key.startsWith('wi')) { |
| | |
| | | } |
| | | newKey = newKey.charAt(0).toLowerCase() + newKey.slice(1); |
| | | newObj[newKey] = obj[key]; |
| | | } |
| | | } |
| | | return newObj; |
| | | }, |
| | |
| | | this.saveStatus(newDevice, statusItem); |
| | | newDevice.dlLocation = statusItem.dlLocation; |
| | | newDevice.topTypeId = topTypeId; |
| | | console.log('newDevice.topTypeId', newDevice.topTypeId); |
| | | console.log('newDevice', newDevice); |
| | | |
| | | this.deviceImgObjList.push(newDevice); |
| | | } |
| | |
| | | }, |
| | | initOptions() { |
| | | if (this.problem == undefined || this.problem == null) { |
| | | this.problem = {}; |
| | | this.deepCopyProblem = {}; |
| | | } else { |
| | | this.deepCopyProblem = useCloned(this.problem).cloned.value; |
| | |
| | | return result; |
| | | }, |
| | | changeProblemname() { |
| | | if (this.proRemark == null || this.proRemark == '') { |
| | | if (!this.proRemark || this.proRemark == null || this.proRemark == '') { |
| | | this.deepCopyProblem.problemname = this.deepCopyProblem.description; |
| | | } else { |
| | | this.deepCopyProblem.problemname = |
| | |
| | | this.deepCopyProblem.description = ''; |
| | | this.deepCopyProblem.advise = ''; |
| | | }, |
| | | findProByProDesName(name) { |
| | | let result |
| | | this.problemTypeList.forEach(item=>{ |
| | | if (item.description == name) { |
| | | result = item; |
| | | } |
| | | }) |
| | | return result |
| | | }, |
| | | onProDesChange(value) { |
| | | let currPro = this.findProTypeByGuid(value); |
| | | let currPro = this.findProByProDesName(value) |
| | | this.deepCopyProblem.advise = ''; |
| | | this.currProTypeGuid = value; |
| | | this.currProTypeGuid = currPro.guid; |
| | | // this.deepCopyProblem.description = currPro.description; |
| | | this.changeProblemname(); |
| | | this.deepCopyProblem.advise = ''; |
| | |
| | | } |
| | | exclude = false; |
| | | // picUrls.push(item) |
| | | } else { |
| | | } |
| | | }); |
| | | if (this.type == 1) { |
| | |
| | | const deepCopySubTask = useCloned(this.subtask).cloned.value; |
| | | const that = this; |
| | | fileUtil.getImageFiles(picUrls, function (files) { |
| | | console.log('deepCopySubTask', deepCopySubTask); |
| | | deepCopyPro.insGuid = deepCopySubTask.insGuid; |
| | | delete deepCopyPro['advise']; |
| | | delete deepCopyPro['description']; |