From 152a4702ec03ceec5f57b207a8d7d9ea5ccdbfe7 Mon Sep 17 00:00:00 2001
From: Administrator <admin>
Date: Wed, 03 Nov 2021 10:05:22 +0800
Subject: [PATCH] 纸质证书样式修改
---
src/views/dispatch/dispatch.vue | 131 +++++++++++++++++++++++++++++++++++++------
1 files changed, 113 insertions(+), 18 deletions(-)
diff --git a/src/views/dispatch/dispatch.vue b/src/views/dispatch/dispatch.vue
index 806c805..bb22f0a 100644
--- a/src/views/dispatch/dispatch.vue
+++ b/src/views/dispatch/dispatch.vue
@@ -112,6 +112,15 @@
import { mapState } from "vuex";
export default {
data() {
+ var phones = (rule, value, callback) => {
+ window.yanzhengphons =
+ /^1([358][0-9]|4[579]|66|7[0135678]|9[89])[0-9]{8}$/;
+ if (!yanzhengphons.test(value)) {
+ callback(new Error("请输入正确电话"));
+ } else {
+ callback();
+ }
+ };
return {
typeTABS: {}, //标签页
deptId: "",
@@ -218,15 +227,21 @@
searchSpan: 4,
width: 210,
// span: 12,
- labelWidth: 118,
+ labelWidth: 138,
+ rules: [
+ {
+ required: true,
+ message: "请输入名称",
+ trigger: "click",
+ },
+ ],
},
{
label: "保安公司",
prop: "deptId",
type: "tree",
overHidden: true,
- dicUrl:
- "/api/blade-system/dept/security_lazy-tree?parentId=1413470343230877697",
+ dicUrl: "",
props: {
label: "title",
value: "id",
@@ -243,7 +258,7 @@
trigger: "click",
},
],
- labelWidth: 118,
+ labelWidth: 138,
width: 230,
searchLabelWidth: 80,
search: true,
@@ -261,7 +276,7 @@
searchSpan: 4,
overHidden: true,
// span: 12,
- labelWidth: 118,
+ labelWidth: 138,
},
{
label: "合同生效时间",
@@ -294,7 +309,7 @@
search: true,
searchSpan: 4,
overHidden: true,
- labelWidth: 118,
+ labelWidth: 138,
type: "tree",
dicUrl: "/api/jurisdiction/lazy-tree",
props: {
@@ -320,7 +335,7 @@
editDisplay: false,
viewDisplay: false,
overHidden: true,
- labelWidth: 118,
+ labelWidth: 138,
type: "tree",
dicUrl: "/api/jurisdiction/lazy-tree",
props: {
@@ -340,46 +355,105 @@
// {
// label: " 派遣人数",
// prop: "num",
- // labelWidth: 118,
+ // 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",
- labelWidth: 118,
+ labelWidth: 138,
type: "date",
format: "yyyy-MM-dd",
valueFormat: "yyyy-MM-dd",
// search: true,
+ rules: [
+ {
+ required: true,
+ message: "请选择开始时间",
+ trigger: "click",
+ },
+ ],
// searchSpan: 4,
// overHidden: true
},
{
label: "合同结束时间",
prop: "endTime",
- labelWidth: 118,
+ labelWidth: 138,
type: "date",
format: "yyyy-MM-dd",
valueFormat: "yyyy-MM-dd",
// search: true,
+ rules: [
+ {
+ required: true,
+ message: "请选择结束时间",
+ trigger: "click",
+ },
+ ],
// searchSpan: 4,
// overHidden: true
},
{
label: " 负责人",
prop: "linkman",
- labelWidth: 118,
+ labelWidth: 138,
+ rules: [
+ {
+ required: true,
+ message: "请输入负责人",
+ trigger: "click",
+ },
+ ],
},
{
label: "负责人联系方式",
prop: "phone",
- labelWidth: 118,
+ labelWidth: 138,
width: 110,
+ rules: [
+ {
+ required: true,
+ message: "请输入联系方式",
+ trigger: "click",
+ },
+ {
+ validator: phones,
+ trigger: ["change", "blur"],
+ },
+ ],
},
],
},
+
+ useifid: 266,
};
},
created() {
+ var that = this;
if (this.userInfo.role_name == "保安公司管理员") {
const deptColumn = this.findObject(this.option.column, "deptId");
deptColumn.search = false;
@@ -387,6 +461,16 @@
deptColumn.editDisplay = false;
deptColumn.viewDisplay = false;
deptColumn.hide = true;
+ 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=" +
+ that.userInfo.jurisdiction;
+ } else {
+ that.option.column[1].dicUrl =
+ "/api/blade-system/dept/security_lazy-tree?parentId=1413470343230877697";
}
},
computed: {
@@ -405,9 +489,9 @@
});
return ids1.join(",");
},
- ...mapState({
+ ...mapState({
userInfo: (state) => state.user.userInfo,
- })
+ }),
},
methods: {
handleChangeTABS(column) {
@@ -436,7 +520,10 @@
// this.$message.success("页码" + val);
},
rowSave(form, done, loading) {
- form["deptId"] = this.userInfo.dept_id;
+ // form["deptId"] = this.userInfo.dept_id;
+ if (this.useifid != 266) {
+ form["deptId"] = this.useifid;
+ }
adddata(form).then(
(res) => {
this.onLoad(this.page);
@@ -464,6 +551,9 @@
this.onLoad(this.page);
},
rowUpdate(row, index, done, loading) {
+ if (this.useifid != 266) {
+ row["deptId"] = this.useifid;
+ }
update(row).then(
() => {
this.onLoad(this.page);
@@ -575,9 +665,14 @@
...this.query,
};
}
-
- console.log(values);
-
+ if (this.useifid != 266) {
+ values["deptId"] = this.useifid;
+ }
+ // console.log(values);
+ if (this.userInfo.role_name == "公安管理员") {
+ values["jurisdiction"] = that.userInfo.jurisdiction;
+ }
+ console.log(params);
getdata(
page.currentPage,
page.pageSize,
--
Gitblit v1.9.3