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