| | |
| | | ></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> |
| | |
| | | </div> |
| | | </div> |
| | | <div> |
| | | <!-- <paramMergeTemplate :key="isShowTree" :tableTreeData="paramData" :routingTemplateId="routingTemplateId"/> --> |
| | | <component |
| | | :is="paramMergeTemplate" |
| | | :key="isShowTree" |
| | | :tableTreeData="paramData" |
| | | :routingTemplateId="routingTemplateId" |
| | | :handleParamDelete="handleParamDelete" |
| | | ></component> |
| | | </div> |
| | | <!-- <paramMergeTemplate |
| | | :tableData="paramData" |
| | | :page="{}" |
| | | > |
| | | </paramMergeTemplate> --> |
| | | <!-- <component |
| | | :is="paramMergeTemplate" |
| | | :key="isShowTree" |
| | | :tableData="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> --> |
| | | </el-card> |
| | | </el-tab-pane> |
| | | </el-tabs> |
| | |
| | | }else{ |
| | | this.isShowTree=true |
| | | } |
| | | console.log(this.isShowTree); |
| | | this.paramData=[] |
| | | this.getRoutingTemplateParam(row.id) |
| | | }, |
| | |
| | | |
| | | // 删除参数 |
| | | 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 |