|
|
@@ -149,6 +149,7 @@
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
+ <el-button>新增履职内容</el-button>
|
|
|
<el-table :data="tableData" style="width: 100%">
|
|
|
<el-table-column
|
|
|
:prop="propItem.prop"
|
|
|
@@ -164,6 +165,7 @@
|
|
|
size="mini"
|
|
|
type="text"
|
|
|
icon="el-icon-edit"
|
|
|
+ @click="removeRow(index)"
|
|
|
>删除</component
|
|
|
>
|
|
|
</template>
|
|
|
@@ -185,67 +187,56 @@ import * as api from "@/api/resumption/plan";
|
|
|
import { statusOptions } from "./../../commonOption";
|
|
|
|
|
|
export default {
|
|
|
+ dicts: ['resumption_plan_type'],
|
|
|
data() {
|
|
|
// const params = this.$route.params;
|
|
|
// let o1=options;
|
|
|
// let o=statusOptions;
|
|
|
// debugger
|
|
|
return {
|
|
|
+ planName: null,
|
|
|
+ planType: null,
|
|
|
+ planCycle: null,
|
|
|
+ planStatus: null,
|
|
|
+ execOrgType: null,
|
|
|
+ roleNames: null,
|
|
|
+
|
|
|
+ count: null,
|
|
|
+ description: null,
|
|
|
propItem: "",
|
|
|
propList: [
|
|
|
{
|
|
|
label: "是否扫描",
|
|
|
- prop: "name",
|
|
|
+ prop: "pointScan",
|
|
|
},
|
|
|
{
|
|
|
label: "必须履职",
|
|
|
- prop: "date",
|
|
|
+ prop: "required",
|
|
|
},
|
|
|
{
|
|
|
label: "履职内容库",
|
|
|
- prop: "address",
|
|
|
+ prop: "pointName",
|
|
|
},
|
|
|
{
|
|
|
label: "履职项",
|
|
|
- prop: "address",
|
|
|
+ prop: "itemName",
|
|
|
},
|
|
|
{
|
|
|
label: "履职内容",
|
|
|
- prop: "address",
|
|
|
+ prop: "itemDesc",
|
|
|
},
|
|
|
{
|
|
|
label: "履职区域",
|
|
|
- prop: "address",
|
|
|
+ prop: "areaName",
|
|
|
},
|
|
|
{
|
|
|
- label: "履职项",
|
|
|
+ label: "操作",
|
|
|
prop: "lc-component",
|
|
|
component: "el-button",
|
|
|
},
|
|
|
],
|
|
|
row: "",
|
|
|
- tableData: [
|
|
|
- {
|
|
|
- date: "2016-05-02",
|
|
|
- name: "王小虎",
|
|
|
- address: "上海市普陀区金沙江路 1518 弄",
|
|
|
- },
|
|
|
- {
|
|
|
- date: "2016-05-04",
|
|
|
- name: "王小虎",
|
|
|
- address: "上海市普陀区金沙江路 1517 弄",
|
|
|
- },
|
|
|
- {
|
|
|
- date: "2016-05-01",
|
|
|
- name: "王小虎",
|
|
|
- address: "上海市普陀区金沙江路 1519 弄",
|
|
|
- },
|
|
|
- {
|
|
|
- date: "2016-05-03",
|
|
|
- name: "王小虎",
|
|
|
- address: "上海市普陀区金沙江路 1516 弄",
|
|
|
- },
|
|
|
- ],
|
|
|
+ tableData: [],
|
|
|
id: null,
|
|
|
isShow: false,
|
|
|
formData: this.reset(),
|
|
|
@@ -274,43 +265,49 @@ export default {
|
|
|
...mapMutations([]),
|
|
|
reset() {
|
|
|
return {
|
|
|
- id: null,
|
|
|
- name: null,
|
|
|
- type: null,
|
|
|
- orgType: null,
|
|
|
- status: null,
|
|
|
- remark: null,
|
|
|
+ planName: null,
|
|
|
+ planType: null,
|
|
|
+ planCycle: null,
|
|
|
+ planStatus: null,
|
|
|
+ execOrgType: null,
|
|
|
+ roleNames: null,
|
|
|
+ count: null,
|
|
|
+ description: null,
|
|
|
+ tableData:null,
|
|
|
+ itemList:null,
|
|
|
};
|
|
|
},
|
|
|
- findItem(id){
|
|
|
- this.loading = true;
|
|
|
- api
|
|
|
- .list(this.queryParams)
|
|
|
- .then((response) => {
|
|
|
- this.pageData = response.data.records;
|
|
|
- this.total = response.data.total;
|
|
|
- this.loading = false;
|
|
|
- })
|
|
|
- .catch(() => {
|
|
|
- this.loading = false;
|
|
|
- });
|
|
|
- },
|
|
|
+
|
|
|
async refresh(id, other) {
|
|
|
this.formData = id ? (await api.get(id)).data : this.reset(other);
|
|
|
},
|
|
|
async show(id, other = {}) {
|
|
|
this.id = id;
|
|
|
+ this.tableData=null;
|
|
|
+ this.formData.itemList=null;
|
|
|
await this.refresh(id, other);
|
|
|
+ console.log(id)
|
|
|
+ if(id!==undefined){
|
|
|
+ await api.get(id).then((res) => {
|
|
|
+ console.log(res);
|
|
|
+ this.tableData = res.data.itemList;
|
|
|
+ });
|
|
|
+ }
|
|
|
+
|
|
|
this.isShow = true;
|
|
|
},
|
|
|
-
|
|
|
+ removeRow(index) {
|
|
|
+ this.tableData.splice(index, 1);
|
|
|
+ },
|
|
|
// 事件
|
|
|
onHide() {
|
|
|
this.isShow = false;
|
|
|
},
|
|
|
onSubmit() {
|
|
|
this.$refs.form.validate(async (isValidate) => {
|
|
|
+ console.log(this.formData)
|
|
|
if (!isValidate) return;
|
|
|
+ this.formData.itemList=this.tableData;
|
|
|
await api.update(this.formData);
|
|
|
this.$emit("success");
|
|
|
this.onHide();
|