From ef46e4b78e81418a831d4f7f21eb24d2fd4d35e1 Mon Sep 17 00:00:00 2001
From: liuyg <376836862@qq.com>
Date: Sat, 25 Dec 2021 15:08:54 +0800
Subject: [PATCH] Merge branch 'master' of http://192.168.0.105:10010/r/zhba_enterprises
---
src/views/dispatch/dispatch.vue | 133 +++++++++++++++++++++----------------------
1 files changed, 65 insertions(+), 68 deletions(-)
diff --git a/src/views/dispatch/dispatch.vue b/src/views/dispatch/dispatch.vue
index 0968574..06b2a61 100644
--- a/src/views/dispatch/dispatch.vue
+++ b/src/views/dispatch/dispatch.vue
@@ -214,7 +214,6 @@
},
option: {
tip: false,
- // card: true,
index: true,
searchSize: "mini",
searchMenuSpan: 6,
@@ -224,7 +223,6 @@
selection: true,
...this.$store.state.control.clearOtherBut,
column: [
- //派遣服务公司登记
{
label: "派遣单位名称",
prop: "name",
@@ -233,7 +231,6 @@
overHidden: true,
searchSpan: 4,
width: 210,
- // span: 12,
labelWidth: 138,
rules: [
{
@@ -242,6 +239,30 @@
trigger: "click",
},
],
+ },
+ {
+ label: "派遣单位类型",
+ prop: "district",
+ type: "select",
+ search: false,
+ dicUrl: "/api/blade-system/dict-biz/dictionary?code=dispatcherUnitType",
+ props: {
+ label: "dictValue",
+ value: "dictKey"
+ },
+ searchLabelWidth: 110,
+ overHidden: true,
+ searchSpan: 4,
+ width: 100,
+ labelWidth: 138,
+ rules: [
+ {
+ required: true,
+ message: "请选择派遣单位类型",
+ trigger: "click",
+ },
+ ],
+ dataType: "number",
},
{
label: "企业名称",
@@ -253,11 +274,6 @@
label: "title",
value: "id",
},
- // hide: true,
- // hide: !website.tenantMode,
- // addDisplay: website.tenantMode,
- // editDisplay: website.tenantMode,
- // viewDisplay: website.tenantMode,
rules: [
{
required: true,
@@ -266,14 +282,10 @@
},
],
labelWidth: 138,
- width: 230,
+ width: 180,
searchLabelWidth: 80,
search: true,
searchSpan: 4,
- // editDisplay: false,
- // addDisplay: false,
- // hide: true,
- // span: 11,
},
{
label: "保安服务类型",
@@ -344,6 +356,7 @@
viewDisplay: false,
overHidden: true,
labelWidth: 138,
+ width:100,
type: "tree",
dicUrl: "/api/jurisdiction/lazy-tree",
props: {
@@ -365,30 +378,6 @@
prop: "address",
labelWidth: 138,
},
- // {
- // label: "合同生效时间",
- // prop: "releaseTimeRange",
- // type: "date",
- // format: "yyyy-MM-dd",
- // valueFormat: "yyyy-MM-dd",
- // searchValue: [this.getStartTime(), this.getEndTime()],
- // // searchRange: true,
- // searchSpan: 5,
- // searchLabelWidth: 110,
- // hide: true,
- // value: [this.getStartTime(), this.getEndTime()],
- // // addDisplay: false,
- // // editDisplay: false,
- // // viewDisplay: false,
- // range: true,
- // rules: [
- // {
- // required: true,
- // message: "请输入时间",
- // trigger: "blur",
- // },
- // ],
- // },
{
label: "合同开始时间",
prop: "startTime",
@@ -404,8 +393,6 @@
trigger: "click",
},
],
- // searchSpan: 4,
- // overHidden: true
},
{
label: "合同结束时间",
@@ -442,17 +429,6 @@
prop: "phone",
labelWidth: 138,
width: 130,
- // rules: [
- // {
- // required: true,
- // message: "请输入联系方式",
- // trigger: "click",
- // },
- // {
- // validator: phones,
- // trigger: ["change", "blur"],
- // },
- // ],
},
{
label: " 负责人",
@@ -483,6 +459,7 @@
// },
],
},
+
{
label: "派遣保安员数",
prop: "num",
@@ -505,23 +482,44 @@
},
created() {
var that = this;
- if (this.userInfo.role_name == "保安公司管理员") {
- const deptColumn = this.findObject(this.option.column, "deptId");
- deptColumn.search = false;
- deptColumn.addDisplay = false;
- deptColumn.editDisplay = false;
- deptColumn.viewDisplay = false;
- deptColumn.hide = true;
+ var roleName = this.userInfo.role_name;
+ // if (this.userInfo.role_name == "保安公司管理员") {
+ // const deptColumn = this.findObject(this.option.column, "deptId");
+ // deptColumn.search = false;
+ // deptColumn.addDisplay = false;
+ // deptColumn.editDisplay = false;
+ // deptColumn.viewDisplay = false;
+ // deptColumn.hide = true;
+ // this.useifid = this.userInfo.dept_id;
+ // }
+
+ if (
+ roleName == "保安公司管理员" ||
+ roleName == "保安" ||
+ roleName == "分公司管理员"
+ ) {
+ //查询保安单位信息(包含子级)
+ const column = this.findObject(this.option.column, "deptId");
+ // column.search = false;
+ //默认全部展开
+ column.defaultExpandAll = true;
+ column.dicUrl =
+ "/api/blade-system/dept/security_lazy-tree?deptId=" +
+ this.userInfo.dept_id;
+ //赋值
+ column.value = that.userInfo.dept_id;
this.useifid = this.userInfo.dept_id;
- }
- //公安局进入
- if (this.userInfo.role_name == "公安管理员") {
- that.option.column[1].dicUrl =
- "/api/blade-system/dept/security_lazy-tree?parentId=1413470343230877697&jurisdiction=" +
+ } else if (roleName == "公安管理员" || roleName == "administrator") {
+ var columnDept = that.findObject(that.option.column, "deptId");
+ columnDept.dicUrl =
+ "/api/blade-system/dept/security_lazy-tree?jurisdiction=" +
that.userInfo.jurisdiction;
} else {
- that.option.column[1].dicUrl =
- "/api/blade-system/dept/security_lazy-tree?parentId=1413470343230877697";
+ //查询保安单位信息(包含子级)
+ const column = this.findObject(this.option.column, "deptId");
+ // column.search = false;
+ //默认全部展开
+ column.dicUrl = "/api/blade-system/dept/security_lazy-tree";
}
},
computed: {
@@ -571,7 +569,6 @@
// this.$message.success("页码" + val);
},
rowSave(form, done, loading) {
- // form["deptId"] = this.userInfo.dept_id;
if (this.useifid != 266) {
form["deptId"] = this.useifid;
}
@@ -669,10 +666,7 @@
window.localStorage.setItem("paqiandata", JSON.stringify(row));
this.$router.push({
path: "/dispatchChild",
- // redirect: { name: "foo" },
- // query: { row: row },
query: { rowdispatch: "fromDispatch" },
- // params: { row: row.identificationnumber },
});
},
getStartTime() {
@@ -737,6 +731,9 @@
if (this.data[k].num == -1) {
this.data[k].num = null;
}
+ if (this.data[k].district == -1) {
+ this.data[k].district = null;
+ }
}
window.localStorage.setItem("paqiandataS", JSON.stringify(this.data));
this.loading = false;
--
Gitblit v1.9.3