|
|
|
@ -61,7 +61,7 @@
|
|
|
|
|
</template>
|
|
|
|
|
</el-table-column>
|
|
|
|
|
</el-table>
|
|
|
|
|
<el-dialog title="平台信息编辑" :visible.sync="formVisible" width="30%"
|
|
|
|
|
<el-dialog :title=editTypeMap[editType] :visible.sync="formVisible" width="30%"
|
|
|
|
|
:close-on-click-modal="false"
|
|
|
|
|
:close-on-press-escape="false">
|
|
|
|
|
<el-form :model="formData" :rules="formRules" ref="dataForm">
|
|
|
|
@ -78,7 +78,6 @@
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</div>
|
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
|
|
</el-row>
|
|
|
|
|
|
|
|
|
|
<el-row :gutter="20" class="el-row" type="flex">
|
|
|
|
@ -93,10 +92,7 @@
|
|
|
|
|
</el-form-item>
|
|
|
|
|
</div>
|
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
|
|
</el-row>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</el-form>
|
|
|
|
|
|
|
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
|
@ -130,7 +126,6 @@ export default {
|
|
|
|
|
return {
|
|
|
|
|
filterQuery: {
|
|
|
|
|
name: "",
|
|
|
|
|
host: "",
|
|
|
|
|
page: 1,
|
|
|
|
|
limit: 20
|
|
|
|
|
},
|
|
|
|
@ -138,6 +133,7 @@ export default {
|
|
|
|
|
total: 0,
|
|
|
|
|
list: [],
|
|
|
|
|
formVisible: false,
|
|
|
|
|
loading: false,
|
|
|
|
|
timer: "",
|
|
|
|
|
formData: {
|
|
|
|
|
id: "",
|
|
|
|
@ -149,19 +145,14 @@ export default {
|
|
|
|
|
formRules: {
|
|
|
|
|
name: [{required: true, message: "请输入平台名称", trigger: "blur"}],
|
|
|
|
|
host: [{required: true, message: "请输入平台访问地址", trigger: "blur"}]
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
editTypeMap: {
|
|
|
|
|
"add": "新增自助平台",
|
|
|
|
|
"edit": "平台信息编辑"
|
|
|
|
|
},
|
|
|
|
|
editType: null
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
filters: {
|
|
|
|
|
statusFilterType(status) {
|
|
|
|
|
const statusMap = {
|
|
|
|
|
0: "gray",
|
|
|
|
|
1: "success",
|
|
|
|
|
2: "danger"
|
|
|
|
|
};
|
|
|
|
|
return statusMap[status];
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
onReset() {
|
|
|
|
|
this.$router.push({
|
|
|
|
@ -176,7 +167,9 @@ export default {
|
|
|
|
|
},
|
|
|
|
|
resetForm() {
|
|
|
|
|
this.$nextTick(() => {
|
|
|
|
|
this.$refs["dataForm"].resetFields();
|
|
|
|
|
if (this.editType === "add") {
|
|
|
|
|
this.$refs["dataForm"].resetFields();
|
|
|
|
|
}
|
|
|
|
|
this.$refs["dataForm"].clearValidate();
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
@ -225,7 +218,7 @@ export default {
|
|
|
|
|
this.formVisible = false;
|
|
|
|
|
},
|
|
|
|
|
handleAddClick() {
|
|
|
|
|
this.editType = 0;
|
|
|
|
|
this.editType = "add";
|
|
|
|
|
this.formVisible = true;
|
|
|
|
|
this.resetForm();
|
|
|
|
|
this.formData = {
|
|
|
|
@ -235,6 +228,7 @@ export default {
|
|
|
|
|
};
|
|
|
|
|
},
|
|
|
|
|
handleModifyClick(row) {
|
|
|
|
|
this.editType = "edit";
|
|
|
|
|
this.formData = {
|
|
|
|
|
id: row.id,
|
|
|
|
|
name: row.name,
|
|
|
|
|