|
|
@@ -1,35 +1,67 @@
|
|
|
<template>
|
|
|
<div class="rule-type">
|
|
|
- <DialogCom :title="!formData.id ? '新增履职项' : '编辑履职项'" :visible.sync="dialogVisible" width="50%" :show-close="true"
|
|
|
- @close="onHide">
|
|
|
+ <DialogCom
|
|
|
+ :title="!formData.id ? '新增履职项' : '编辑履职项'"
|
|
|
+ :visible.sync="dialogVisible"
|
|
|
+ width="50%"
|
|
|
+ :show-close="true"
|
|
|
+ @close="onHide"
|
|
|
+ >
|
|
|
<div class="page-body">
|
|
|
<div class="box">
|
|
|
- <el-form ref="form" :model="formData" :rules="formDataRules" label-width="100px">
|
|
|
+ <el-form
|
|
|
+ ref="form"
|
|
|
+ :model="formData"
|
|
|
+ :rules="formDataRules"
|
|
|
+ label-width="100px"
|
|
|
+ >
|
|
|
<el-row>
|
|
|
<el-col :span="20">
|
|
|
<el-form-item prop="name" label="履职项">
|
|
|
- <el-input v-model.trim="formData.name" :maxlength="255" name="name" placeholder="请输入履职项" clearable />
|
|
|
+ <el-input
|
|
|
+ v-model.trim="formData.name"
|
|
|
+ :maxlength="255"
|
|
|
+ name="name"
|
|
|
+ placeholder="请输入履职项"
|
|
|
+ clearable
|
|
|
+ />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
-
|
|
|
</el-form>
|
|
|
</div>
|
|
|
<div class="box">
|
|
|
<div style="margin-bottom: 10px">
|
|
|
- <el-button type="primary" @click="onEdit(-1)">新增履职内容</el-button>
|
|
|
+ <el-button type="primary" @click="onEdit(-1)"
|
|
|
+ >新增履职内容</el-button
|
|
|
+ >
|
|
|
</div>
|
|
|
<el-table :data="formData.pointDtoList" border style="width: 100%">
|
|
|
- <el-table-column prop="name" label="履职内容"> </el-table-column>
|
|
|
+ <el-table-column prop="name" label="履职内容">
|
|
|
+ <template slot-scope="scope">
|
|
|
+ <pre>{{ scope.row.name }}</pre>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
<el-table-column prop="areaName" label="履职区域">
|
|
|
</el-table-column>
|
|
|
<el-table-column prop="checkName" label="履职点位">
|
|
|
</el-table-column>
|
|
|
<el-table-column label="操作" width="140">
|
|
|
<template slot-scope="scope">
|
|
|
- <el-button type="text" size="small" @click="onEdit(scope.$index, scope.row)">编辑</el-button>
|
|
|
- <el-popconfirm title="是否删除履职内容" @confirm="delitem(scope.$index)" style="margin-left: 20px;">
|
|
|
- <el-button slot="reference" type="text" size="small">删除</el-button>
|
|
|
+ <el-button
|
|
|
+ type="text"
|
|
|
+ size="small"
|
|
|
+ @click="onEdit(scope.$index, scope.row)"
|
|
|
+ >编辑</el-button
|
|
|
+ >
|
|
|
+ <el-popconfirm
|
|
|
+ title="是否删除履职内容"
|
|
|
+ @confirm="delitem(scope.$index)"
|
|
|
+ style="margin-left: 20px"
|
|
|
+ >
|
|
|
+ <el-button slot="reference" type="text" size="small"
|
|
|
+ >删除</el-button
|
|
|
+ >
|
|
|
</el-popconfirm>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
@@ -42,7 +74,12 @@
|
|
|
<el-button type="primary" @click="onSubmit()">保 存</el-button>
|
|
|
</div>
|
|
|
</DialogCom>
|
|
|
- <EditPoint ref="editDialog" @submit="onPointSubmit" :rule="rule" v-bind="$attrs"></EditPoint>
|
|
|
+ <EditPoint
|
|
|
+ ref="editDialog"
|
|
|
+ @submit="onPointSubmit"
|
|
|
+ :rule="rule"
|
|
|
+ v-bind="$attrs"
|
|
|
+ ></EditPoint>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
@@ -97,7 +134,10 @@ export default {
|
|
|
if (!isValidate) {
|
|
|
return;
|
|
|
}
|
|
|
- if (!this.formData.pointDtoList || this.formData.pointDtoList.length == 0) {
|
|
|
+ if (
|
|
|
+ !this.formData.pointDtoList ||
|
|
|
+ this.formData.pointDtoList.length == 0
|
|
|
+ ) {
|
|
|
this.$message.warning("履职内容不能为空!");
|
|
|
return;
|
|
|
}
|
|
|
@@ -125,7 +165,7 @@ export default {
|
|
|
this.formData.pointDtoList.splice(val, 1);
|
|
|
},
|
|
|
},
|
|
|
- mounted() { },
|
|
|
+ mounted() {},
|
|
|
components: { EditPoint },
|
|
|
};
|
|
|
</script>
|