| | |
| | | </el-button> |
| | | </div> |
| | | </div> |
| | | <el-table :data="paramData" class="l-mes" height="600"> |
| | | <!-- <paramMergeTemplate |
| | | :tableData="paramData" |
| | | :page="{}" |
| | | > |
| | | </paramMergeTemplate> --> |
| | | <component |
| | | :is="paramMergeTemplate" |
| | | :tableData="paramData" |
| | | :routingTemplateId="routingTemplateId" |
| | | ></component> |
| | | <!-- <el-table :data="paramData" class="l-mes" height="600"> |
| | | <el-table-column |
| | | label="参数项" |
| | | prop="parameterItem" |
| | |
| | | </el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </el-table> --> |
| | | </el-card> |
| | | </el-tab-pane> |
| | | </el-tabs> |
| | |
| | | } from '@/api/technology/routing' |
| | | import { fetchList as getBomList } from '@/api/technology/completeproductstructure' |
| | | import { getByOperation } from '@/api/aps/capability' |
| | | import { fetchListByFather} from '@/api/basic/param' |
| | | import { remote } from '@/api/admin/dict' |
| | | import diagram from './diagram' |
| | | import operationDialog from '@/views/common/operation.vue' |
| | |
| | | import ElRow from 'element-ui/packages/row/src/row' |
| | | import ElCol from 'element-ui/packages/col/src/col' |
| | | import { getOperationParam } from '../../../api/basic/template' |
| | | import paramMergeTemplate from '../../common/param-mergeTemplate.vue' |
| | | import zttdraggable from 'vuedraggable' |
| | | |
| | | const capabilityArray = [ |
| | |
| | | export default { |
| | | data() { |
| | | return { |
| | | paramMergeTemplate: '', |
| | | itemKey: '', |
| | | typeOptions: [], |
| | | paramTemplateSelArr: [], |
| | |
| | | operationPartDialog, |
| | | RichText, |
| | | editRoutingOperation, |
| | | zttdraggable |
| | | zttdraggable, |
| | | paramMergeTemplate |
| | | }, |
| | | mounted() { |
| | | window.addEventListener( |
| | |
| | | ).then((response) => { |
| | | if (response.data.data.length > 0) { |
| | | this.paramData = response.data.data |
| | | this.paramMergeTemplate = 'paramMergeTemplate' |
| | | } else { |
| | | this.paramData = [] |
| | | } |
| | |
| | | |
| | | // 模板参数的选中结果返回 |
| | | selectTemplateParam(param) { |
| | | // console.log(param); |
| | | // let idList=[] |
| | | // param.forEach(item=>{ |
| | | // idList.push(item.id) |
| | | // }) |
| | | // console.log(idList); |
| | | // let formData=new FormData() |
| | | // formData.append("idList",idList) |
| | | // fetchListByFather(formData).then((res) => { |
| | | // console.log(res); |
| | | // }) |
| | | if (param.length > 0) { |
| | | const paramrrs = { |
| | | id: this.dataForm.id, |
| | |
| | | const data = response.data |
| | | if (data.code == 0) { |
| | | const newParams = response.data.data |
| | | for (let i = 0; i < newParams.length; i++) { |
| | | this.paramData.push(newParams[i]) |
| | | } |
| | | console.log(newParams); |
| | | this.$message.success('添加成功') |
| | | } else { |
| | | this.$message.error('添加失败') |
| | |
| | | }, |
| | | // 保存所有参数的修改 |
| | | saveAllParamChange() { |
| | | const paramJson = { routingOperationParam: this.paramData } |
| | | let data = [] |
| | | this.paramData.forEach(ele=>{ |
| | | let o = { |
| | | id: null, |
| | | paramValue: ele.paramValue |
| | | } |
| | | if(ele.threeId && ele.threeId != 'null'){ |
| | | o.id = ele.threeId |
| | | }else{ |
| | | if(ele.twoId && ele.twoId != 'null'){ |
| | | o.id = ele.twoId |
| | | }else{ |
| | | o.id = ele.oneId |
| | | } |
| | | } |
| | | data.push(o) |
| | | }) |
| | | const paramJson = { routingOperationParam: data } |
| | | putRoutingTemplateParam(paramJson).then((response) => { |
| | | const data = response.data |
| | | if (data.code == 0) { |