| | |
| | | |
| | | <el-table-column label="单位" prop="unit" align="center"> |
| | | </el-table-column> |
| | | <el-table-column label="操作" align="center" |
| | | <el-table-column label="操作" align="center" |
| | | v-if="permissions.technology_operationtemplate_param_edit"> |
| | | <template slot-scope="scope"> |
| | | <el-button |
| | |
| | | } |
| | | ], |
| | | toolbar: [], |
| | | operator: [ |
| | | { |
| | | text: '删除', |
| | | icon: 'el-icon-delete', |
| | | type: 'text', |
| | | size: 'small', |
| | | fun: this.deleteHandle |
| | | } |
| | | ], |
| | | operator: null, |
| | | operatorConfig: { |
| | | fixed: 'right', |
| | | label: '操作', |
| | |
| | | ttable, |
| | | TableForm, |
| | | ParamDialog |
| | | }, |
| | | created(){ |
| | | if(this.permissions.technology_operationtemplate_del){ |
| | | this.table.operator = [ |
| | | { |
| | | text: '删除', |
| | | icon: 'el-icon-delete', |
| | | type: 'text', |
| | | size: 'small', |
| | | fun: this.deleteHandle |
| | | } |
| | | ] |
| | | } |
| | | }, |
| | | computed: { |
| | | ...mapGetters(['permissions']) |
| | |
| | | }, |
| | | // 删除 |
| | | deleteHandle(row) { |
| | | if(!this.permissions.technology_operationtemplate_del){ |
| | | this.$message.error("该角色没有操作权限") |
| | | return |
| | | } |
| | | this.$confirm('是否确认删除模板编号为' + row.templateNo, '提示', { |
| | | confirmButtonText: '确定', |
| | | cancelButtonText: '取消', |
| | |
| | | var obj = {} |
| | | obj.technologyOperationParamId = row.id |
| | | obj.technologyOperationTemplateId = row.technologyOperationTemplateId |
| | | if(row.defaultValue!=null){ |
| | | row.defaultValue=row.defaultValue.replace(',',',').replace('(','(').replace(')',')') |
| | | if (!isNaN(row.defaultValue)) { |
| | | row.defaultValue='='+row.defaultValue |
| | | } |
| | | } |
| | | obj.defaultValue = row.defaultValue |
| | | putRelateOperationParamTemplate(obj).then((response) => { |
| | | this.$message.success('参数保存成功') |