| | |
| | | ></rich-text> |
| | | </div> |
| | | </el-tab-pane> |
| | | <el-tab-pane label="工序参数" style="height: 100%"> |
| | | <el-tab-pane v-if="dataForm.id!=null" label="工序参数" style="height: 100%"> |
| | | <el-card class="params-template"> |
| | | <div slot="header"> |
| | | <span>参数集</span> |
| | |
| | | </el-button> |
| | | </div> |
| | | </div> |
| | | <!-- <paramMergeTemplate |
| | | :tableData="paramData" |
| | | :page="{}" |
| | | > |
| | | </paramMergeTemplate> --> |
| | | <component |
| | | <div> |
| | | <component |
| | | :is="paramMergeTemplate" |
| | | :tableData="paramData" |
| | | :key="isShowTree" |
| | | :tableTreeData="paramData" |
| | | :routingTemplateId="routingTemplateId" |
| | | ></component> |
| | | <!-- <el-table :data="paramData" class="l-mes" height="600"> |
| | | <el-table-column |
| | | label="参数项" |
| | | prop="parameterItem" |
| | | align="center" |
| | | > |
| | | <template slot-scope="scope"> |
| | | <span |
| | | >{{ scope.row.parameterItem }}({{ |
| | | scope.row.unit |
| | | }})</span |
| | | > |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | label="参数类型" |
| | | prop="type" |
| | | align="center" |
| | | :formatter="getParam" |
| | | > |
| | | </el-table-column> |
| | | <el-table-column label="值" prop="paramValue" align="center"> |
| | | <template slot-scope="scope"> |
| | | <el-input |
| | | v-model="scope.row.paramValue" |
| | | placeholder="值" |
| | | :disabled="!editable" |
| | | ></el-input> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="操作" align="center"> |
| | | <template slot-scope="scope"> |
| | | <el-button |
| | | type="text" |
| | | size="mini" |
| | | v-if="editable && routingTemplateId != null" |
| | | @click.stop="handleParamDelete(scope.row, scope.$index)" |
| | | >删除 |
| | | </el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> --> |
| | | :handleParamDelete="handleParamDelete" |
| | | ></component> |
| | | </div> |
| | | </el-card> |
| | | </el-tab-pane> |
| | | </el-tabs> |
| | |
| | | return { |
| | | paramMergeTemplate: '', |
| | | itemKey: '', |
| | | isShowTree: false, |
| | | typeOptions: [], |
| | | paramTemplateSelArr: [], |
| | | paramTemplateSelCol: 'operationTemplateNo', |
| | |
| | | }, |
| | | // 参数集模板点击事件 |
| | | templateRowClick(row) { |
| | | if(this.isShowTree){ |
| | | this.isShowTree=false |
| | | }else{ |
| | | this.isShowTree=true |
| | | } |
| | | this.paramData=[] |
| | | this.getRoutingTemplateParam(row.id) |
| | | }, |
| | | // 根据工艺、工序id、模板id去获取模板下的参数 |
| | |
| | | }) |
| | | ).then((response) => { |
| | | if (response.data.data.length > 0) { |
| | | this.paramData = [] |
| | | this.paramData = response.data.data |
| | | this.paramMergeTemplate = 'paramMergeTemplate' |
| | | } else { |
| | |
| | | |
| | | // 删除参数 |
| | | handleParamDelete(row, index) { |
| | | this.$confirm('是否确认删除参数项为' + row.parameterItem, '提示', { |
| | | this.$confirm('是否确认删除参数项为【' + row.paramItem +'】的数据?', '提示', { |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | | type: 'warning' |
| | | }) |
| | | .then(function() { |
| | | return deleteRoutingTemplateParam(row.id) |
| | | let id = null |
| | | if(row.treeId && row.treeId!='null'){ |
| | | id = row.treeId |
| | | }else{ |
| | | if(row.twoId && row.twoId!='null'){ |
| | | id = row.twoId |
| | | }else{ |
| | | id = row.oneId |
| | | } |
| | | } |
| | | return deleteRoutingTemplateParam(id) |
| | | }) |
| | | .then((response) => { |
| | | const data = response.data |