|
@@ -74,9 +74,8 @@
|
|
|
plain
|
|
plain
|
|
|
icon="el-icon-delete"
|
|
icon="el-icon-delete"
|
|
|
size="mini"
|
|
size="mini"
|
|
|
- :disabled="multiple"
|
|
|
|
|
@click="handleDelete"
|
|
@click="handleDelete"
|
|
|
- v-hasPermi="['mes:hw:type:remove']"
|
|
|
|
|
|
|
+ v-hasPermi="['mes:hw:type:batchremove']"
|
|
|
>批量删除</el-button
|
|
>批量删除</el-button
|
|
|
>
|
|
>
|
|
|
</el-col>
|
|
</el-col>
|
|
@@ -250,6 +249,7 @@ export default {
|
|
|
form: {
|
|
form: {
|
|
|
parentTypeId:0
|
|
parentTypeId:0
|
|
|
},
|
|
},
|
|
|
|
|
+ EditId:null,//编辑传递id
|
|
|
// 表单校验
|
|
// 表单校验
|
|
|
rules: {
|
|
rules: {
|
|
|
hardwareTypeCode: [
|
|
hardwareTypeCode: [
|
|
@@ -321,8 +321,8 @@ export default {
|
|
|
/** 修改按钮操作 */
|
|
/** 修改按钮操作 */
|
|
|
handleUpdate(row) {
|
|
handleUpdate(row) {
|
|
|
this.reset();
|
|
this.reset();
|
|
|
- const id = row.id || this.ids;
|
|
|
|
|
- getHardwareTypeInfo(id).then((response) => {
|
|
|
|
|
|
|
+ this.EditId = row.id || this.ids;
|
|
|
|
|
+ getHardwareTypeInfo(this.EditId).then((response) => {
|
|
|
this.form = response.data;
|
|
this.form = response.data;
|
|
|
this.open = true;
|
|
this.open = true;
|
|
|
this.title = "编辑硬件类型";
|
|
this.title = "编辑硬件类型";
|
|
@@ -332,7 +332,7 @@ export default {
|
|
|
submitForm() {
|
|
submitForm() {
|
|
|
this.$refs["form"].validate((valid) => {
|
|
this.$refs["form"].validate((valid) => {
|
|
|
if (valid) {
|
|
if (valid) {
|
|
|
- if (this.form.hardwareTypeCode != null) {
|
|
|
|
|
|
|
+ if (this.EditId != null) {
|
|
|
updateHardware(this.form).then((response) => {
|
|
updateHardware(this.form).then((response) => {
|
|
|
this.$modal.msgSuccess("修改成功");
|
|
this.$modal.msgSuccess("修改成功");
|
|
|
this.open = false;
|
|
this.open = false;
|