|
|
@@ -3,6 +3,7 @@
|
|
|
<el-dialog
|
|
|
:title="id ? '编辑履职内容库定义' : '新增履职内容库定义'"
|
|
|
:visible.sync="isShow"
|
|
|
+ @close="onHide"
|
|
|
width="500px"
|
|
|
>
|
|
|
<div class="page-body">
|
|
|
@@ -19,7 +20,6 @@
|
|
|
<el-input
|
|
|
v-model="formData.name"
|
|
|
:maxlength="50"
|
|
|
- name="name"
|
|
|
placeholder="请输入履职内容库名称"
|
|
|
clearable
|
|
|
/>
|
|
|
@@ -84,7 +84,7 @@
|
|
|
</div>
|
|
|
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
- <el-button @click="onHide">取消</el-button>
|
|
|
+ <el-button @click="isShow=false">取消</el-button>
|
|
|
<el-button type="primary" @click="onSubmit">确定</el-button>
|
|
|
</div>
|
|
|
</el-dialog>
|
|
|
@@ -94,14 +94,9 @@
|
|
|
<script>
|
|
|
import { mapState, mapMutations } from "vuex";
|
|
|
import * as api from "@/api/resumption/rule";
|
|
|
-import { statusOptions } from "./../../commonOption";
|
|
|
|
|
|
export default {
|
|
|
data() {
|
|
|
- // const params = this.$route.params;
|
|
|
- // let o1=options;
|
|
|
- // let o=statusOptions;
|
|
|
- // debugger
|
|
|
return {
|
|
|
id: null,
|
|
|
isShow: false,
|
|
|
@@ -112,7 +107,6 @@ export default {
|
|
|
orgType: [{ required: true, message: "请选择履职机构类型" }],
|
|
|
status: [{ required: true, message: "请选择状态" }],
|
|
|
},
|
|
|
- statusOptions: statusOptions,
|
|
|
};
|
|
|
},
|
|
|
props: {
|
|
|
@@ -122,6 +116,9 @@ export default {
|
|
|
ruleTypeOptions: {
|
|
|
type: Array,
|
|
|
},
|
|
|
+ statusOptions: {
|
|
|
+ type: Array,
|
|
|
+ },
|
|
|
},
|
|
|
watch: {},
|
|
|
computed: {
|
|
|
@@ -140,7 +137,7 @@ export default {
|
|
|
};
|
|
|
},
|
|
|
async refresh(id, other) {
|
|
|
- this.formData = id ? (await api.get(id)).data : this.reset(other);
|
|
|
+ this.formData = id ? (await api.get(id)).data : this.reset(other);
|
|
|
},
|
|
|
async show(id, other = {}) {
|
|
|
this.id = id;
|
|
|
@@ -149,16 +146,16 @@ export default {
|
|
|
},
|
|
|
|
|
|
// 事件
|
|
|
- onHide() {
|
|
|
- this.isShow = false;
|
|
|
- this.$refs.form.resetFields();
|
|
|
+ onHide() {
|
|
|
+ this.formData=this.reset();
|
|
|
+ this.$refs.form.resetFields();
|
|
|
},
|
|
|
onSubmit() {
|
|
|
this.$refs.form.validate(async (isValidate) => {
|
|
|
if (!isValidate) return;
|
|
|
await api.update(this.formData);
|
|
|
- this.$emit("success");
|
|
|
- this.onHide();
|
|
|
+ this.$emit("success");
|
|
|
+ this.isShow = false;
|
|
|
});
|
|
|
},
|
|
|
|