添加岗位使用用途
This commit is contained in:
parent
21f799c698
commit
2cfc86edb6
@ -107,7 +107,7 @@
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
|
||||
<pagination
|
||||
v-show="total>0"
|
||||
:total="total"
|
||||
@ -137,6 +137,15 @@
|
||||
>{{dict.dictLabel}}</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="岗位用途" prop="purp">
|
||||
<el-radio-group v-model="form.purp">
|
||||
<el-radio
|
||||
v-for="dict in purpOptions"
|
||||
:key="dict.dictValue"
|
||||
:label="dict.dictValue"
|
||||
>{{dict.dictLabel}}</el-radio>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="form.remark" type="textarea" placeholder="请输入内容" />
|
||||
</el-form-item>
|
||||
@ -150,7 +159,14 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { listPost, getPost, delPost, addPost, updatePost, exportPost } from "@/api/system/post";
|
||||
import {
|
||||
listPost,
|
||||
getPost,
|
||||
delPost,
|
||||
addPost,
|
||||
updatePost,
|
||||
exportPost
|
||||
} from "@/api/system/post";
|
||||
|
||||
export default {
|
||||
name: "Post",
|
||||
@ -174,13 +190,16 @@ export default {
|
||||
open: false,
|
||||
// 状态数据字典
|
||||
statusOptions: [],
|
||||
// 岗位用途
|
||||
purpOptions: [],
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
postCode: undefined,
|
||||
postName: undefined,
|
||||
status: undefined
|
||||
status: undefined,
|
||||
purp: undefined
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
@ -203,6 +222,9 @@ export default {
|
||||
this.getDicts("sys_normal_disable").then(response => {
|
||||
this.statusOptions = response.data;
|
||||
});
|
||||
this.getDicts("sys_purpose").then(response => {
|
||||
this.purpOptions = response.data;
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
/** 查询岗位列表 */
|
||||
@ -231,6 +253,7 @@ export default {
|
||||
postName: undefined,
|
||||
postSort: 0,
|
||||
status: "0",
|
||||
purp: "1",
|
||||
remark: undefined
|
||||
};
|
||||
this.resetForm("form");
|
||||
@ -247,9 +270,9 @@ export default {
|
||||
},
|
||||
// 多选框选中数据
|
||||
handleSelectionChange(selection) {
|
||||
this.ids = selection.map(item => item.postId)
|
||||
this.single = selection.length!=1
|
||||
this.multiple = !selection.length
|
||||
this.ids = selection.map(item => item.postId);
|
||||
this.single = selection.length != 1;
|
||||
this.multiple = !selection.length;
|
||||
},
|
||||
/** 新增按钮操作 */
|
||||
handleAdd() {
|
||||
@ -260,7 +283,7 @@ export default {
|
||||
/** 修改按钮操作 */
|
||||
handleUpdate(row) {
|
||||
this.reset();
|
||||
const postId = row.postId || this.ids
|
||||
const postId = row.postId || this.ids;
|
||||
getPost(postId).then(response => {
|
||||
this.form = response.data;
|
||||
this.open = true;
|
||||
@ -298,29 +321,39 @@ export default {
|
||||
/** 删除按钮操作 */
|
||||
handleDelete(row) {
|
||||
const postIds = row.postId || this.ids;
|
||||
this.$confirm('是否确认删除岗位编号为"' + postIds + '"的数据项?', "警告", {
|
||||
this.$confirm(
|
||||
'是否确认删除岗位编号为"' + postIds + '"的数据项?',
|
||||
"警告",
|
||||
{
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(function() {
|
||||
}
|
||||
)
|
||||
.then(function() {
|
||||
return delPost(postIds);
|
||||
}).then(() => {
|
||||
})
|
||||
.then(() => {
|
||||
this.getList();
|
||||
this.msgSuccess("删除成功");
|
||||
}).catch(function() {});
|
||||
})
|
||||
.catch(function() {});
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
const queryParams = this.queryParams;
|
||||
this.$confirm('是否确认导出所有岗位数据项?', "警告", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
}).then(function() {
|
||||
this.$confirm("是否确认导出所有岗位数据项?", "警告", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning"
|
||||
})
|
||||
.then(function() {
|
||||
return exportPost(queryParams);
|
||||
}).then(response => {
|
||||
})
|
||||
.then(response => {
|
||||
this.download(response.msg);
|
||||
}).catch(function() {});
|
||||
})
|
||||
.catch(function() {});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -37,6 +37,9 @@ public class SysPost extends BaseEntity
|
||||
@Excel(name = "状态", readConverterExp = "0=正常,1=停用")
|
||||
private String status;
|
||||
|
||||
/** 用途(1幼儿园 2系统) */
|
||||
private String purp;
|
||||
|
||||
/** 用户是否存在此岗位标识 默认不存在 */
|
||||
private boolean flag = false;
|
||||
|
||||
@ -104,6 +107,14 @@ public class SysPost extends BaseEntity
|
||||
{
|
||||
this.flag = flag;
|
||||
}
|
||||
|
||||
public String getPurp() {
|
||||
return purp;
|
||||
}
|
||||
|
||||
public void setPurp(String purp) {
|
||||
this.purp = purp;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
@ -118,6 +129,9 @@ public class SysPost extends BaseEntity
|
||||
.append("updateBy", getUpdateBy())
|
||||
.append("updateTime", getUpdateTime())
|
||||
.append("remark", getRemark())
|
||||
.append("purp", getPurp())
|
||||
.toString();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -15,10 +15,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="purp" column="purp" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectPostVo">
|
||||
select post_id, post_code, post_name, post_sort, status, create_by, create_time, remark
|
||||
select post_id, post_code, post_name, post_sort, status, create_by, create_time, remark, purp
|
||||
from sys_post
|
||||
</sql>
|
||||
|
||||
@ -79,6 +80,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="postName != null and postName != ''">post_name = #{postName},</if>
|
||||
<if test="postSort != null and postSort != ''">post_sort = #{postSort},</if>
|
||||
<if test="status != null and status != ''">status = #{status},</if>
|
||||
<if test="purp != null and purp != ''">purp = #{purp},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
||||
update_time = sysdate()
|
||||
@ -93,6 +95,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="postName != null and postName != ''">post_name,</if>
|
||||
<if test="postSort != null and postSort != ''">post_sort,</if>
|
||||
<if test="status != null and status != ''">status,</if>
|
||||
<if test="purp != null and purp != ''">purp,</if>
|
||||
<if test="remark != null and remark != ''">remark,</if>
|
||||
<if test="createBy != null and createBy != ''">create_by,</if>
|
||||
create_time
|
||||
@ -102,6 +105,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<if test="postName != null and postName != ''">#{postName},</if>
|
||||
<if test="postSort != null and postSort != ''">#{postSort},</if>
|
||||
<if test="status != null and status != ''">#{status},</if>
|
||||
<if test="purp != null and purp != ''">#{purp},</if>
|
||||
<if test="remark != null and remark != ''">#{remark},</if>
|
||||
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||
sysdate()
|
||||
|
Loading…
x
Reference in New Issue
Block a user