|
|
|
@ -3,7 +3,7 @@
|
|
|
|
|
<el-form :inline="true" :model="query" class="query-form" size="mini">
|
|
|
|
|
<el-row>
|
|
|
|
|
<el-form-item class="query-form-item">
|
|
|
|
|
<el-input v-model="query.name" style="width: 300px;" placeholder="搜索" clearable="true"></el-input>
|
|
|
|
|
<el-input v-model="query.key" style="width: 300px;" placeholder="搜索" clearable="true"></el-input>
|
|
|
|
|
</el-form-item>
|
|
|
|
|
<el-form-item>
|
|
|
|
|
<el-button-group>
|
|
|
|
@ -78,7 +78,7 @@
|
|
|
|
|
:close-on-press-escape="false"
|
|
|
|
|
width="40%"
|
|
|
|
|
>
|
|
|
|
|
<el-form :model="formData" ref="formData">
|
|
|
|
|
<el-form :model="formData" ref="dataForm">
|
|
|
|
|
<el-row :gutter="20" class="el-row" type="flex">
|
|
|
|
|
<el-col :span="20" class="el-col">
|
|
|
|
|
<el-form-item label="规则名称" prop="name" class="query-form-item">
|
|
|
|
@ -138,7 +138,7 @@
|
|
|
|
|
</el-row>
|
|
|
|
|
<el-row :gutter="20" class="el-row" type="flex">
|
|
|
|
|
<el-col :span="20" class="el-col">
|
|
|
|
|
<el-form-item label="备注信息" prop="step" class="query-form-item">
|
|
|
|
|
<el-form-item label="备注信息" prop="remark" class="query-form-item">
|
|
|
|
|
<el-input
|
|
|
|
|
v-model="formData.remark" style="width: 80%"
|
|
|
|
|
auto-complete="off"
|
|
|
|
@ -165,12 +165,13 @@
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
|
import {getStackRulesList, saveStackRules, deleteStackRules} from "@/api/basic/stackRules";
|
|
|
|
|
import {isBlank} from "@/utils/strUtil";
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
|
data() {
|
|
|
|
|
return {
|
|
|
|
|
query: {
|
|
|
|
|
name: "",
|
|
|
|
|
key: "",
|
|
|
|
|
customerId: this.$store.getters.customerId,
|
|
|
|
|
status: null,
|
|
|
|
|
page: 1,
|
|
|
|
@ -211,7 +212,7 @@ export default {
|
|
|
|
|
path: ""
|
|
|
|
|
});
|
|
|
|
|
this.query = {
|
|
|
|
|
name: "",
|
|
|
|
|
key: "",
|
|
|
|
|
customerId: this.$store.getters.customerId,
|
|
|
|
|
status: null,
|
|
|
|
|
page: 1,
|
|
|
|
@ -221,12 +222,11 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
resetForm() {
|
|
|
|
|
this.$nextTick(() => {
|
|
|
|
|
this.$refs['formData'].resetFields();
|
|
|
|
|
this.$refs["formData"].clearValidate();
|
|
|
|
|
this.$refs['dataForm'].resetFields();
|
|
|
|
|
this.$refs["dataForm"].clearValidate();
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
search() {
|
|
|
|
|
console.log(this.$store.getters.customerId);
|
|
|
|
|
this.query.page = 1;
|
|
|
|
|
this.getList();
|
|
|
|
|
},
|
|
|
|
@ -246,25 +246,42 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
cancelDialog() {
|
|
|
|
|
this.editRulesVisible = false;
|
|
|
|
|
this.getList();
|
|
|
|
|
},
|
|
|
|
|
handleModifyClick(row) {
|
|
|
|
|
this.editRulesVisible = true;
|
|
|
|
|
this.formData = row;
|
|
|
|
|
this.formName = 'edit';
|
|
|
|
|
},
|
|
|
|
|
handleAddClick() {
|
|
|
|
|
this.editRulesVisible = true;
|
|
|
|
|
this.formName = 'add';
|
|
|
|
|
this.resetForm();
|
|
|
|
|
},
|
|
|
|
|
change() {
|
|
|
|
|
this.formData = {
|
|
|
|
|
id: null,
|
|
|
|
|
name: null,
|
|
|
|
|
prefix: null,
|
|
|
|
|
startNum: null,
|
|
|
|
|
step: 1,
|
|
|
|
|
serialNum: null,
|
|
|
|
|
status: 1,
|
|
|
|
|
remark: null,
|
|
|
|
|
customerId: this.$store.getters.customerId
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
//新建规则
|
|
|
|
|
//新建、修改规则
|
|
|
|
|
submit() {
|
|
|
|
|
console.log(this.$store.getters.customerId);
|
|
|
|
|
if (isBlank(this.formData.name)) {
|
|
|
|
|
this.$message.error("请输入规则信息");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
saveStackRules(this.formName, this.formData).then((res) => {
|
|
|
|
|
if (res.code === 20000) {
|
|
|
|
|
this.editRulesVisible = false;
|
|
|
|
|
this.$message.success(res.message);
|
|
|
|
|
if (this.formName === 'add') {
|
|
|
|
|
this.$message.success("添加成功");
|
|
|
|
|
} else {
|
|
|
|
|
this.$message.success("修改成功");
|
|
|
|
|
}
|
|
|
|
|
this.getList();
|
|
|
|
|
} else {
|
|
|
|
|
this.$message.error(res.message);
|
|
|
|
|