From 3bd1fdf103ca2c58e2b28cc802f84d729a9d44ad Mon Sep 17 00:00:00 2001
From: liuyg <376836862@qq.com>
Date: Wed, 29 Sep 2021 16:46:22 +0800
Subject: [PATCH] 公司修改 派遣修改
---
src/views/securityUnit备份/data.js | 725 +++++++
src/api/social/social.js | 14
src/views/securityUnit/localCompany.vue | 108
src/views/securityUnit备份/index.vue | 712 +++++++
src/views/securityUnit/selfRecruitedSecurityGuard.vue | 100
src/views/securityUnit/armedEscort.vue | 98
src/views/securityUnit备份/transRegionalcompany.vue | 734 +++++++
src/views/securityUnit/data.js | 99
src/views/securityUnit备份/armedEscort.vue | 706 +++++++
src/views/securityUnit备份/localCompany.vue | 710 +++++++
src/views/securityUnit备份/securityTraining.vue | 732 +++++++
src/views/securityAnalysis/child/examination.vue | 26
src/styles/element-ui.scss | 6
src/views/dispatch/dispatch.vue | 3
src/views/dispatch/dispatchChildoperable.vue | 3
src/views/securityUnit备份/selfRecruitedSecurityGuard.vue | 749 +++++++
src/views/securityUnit/transRegionalcompany.vue | 98
src/views/securityAnalysis/child/socialSecurity.vue | 3
src/views/securityUnit/securityTraining.vue | 98
19 files changed, 5,355 insertions(+), 369 deletions(-)
diff --git a/src/api/social/social.js b/src/api/social/social.js
index 2d876a3..c02e8fe 100644
--- a/src/api/social/social.js
+++ b/src/api/social/social.js
@@ -1,6 +1,20 @@
import request from '@/router/axios';
+export const getListJurisdiction = (current, size, params) => {
+ return request({
+ url: '/api/social/page',
+ method: 'get',
+ params: {
+ ...params,
+ current,
+ size,
+ }
+ })
+}
+
+
+
export const getuseList = (id) => {
return request({
url: '/api/blade-user/detail',
diff --git a/src/styles/element-ui.scss b/src/styles/element-ui.scss
index 83ab6fd..56c28f3 100644
--- a/src/styles/element-ui.scss
+++ b/src/styles/element-ui.scss
@@ -310,3 +310,9 @@
background-color: #bcdcfd !important;
}
}
+
+.addCompany {
+ .avue-form__menu--center .el-button {
+ float: none;
+ }
+}
diff --git a/src/views/dispatch/dispatch.vue b/src/views/dispatch/dispatch.vue
index 8513015..bb22f0a 100644
--- a/src/views/dispatch/dispatch.vue
+++ b/src/views/dispatch/dispatch.vue
@@ -670,8 +670,9 @@
}
// console.log(values);
if (this.userInfo.role_name == "公安管理员") {
- params["jurisdiction"] = that.userInfo.jurisdiction;
+ values["jurisdiction"] = that.userInfo.jurisdiction;
}
+ console.log(params);
getdata(
page.currentPage,
page.pageSize,
diff --git a/src/views/dispatch/dispatchChildoperable.vue b/src/views/dispatch/dispatchChildoperable.vue
index 0d8db0c..b2d748d 100644
--- a/src/views/dispatch/dispatchChildoperable.vue
+++ b/src/views/dispatch/dispatchChildoperable.vue
@@ -514,9 +514,8 @@
}
//公安局进入
if (this.userInfo.role_name == "公安管理员") {
- params["jurisdiction"] = this.userInfo.jurisdiction;
+ values["jurisdiction"] = this.userInfo.jurisdiction;
}
-
getdata1(
page.currentPage,
page.pageSize,
diff --git a/src/views/securityAnalysis/child/examination.vue b/src/views/securityAnalysis/child/examination.vue
index 2c33342..971aafc 100644
--- a/src/views/securityAnalysis/child/examination.vue
+++ b/src/views/securityAnalysis/child/examination.vue
@@ -67,7 +67,17 @@
disabled: true,
},
{
- label: "考试分数",
+ label: "理论成绩",
+ prop: "theoryGrade",
+ disabled: true,
+ },
+ {
+ label: "实操成绩",
+ prop: "learnGrade",
+ disabled: true,
+ },
+ {
+ label: "总分数",
prop: "allGrade",
disabled: true,
},
@@ -87,7 +97,19 @@
(res) => {
// console.log(res.data.data.records);
const data = res.data.data;
- this.data1 = data.records;
+ var d = data.records;
+ for (var k in d) {
+ if (d[k].theoryGrade == -1) {
+ d[k].theoryGrade = "暂未录入";
+ }
+ if (d[k].allGrade == -1) {
+ d[k].allGrade = "暂未录入";
+ }
+ if (d[k].learnGrade == -1) {
+ d[k].learnGrade = "暂未录入";
+ }
+ }
+ this.data1 = d;
this.page1.total = data.total;
this.loading1 = false;
}
diff --git a/src/views/securityAnalysis/child/socialSecurity.vue b/src/views/securityAnalysis/child/socialSecurity.vue
index 4a61256..2585707 100644
--- a/src/views/securityAnalysis/child/socialSecurity.vue
+++ b/src/views/securityAnalysis/child/socialSecurity.vue
@@ -65,6 +65,7 @@
<script>
import {
+ getListJurisdiction,
getuseList,
getList,
getDetail,
@@ -572,7 +573,7 @@
if (this.userInfo.role_name == "公安管理员") {
params["jurisdiction"] = this.userInfo.jurisdiction;
}
- getList(
+ getListJurisdiction(
page.currentPage,
page.pageSize,
Object.assign(params, this.query)
diff --git a/src/views/securityUnit/armedEscort.vue b/src/views/securityUnit/armedEscort.vue
index 686ec8c..411fe15 100644
--- a/src/views/securityUnit/armedEscort.vue
+++ b/src/views/securityUnit/armedEscort.vue
@@ -69,58 +69,22 @@
</el-button>
</template>
</avue-crud>
- <div class="lod" v-show="forms != -1">
- <div class="lod-in">
- <!-- <el-col class="trees" v-if="forms == 0">
- <div class="box">
- <el-scrollbar>
- <basic-container>
- <avue-tree
- :option="treeOption"
- :data="treeData"
- @node-click="nodeClick"
- />
- </basic-container>
- </el-scrollbar>
- </div>
- </el-col> -->
- <avue-form
- ref="form"
- v-model="obj0"
- :option="option0"
- v-if="forms == 0"
- >
- <template slot="menuForm">
- <el-button type="primary" @click="tip0">下一页</el-button>
- <el-button type="info" @click="tipover">取消</el-button>
- </template>
- </avue-form>
- <avue-form
- ref="form1"
- v-model="obj1"
- :option="option1"
- v-else-if="forms == 1"
- >
- <template slot="menuForm">
- <el-button type="primary" @click="tip1up1">上一页</el-button>
- <el-button type="primary" @click="tip1">下一页</el-button>
- <el-button type="info" @click="tipover">取消</el-button>
- </template>
- </avue-form>
- <avue-form
- ref="form2"
- v-model="obj2"
- :option="option2"
- v-else-if="forms == 2"
- >
- <template slot="menuForm">
- <el-button type="primary" @click="tip2up2">上一页</el-button>
- <el-button type="primary" @click="tip2">提交</el-button>
- <el-button type="info" @click="tipover">取消</el-button>
- </template>
- </avue-form>
- </div>
- </div>
+ <el-dialog
+ :visible.sync="forms"
+ width="80%"
+ top="5vh"
+ :modal-append-to-body="false"
+ class="addCompany"
+ >
+ <avue-form
+ ref="form"
+ v-model="obj0"
+ :option="option0"
+ v-if="forms"
+ @submit="handleSubmit"
+ >
+ </avue-form>
+ </el-dialog>
</div>
<el-dialog
title="保安单位导入"
@@ -226,7 +190,7 @@
},
option0: {
emptyBtn: false,
- submitBtn: false,
+ submitBtn: true,
gutter: 30,
column: column0,
},
@@ -249,7 +213,7 @@
column: column2,
},
- forms: -1,
+ forms: false,
data0: {},
data1: {},
data2: {},
@@ -276,6 +240,10 @@
column: column,
},
};
+ },
+ created() {
+ this.option0.column[4].value = 2;
+ this.option0.column[4].disabled = true;
},
computed: {
...mapGetters(["userInfo"]),
@@ -351,7 +319,7 @@
},
rowSave(form, done, loading) {
// console.log("save1");
- this.forms = 0;
+ this.forms = true;
var that = this;
//先获取部门接口
getDeptLazyTree().then((res) => {
@@ -491,6 +459,24 @@
// this.obj2["useid"] = data.id;
// this.nobumen = 1;
// },
+ handleSubmit(form, done) {
+ console.log(form);
+ adddata(form).then((res) => {
+ if (res.data.success) {
+ this.$message({
+ message: "提交成功",
+ type: "success",
+ });
+ done();
+ this.forms = false;
+ } else {
+ this.$message({
+ message: "提交失败",
+ type: "warning",
+ });
+ }
+ });
+ },
tip0() {
if (this.panduanmeiyouziduan()) {
return;
@@ -593,7 +579,7 @@
this.tipover();
},
tip1up1() {
- this.forms = 0;
+ this.forms = true;
},
tip2up2() {
this.forms = 1;
diff --git a/src/views/securityUnit/data.js b/src/views/securityUnit/data.js
index 026374d..5e8b81e 100644
--- a/src/views/securityUnit/data.js
+++ b/src/views/securityUnit/data.js
@@ -125,17 +125,17 @@
searchSpan: 4,
searchLabelWidth: 100
},
- {
- label: "注册时间",
- prop: "establishtime",
- labelWidth: 160,
- width: 130,
- overHidden: true,
- type: "date",
- format: "yyyy-MM-dd",
- valueFormat: "yyyy-MM-dd",
+ // {
+ // label: "注册时间",
+ // prop: "establishtime",
+ // labelWidth: 160,
+ // width: 130,
+ // overHidden: true,
+ // type: "date",
+ // format: "yyyy-MM-dd",
+ // valueFormat: "yyyy-MM-dd",
- },
+ // },
{
label: "注册资本",
prop: "registeredcapital",
@@ -229,16 +229,17 @@
}
},
{
- label: "统一社会信用代码",
- prop: "creditcode",
+ label: "企业名称",
+ prop: "enterprisename",
labelWidth: w,
span: s,
rules: [{
required: true,
- message: "请输入社会信用代码",
+ message: "请输入企业名称",
trigger: "blur"
}]
},
+
{
label: "所属辖区",
prop: "jurisdiction",
@@ -259,6 +260,12 @@
trigger: "click",
},
],
+ },
+ {
+ label: "统一社会信用代码",
+ prop: "creditcode",
+ labelWidth: w,
+ span: s,
},
// {
// label: "机构",
@@ -291,26 +298,9 @@
value: "dictKey"
},
labelWidth: w,
- span: s,
- rules: [
- {
- required: true,
- message: "请选择企业类型",
- trigger: "click",
- },
- ],
+ span: s
},
- {
- label: "企业名称",
- prop: "enterprisename",
- labelWidth: w,
- span: s,
- rules: [{
- required: true,
- message: "请输入企业名称",
- trigger: "blur"
- }]
- },
+
{
label: "法定代表人",
prop: "representative",
@@ -379,22 +369,12 @@
type: "date",
format: "yyyy-MM-dd",
valueFormat: "yyyy-MM-dd",
- rules: [{
- required: true,
- message: "请输入注册时间",
- trigger: "blur"
- }]
},
{
label: "注册资本(万元人民币)",
prop: "registeredcapital",
labelWidth: w,
span: s,
- rules: [{
- required: true,
- message: "请输入注册资本",
- trigger: "blur"
- }]
},
{
label: "实缴资本(万元人民币)",
@@ -407,11 +387,6 @@
prop: "organizationcode",
labelWidth: w,
span: s,
- rules: [{
- required: true,
- message: "请输入组织机构代码",
- trigger: "blur"
- }]
},
{
label: "工商注册号",
@@ -419,22 +394,12 @@
labelWidth: w,
span: s,
- rules: [{
- required: true,
- message: "请输入工商注册号",
- trigger: "blur"
- }]
},
{
label: "纳税人识别号",
prop: "identificationnumber",
labelWidth: w,
span: s,
- rules: [{
- required: true,
- message: "请输入纳税人识别号",
- trigger: "blur"
- }]
},
// {
// label: "企业类型",
@@ -452,22 +417,12 @@
prop: "address",
labelWidth: w,
span: s,
- rules: [{
- required: true,
- message: "请输入注册地址",
- trigger: "blur"
- }]
},
{
label: "经营范围",
prop: "business",
labelWidth: w,
span: s,
- rules: [{
- required: true,
- message: "请输入经营范围",
- trigger: "blur"
- }]
},
// {
// label: "所属地区",
@@ -485,11 +440,6 @@
prop: "registration",
labelWidth: w,
span: s,
- rules: [{
- required: true,
- message: "请输入登记机关",
- trigger: "blur"
- }]
// overHidden: true,
},
@@ -498,11 +448,6 @@
prop: "industry",
labelWidth: w,
span: s,
- rules: [{
- required: true,
- message: "请输入所属行业",
- trigger: "blur"
- }]
}
]
diff --git a/src/views/securityUnit/localCompany.vue b/src/views/securityUnit/localCompany.vue
index e521465..2fe7f96 100644
--- a/src/views/securityUnit/localCompany.vue
+++ b/src/views/securityUnit/localCompany.vue
@@ -69,58 +69,22 @@
</el-button>
</template>
</avue-crud>
- <div class="lod" v-show="forms != -1">
- <div class="lod-in">
- <!-- <el-col class="trees" v-if="forms == 0">
- <div class="box">
- <el-scrollbar>
- <basic-container>
- <avue-tree
- :option="treeOption"
- :data="treeData"
- @node-click="nodeClick"
- />
- </basic-container>
- </el-scrollbar>
- </div>
- </el-col> -->
- <avue-form
- ref="form"
- v-model="obj0"
- :option="option0"
- v-if="forms == 0"
- >
- <template slot="menuForm">
- <el-button type="primary" @click="tip0">下一页</el-button>
- <el-button type="info" @click="tipover">取消</el-button>
- </template>
- </avue-form>
- <avue-form
- ref="form1"
- v-model="obj1"
- :option="option1"
- v-else-if="forms == 1"
- >
- <template slot="menuForm">
- <el-button type="primary" @click="tip1up1">上一页</el-button>
- <el-button type="primary" @click="tip1">下一页</el-button>
- <el-button type="info" @click="tipover">取消</el-button>
- </template>
- </avue-form>
- <avue-form
- ref="form2"
- v-model="obj2"
- :option="option2"
- v-else-if="forms == 2"
- >
- <template slot="menuForm">
- <el-button type="primary" @click="tip2up2">上一页</el-button>
- <el-button type="primary" @click="tip2">提交</el-button>
- <el-button type="info" @click="tipover">取消</el-button>
- </template>
- </avue-form>
- </div>
- </div>
+ <el-dialog
+ :visible.sync="forms"
+ width="80%"
+ top="5vh"
+ :modal-append-to-body="false"
+ class="addCompany"
+ >
+ <avue-form
+ ref="form"
+ v-model="obj0"
+ :option="option0"
+ v-if="forms"
+ @submit="handleSubmit"
+ >
+ </avue-form>
+ </el-dialog>
</div>
<el-dialog
title="保安单位导入"
@@ -226,7 +190,7 @@
},
option0: {
emptyBtn: false,
- submitBtn: false,
+ submitBtn: true,
gutter: 30,
column: column0,
},
@@ -249,7 +213,7 @@
column: column2,
},
- forms: -1,
+ forms: false,
data0: {},
data1: {},
data2: {},
@@ -276,6 +240,10 @@
column: column,
},
};
+ },
+ created() {
+ this.option0.column[4].value = 2;
+ this.option0.column[4].disabled = true;
},
computed: {
...mapGetters(["userInfo"]),
@@ -351,7 +319,7 @@
},
rowSave(form, done, loading) {
// console.log("save1");
- this.forms = 0;
+ this.forms = true;
var that = this;
//先获取部门接口
getDeptLazyTree().then((res) => {
@@ -491,10 +459,28 @@
// this.obj2["useid"] = data.id;
// this.nobumen = 1;
// },
+ handleSubmit(form, done) {
+ console.log(form);
+ adddata(form).then((res) => {
+ if (res.data.success) {
+ this.$message({
+ message: "提交成功",
+ type: "success",
+ });
+ done();
+ this.forms = false;
+ } else {
+ this.$message({
+ message: "提交失败",
+ type: "warning",
+ });
+ }
+ });
+ },
tip0() {
- if (this.panduanmeiyouziduan()) {
- return;
- }
+ // if (this.panduanmeiyouziduan()) {
+ // return;
+ // }
var d = {};
for (var k in this.obj0) {
for (var i in column0) {
@@ -516,8 +502,8 @@
}
}
console.log(d, 0);
- this.data0 = d;
- this.forms = 1;
+ // this.data0 = d;
+ // this.forms = 1;
},
tip1() {
if (this.panduanmeiyouziduan()) {
@@ -675,7 +661,7 @@
height: 100%;
background-color: rgba($color: #000000, $alpha: 0.5);
padding: 100px 0 0 0;
- z-index: 500 !important;
+ z-index: 1500 !important;
display: flex;
// align-items: center;
justify-content: center;
diff --git a/src/views/securityUnit/securityTraining.vue b/src/views/securityUnit/securityTraining.vue
index 45490f3..b441e8b 100644
--- a/src/views/securityUnit/securityTraining.vue
+++ b/src/views/securityUnit/securityTraining.vue
@@ -69,58 +69,22 @@
</el-button>
</template>
</avue-crud>
- <div class="lod" v-show="forms != -1">
- <div class="lod-in">
- <!-- <el-col class="trees" v-if="forms == 0">
- <div class="box">
- <el-scrollbar>
- <basic-container>
- <avue-tree
- :option="treeOption"
- :data="treeData"
- @node-click="nodeClick"
- />
- </basic-container>
- </el-scrollbar>
- </div>
- </el-col> -->
- <avue-form
- ref="form"
- v-model="obj0"
- :option="option0"
- v-if="forms == 0"
- >
- <template slot="menuForm">
- <el-button type="primary" @click="tip0">下一页</el-button>
- <el-button type="info" @click="tipover">取消</el-button>
- </template>
- </avue-form>
- <avue-form
- ref="form1"
- v-model="obj1"
- :option="option1"
- v-else-if="forms == 1"
- >
- <template slot="menuForm">
- <el-button type="primary" @click="tip1up1">上一页</el-button>
- <el-button type="primary" @click="tip1">下一页</el-button>
- <el-button type="info" @click="tipover">取消</el-button>
- </template>
- </avue-form>
- <avue-form
- ref="form2"
- v-model="obj2"
- :option="option2"
- v-else-if="forms == 2"
- >
- <template slot="menuForm">
- <el-button type="primary" @click="tip2up2">上一页</el-button>
- <el-button type="primary" @click="tip2">提交</el-button>
- <el-button type="info" @click="tipover">取消</el-button>
- </template>
- </avue-form>
- </div>
- </div>
+ <el-dialog
+ :visible.sync="forms"
+ width="80%"
+ top="5vh"
+ :modal-append-to-body="false"
+ class="addCompany"
+ >
+ <avue-form
+ ref="form"
+ v-model="obj0"
+ :option="option0"
+ v-if="forms"
+ @submit="handleSubmit"
+ >
+ </avue-form>
+ </el-dialog>
</div>
<el-dialog
title="保安单位导入"
@@ -256,7 +220,7 @@
},
option0: {
emptyBtn: false,
- submitBtn: false,
+ submitBtn: true,
gutter: 30,
column: column0,
},
@@ -279,7 +243,7 @@
column: column2,
},
- forms: -1,
+ forms: false,
data0: {},
data1: {},
data2: {},
@@ -307,6 +271,10 @@
column: column,
},
};
+ },
+ created() {
+ this.option0.column[4].value = 2;
+ this.option0.column[4].disabled = true;
},
computed: {
...mapGetters(["userInfo"]),
@@ -382,13 +350,31 @@
},
rowSave(form, done, loading) {
// console.log("save1");
- this.forms = 0;
+ this.forms = true;
var that = this;
//先获取部门接口
getDeptLazyTree().then((res) => {
var d = res.data.data;
that.treeData = d;
// console.log(d);
+ });
+ },
+ handleSubmit(form, done) {
+ console.log(form);
+ adddata(form).then((res) => {
+ if (res.data.success) {
+ this.$message({
+ message: "提交成功",
+ type: "success",
+ });
+ done();
+ this.forms = false;
+ } else {
+ this.$message({
+ message: "提交失败",
+ type: "warning",
+ });
+ }
});
},
searchChange(params, done) {
@@ -624,7 +610,7 @@
this.tipover();
},
tip1up1() {
- this.forms = 0;
+ this.forms = true;
},
tip2up2() {
this.forms = 1;
diff --git a/src/views/securityUnit/selfRecruitedSecurityGuard.vue b/src/views/securityUnit/selfRecruitedSecurityGuard.vue
index d404aec..f17bee5 100644
--- a/src/views/securityUnit/selfRecruitedSecurityGuard.vue
+++ b/src/views/securityUnit/selfRecruitedSecurityGuard.vue
@@ -69,58 +69,22 @@
</el-button>
</template>
</avue-crud>
- <div class="lod" v-show="forms != -1">
- <div class="lod-in">
- <!-- <el-col class="trees" v-if="forms == 0">
- <div class="box">
- <el-scrollbar>
- <basic-container>
- <avue-tree
- :option="treeOption"
- :data="treeData"
- @node-click="nodeClick"
- />
- </basic-container>
- </el-scrollbar>
- </div>
- </el-col> -->
- <avue-form
- ref="form"
- v-model="obj0"
- :option="option0"
- v-if="forms == 0"
- >
- <template slot="menuForm">
- <el-button type="primary" @click="tip0">下一页</el-button>
- <el-button type="info" @click="tipover">取消</el-button>
- </template>
- </avue-form>
- <avue-form
- ref="form1"
- v-model="obj1"
- :option="option1"
- v-else-if="forms == 1"
- >
- <template slot="menuForm">
- <el-button type="primary" @click="tip1up1">上一页</el-button>
- <el-button type="primary" @click="tip1">下一页</el-button>
- <el-button type="info" @click="tipover">取消</el-button>
- </template>
- </avue-form>
- <avue-form
- ref="form2"
- v-model="obj2"
- :option="option2"
- v-else-if="forms == 2"
- >
- <template slot="menuForm">
- <el-button type="primary" @click="tip2up2">上一页</el-button>
- <el-button type="primary" @click="tip2">提交</el-button>
- <el-button type="info" @click="tipover">取消</el-button>
- </template>
- </avue-form>
- </div>
- </div>
+ <el-dialog
+ :visible.sync="forms"
+ width="80%"
+ top="5vh"
+ :modal-append-to-body="false"
+ class="addCompany"
+ >
+ <avue-form
+ ref="form"
+ v-model="obj0"
+ :option="option0"
+ v-if="forms"
+ @submit="handleSubmit"
+ >
+ </avue-form>
+ </el-dialog>
</div>
<el-dialog
title="保安单位导入"
@@ -256,7 +220,7 @@
},
option0: {
emptyBtn: false,
- submitBtn: false,
+ submitBtn: true,
gutter: 30,
column: column0,
},
@@ -279,7 +243,7 @@
column: column2,
},
- forms: -1,
+ forms: false,
data0: {},
data1: {},
data2: {},
@@ -324,6 +288,10 @@
],
},
};
+ },
+ created() {
+ this.option0.column[4].value = 2;
+ this.option0.column[4].disabled = true;
},
computed: {
...mapGetters(["userInfo"]),
@@ -399,7 +367,7 @@
},
rowSave(form, done, loading) {
// console.log("save1");
- this.forms = 0;
+ this.forms = true;
var that = this;
//先获取部门接口
getDeptLazyTree().then((res) => {
@@ -539,6 +507,24 @@
// this.obj2["useid"] = data.id;
// this.nobumen = 1;
// },
+ handleSubmit(form, done) {
+ console.log(form);
+ adddata(form).then((res) => {
+ if (res.data.success) {
+ this.$message({
+ message: "提交成功",
+ type: "success",
+ });
+ done();
+ this.forms = false;
+ } else {
+ this.$message({
+ message: "提交失败",
+ type: "warning",
+ });
+ }
+ });
+ },
tip0() {
if (this.panduanmeiyouziduan()) {
return;
@@ -641,13 +627,13 @@
this.tipover();
},
tip1up1() {
- this.forms = 0;
+ this.forms = true;
},
tip2up2() {
this.forms = 1;
},
tipover() {
- this.forms = -1;
+ this.forms = false;
this.obj0 = {
title0: "保安单位基本信息",
};
diff --git a/src/views/securityUnit/transRegionalcompany.vue b/src/views/securityUnit/transRegionalcompany.vue
index 5598241..4c47ced 100644
--- a/src/views/securityUnit/transRegionalcompany.vue
+++ b/src/views/securityUnit/transRegionalcompany.vue
@@ -71,58 +71,22 @@
</el-button>
</template>
</avue-crud>
- <div class="lod" v-show="forms != -1">
- <div class="lod-in">
- <!-- <el-col class="trees" v-if="forms == 0">
- <div class="box">
- <el-scrollbar>
- <basic-container>
- <avue-tree
- :option="treeOption"
- :data="treeData"
- @node-click="nodeClick"
- />
- </basic-container>
- </el-scrollbar>
- </div>
- </el-col> -->
- <avue-form
- ref="form"
- v-model="obj0"
- :option="option0"
- v-if="forms == 0"
- >
- <template slot="menuForm">
- <el-button type="primary" @click="tip0">下一页</el-button>
- <el-button type="info" @click="tipover">取消</el-button>
- </template>
- </avue-form>
- <avue-form
- ref="form1"
- v-model="obj1"
- :option="option1"
- v-else-if="forms == 1"
- >
- <template slot="menuForm">
- <el-button type="primary" @click="tip1up1">上一页</el-button>
- <el-button type="primary" @click="tip1">下一页</el-button>
- <el-button type="info" @click="tipover">取消</el-button>
- </template>
- </avue-form>
- <avue-form
- ref="form2"
- v-model="obj2"
- :option="option2"
- v-else-if="forms == 2"
- >
- <template slot="menuForm">
- <el-button type="primary" @click="tip2up2">上一页</el-button>
- <el-button type="primary" @click="tip2">提交</el-button>
- <el-button type="info" @click="tipover">取消</el-button>
- </template>
- </avue-form>
- </div>
- </div>
+ <el-dialog
+ :visible.sync="forms"
+ width="80%"
+ top="5vh"
+ :modal-append-to-body="false"
+ class="addCompany"
+ >
+ <avue-form
+ ref="form"
+ v-model="obj0"
+ :option="option0"
+ v-if="forms"
+ @submit="handleSubmit"
+ >
+ </avue-form>
+ </el-dialog>
</div>
<el-dialog
title="保安单位导入"
@@ -258,7 +222,7 @@
},
option0: {
emptyBtn: false,
- submitBtn: false,
+ submitBtn: true,
gutter: 30,
column: column0,
},
@@ -281,7 +245,7 @@
column: column2,
},
- forms: -1,
+ forms: false,
data0: {},
data1: {},
data2: {},
@@ -309,6 +273,10 @@
column: column,
},
};
+ },
+ created() {
+ this.option0.column[4].value = 2;
+ this.option0.column[4].disabled = true;
},
computed: {
...mapGetters(["userInfo"]),
@@ -384,13 +352,31 @@
},
rowSave(form, done, loading) {
// console.log("save1");
- this.forms = 0;
+ this.forms = true;
var that = this;
//先获取部门接口
getDeptLazyTree().then((res) => {
var d = res.data.data;
that.treeData = d;
// console.log(d);
+ });
+ },
+ handleSubmit(form, done) {
+ console.log(form);
+ adddata(form).then((res) => {
+ if (res.data.success) {
+ this.$message({
+ message: "提交成功",
+ type: "success",
+ });
+ done();
+ this.forms = false;
+ } else {
+ this.$message({
+ message: "提交失败",
+ type: "warning",
+ });
+ }
});
},
searchChange(params, done) {
@@ -626,7 +612,7 @@
this.tipover();
},
tip1up1() {
- this.forms = 0;
+ this.forms = true;
},
tip2up2() {
this.forms = 1;
diff --git "a/src/views/securityUnit\345\244\207\344\273\275/armedEscort.vue" "b/src/views/securityUnit\345\244\207\344\273\275/armedEscort.vue"
new file mode 100644
index 0000000..686ec8c
--- /dev/null
+++ "b/src/views/securityUnit\345\244\207\344\273\275/armedEscort.vue"
@@ -0,0 +1,706 @@
+<template>
+ <basic-container>
+ <div class="securityUnit">
+ <avue-crud
+ :option="option"
+ :data="data"
+ :page.sync="page"
+ ref="crudrec"
+ @on-load="onLoad"
+ :table-loading="loading"
+ @row-save="rowSave"
+ @search-change="searchChange"
+ @search-reset="searchReset"
+ @row-update="rowUpdate"
+ @row-del="rowDel"
+ @selection-change="selectionChange"
+ @refresh-change="refreshChange"
+ >
+ <!-- @row-click="rowClick" -->
+ <template slot-scope="{ row }" slot="znum">
+ <el-tag
+ class="rowClickSelf"
+ @click="rowClickSelf(row)"
+ title="点击查看保安人员情况"
+ >{{ row.znum }}</el-tag
+ >
+ </template>
+
+ <template slot-scope="{ type, size, row }" slot="menu">
+ <el-button
+ icon="el-icon-s-custom"
+ :size="size"
+ :type="type"
+ @click.stop="rowClick(row)"
+ >查看
+ </el-button>
+ <el-button
+ :size="size"
+ :type="type"
+ @click="handleUploadPage(row)"
+ icon="el-icon-circle-check"
+ >附件上传
+ </el-button>
+ </template>
+ <template slot="menuLeft">
+ <el-button
+ type="primary"
+ icon="el-icon-plus"
+ size="small"
+ plain
+ @click.stop="rowSave"
+ >新增</el-button
+ >
+ <el-button
+ type="danger"
+ size="small"
+ plain
+ icon="el-icon-delete"
+ @click="handleDelete"
+ >删 除
+ </el-button>
+ <el-button
+ type="success"
+ size="small"
+ plain
+ icon="el-icon-upload2"
+ @click="handleImport1"
+ >批量导入
+ </el-button>
+ </template>
+ </avue-crud>
+ <div class="lod" v-show="forms != -1">
+ <div class="lod-in">
+ <!-- <el-col class="trees" v-if="forms == 0">
+ <div class="box">
+ <el-scrollbar>
+ <basic-container>
+ <avue-tree
+ :option="treeOption"
+ :data="treeData"
+ @node-click="nodeClick"
+ />
+ </basic-container>
+ </el-scrollbar>
+ </div>
+ </el-col> -->
+ <avue-form
+ ref="form"
+ v-model="obj0"
+ :option="option0"
+ v-if="forms == 0"
+ >
+ <template slot="menuForm">
+ <el-button type="primary" @click="tip0">下一页</el-button>
+ <el-button type="info" @click="tipover">取消</el-button>
+ </template>
+ </avue-form>
+ <avue-form
+ ref="form1"
+ v-model="obj1"
+ :option="option1"
+ v-else-if="forms == 1"
+ >
+ <template slot="menuForm">
+ <el-button type="primary" @click="tip1up1">上一页</el-button>
+ <el-button type="primary" @click="tip1">下一页</el-button>
+ <el-button type="info" @click="tipover">取消</el-button>
+ </template>
+ </avue-form>
+ <avue-form
+ ref="form2"
+ v-model="obj2"
+ :option="option2"
+ v-else-if="forms == 2"
+ >
+ <template slot="menuForm">
+ <el-button type="primary" @click="tip2up2">上一页</el-button>
+ <el-button type="primary" @click="tip2">提交</el-button>
+ <el-button type="info" @click="tipover">取消</el-button>
+ </template>
+ </avue-form>
+ </div>
+ </div>
+ </div>
+ <el-dialog
+ title="保安单位导入"
+ append-to-body
+ :visible.sync="excelBox1"
+ width="555px"
+ >
+ <avue-form
+ :option="excelOption1"
+ v-model="excelForm1"
+ :upload-after="uploadAfter1"
+ >
+ <template slot="excelTemplate">
+ <el-button type="primary" @click="handleTemplate1">
+ 点击下载<i class="el-icon-download el-icon--right"></i>
+ </el-button>
+ </template>
+ </avue-form>
+ </el-dialog>
+ </basic-container>
+</template>
+
+<script>
+import { column, column0, column1, column2 } from "./data";
+import {
+ getdata,
+ adddata,
+ update,
+ remove,
+ adddata1,
+ adddata2,
+ getDeptLazyTree,
+} from "@/api/securityUnit/securityUnit";
+import { mapGetters } from "vuex";
+export default {
+ data() {
+ var w = 160,
+ s = 12;
+ return {
+ excelBox1: false,
+ excelForm1: {},
+ excelOption1: {
+ submitBtn: false,
+ emptyBtn: false,
+ column: [
+ {
+ label: "文件上传",
+ prop: "excelFile",
+ type: "upload",
+ drag: true,
+ loadText: "文件上传中,请稍等",
+ span: 24,
+ propsHttp: {
+ res: "data",
+ },
+ tip: "请上传 .xls,.xlsx 标准格式文件",
+ action: "/api/information/import-informaton",
+ },
+ {
+ label: "模板下载",
+ prop: "excelTemplate",
+ formslot: true,
+ span: 24,
+ },
+ ],
+ },
+
+ loading: true, //保安单位基本信息
+ selectionList: [],
+ page: {
+ pageSize: 10,
+ currentPage: 1,
+ total: 0,
+ },
+
+ treeData: [],
+ treeOption: {
+ title: "我是标题",
+ filterText: "搜索关键字自定义",
+ defaultExpandAll: true,
+ addBtn: false,
+ menu: false,
+ size: "small",
+ formOption: {
+ labelWidth: 100,
+ column: [
+ {
+ label: "自定义项",
+ prop: "label",
+ },
+ ],
+ },
+ props: {
+ labelText: "标题",
+ label: "title",
+ value: "id",
+ children: "children",
+ },
+ },
+
+ obj0: {
+ title0: "保安单位基本信息",
+ },
+ option0: {
+ emptyBtn: false,
+ submitBtn: false,
+ gutter: 30,
+ column: column0,
+ },
+ obj1: {
+ title1: "保安单位出资人员",
+ },
+ option1: {
+ emptyBtn: false,
+ submitBtn: false,
+ gutter: 30,
+ column: column1,
+ },
+ obj2: {
+ title2: "主要管理人员信息",
+ },
+ option2: {
+ emptyBtn: false,
+ submitBtn: false,
+ gutter: 30,
+ column: column2,
+ },
+
+ forms: -1,
+ data0: {},
+ data1: {},
+ data2: {},
+ b0: {},
+ b1: {},
+ b2: {},
+ noshehuibianma: 0,
+ nobumen: 0,
+
+ query: {},
+ data: [],
+ option: {
+ index: true,
+ addBtn: false,
+ // card: true,
+ tip: false,
+ searchSize: "mini",
+ searchMenuSpan: 6,
+ height: 583,
+ menuWidth: 275,
+ border: true,
+ align: "center",
+ selection: true,
+ column: column,
+ },
+ };
+ },
+ computed: {
+ ...mapGetters(["userInfo"]),
+ ids() {
+ let ids = [];
+ this.selectionList.forEach((ele) => {
+ ids.push(ele.creditcode);
+ });
+ return ids.join(",");
+ },
+ ids1() {
+ let ids1 = [];
+ this.selectionList.forEach((ele) => {
+ ids1.push(ele.departmentid);
+ });
+ return ids1.join(",");
+ },
+ haveID() {
+ return this.obj0.creditcode;
+ },
+ },
+ methods: {
+ rowClickSelf(val) {
+ // console.log(val.departmentid);
+ this.$router.push({
+ path: "/securityGuardOnce/index",
+ query: { departmentid: val.departmentid },
+ });
+ },
+ handleImport1() {
+ this.excelBox1 = true;
+ },
+ uploadAfter1(res, done, loading, column) {
+ window.console.log(column);
+ this.excelBox1 = false;
+ // this.refreshChange();
+ done();
+ },
+ handleTemplate1() {
+ window.open(`/api/examSubjectChoices/export-template`);
+ },
+
+ // handleChangeTABS(column) {
+ // this.typeTABS = column;
+ // // this.$message.success(JSON.stringify(column));
+ // if (column.prop == "tab1") {
+ // this.loading1 = false;
+ // this.loading2 = false;
+ // this.onLoad(this.page);
+ // } else if (column.prop == "tab2") {
+ // this.loading = false;
+ // this.loading2 = false;
+ // this.onLoad1(this.page1); //第二个表格不会自动执行
+ // } else if (column.prop == "tab3") {
+ // this.loading1 = false;
+ // this.loading = false;
+ // this.onLoad2(this.page2); //第二个表格不会自动执行
+ // }
+ // },
+ //保安单位基本信息
+ sizeChange(val) {
+ this.page1.currentPage = 1;
+ this.page1.pageSize = val;
+ // this.getData();
+ this.onLoad(this.page, this.query);
+ // this.$message.success("行数" + val);
+ },
+ currentChange(val) {
+ this.page1.currentPage = val;
+ // this.getData();
+ this.onLoad(this.page, this.query);
+ // this.$message.success("页码" + val);
+ },
+ rowSave(form, done, loading) {
+ // console.log("save1");
+ this.forms = 0;
+ var that = this;
+ //先获取部门接口
+ getDeptLazyTree().then((res) => {
+ var d = res.data.data;
+ that.treeData = d;
+ // console.log(d);
+ });
+ },
+ searchChange(params, done) {
+ this.query = params;
+ this.page.currentPage = 1;
+ this.onLoad(this.page, params);
+ done();
+ },
+ searchReset() {
+ this.query = {};
+ this.onLoad(this.page);
+ },
+ rowUpdate(row, index, done, loading) {
+ delete row.tenantid;
+ delete row.regstsat;
+ console.log(row, 0);
+ update(row).then(
+ () => {
+ this.onLoad(this.page);
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ });
+ done();
+ },
+ (error) => {
+ window.console.log(error);
+ loading();
+ }
+ );
+ },
+ rowDel(row) {
+ this.$confirm("确定将选择数据删除?", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning",
+ })
+ .then(() => {
+ console.log(row);
+ return remove(row.creditcode, row.departmentid);
+ })
+ .then(() => {
+ this.onLoad(this.page);
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ });
+ });
+ },
+ selectionChange(list) {
+ this.selectionList = list;
+ },
+ handleDelete() {
+ if (this.selectionList.length === 0) {
+ this.$message.warning("请选择至少一条数据");
+ return;
+ }
+ this.$confirm("确定批量将选择数据删除?", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning",
+ })
+ .then(() => {
+ // console.log(this.ids);
+ return remove(this.ids, this.ids1);
+ })
+ .then(() => {
+ this.onLoad(this.page);
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ });
+ this.$refs.crudrec.toggleSelection();
+ })
+ .catch((res) => {});
+ },
+ refreshChange() {
+ this.onLoad(this.page, this.query);
+ },
+ rowClick(row) {
+ // console.log(row);
+ // row.identificationnumber; //统一社会信用代 码
+ window.localStorage.setItem("danweidata", JSON.stringify(row));
+ this.$router.push({
+ path: "/securityUnitChild",
+ // redirect: { name: "foo" },
+ query: { rowsecurity: "fromSecurity" },
+ // params: { row: row.identificationnumber },
+ });
+ },
+ //跳转到附近列表页面
+ handleUploadPage(row) {
+ this.$router.push({
+ path: `/resource/attachCopy`,
+ query: {
+ deptId: row.departmentid,
+ enterprisename: row.enterprisename,
+ },
+ });
+ },
+ onLoad(page, params = {}) {
+ if (this.userInfo.role_id == "1414840172333842433") {
+ console.log("是公安add jurisdiction");
+ params["jurisdiction"] = this.userInfo.jurisdiction;
+ }
+ params["stats"] = "3";
+ this.loading = true;
+ getdata(
+ page.currentPage,
+ page.pageSize,
+ Object.assign(params, this.query)
+ ).then((res) => {
+ const data = res.data.data;
+ this.page.total = data.total;
+ this.data = data.records;
+ window.localStorage.setItem("danweidataS", JSON.stringify(this.data));
+ console.log(this.data);
+ this.loading = false;
+ });
+ },
+ // nodeClick(data) {//分局 不在这添加
+ // // this.treeDeptId = data.id;
+ // // this.page.currentPage = 1;
+ // // this.onLoad(this.page);
+ // // this.$message.success(JSON.stringify(data));
+ // this.obj0["departmentid"] = data.title;
+ // this.obj1["departmentid"] = data.title;
+ // this.obj2["departmentid"] = data.title;
+ // this.obj0["useid"] = data.id;
+ // this.obj1["useid"] = data.id;
+ // this.obj2["useid"] = data.id;
+ // this.nobumen = 1;
+ // },
+ tip0() {
+ if (this.panduanmeiyouziduan()) {
+ return;
+ }
+ var d = {};
+ for (var k in this.obj0) {
+ for (var i in column0) {
+ if (k == column0[i].prop && k != "title0") {
+ d[k] = this.obj0[k];
+ }
+ }
+ }
+ console.log(d);
+ for (var k in d) {
+ if (d[k] == "" || d[k] == undefined) {
+ console.log(k);
+ this.$message.warning("请检查表单是否填写完整!");
+ return;
+ }
+ }
+ console.log(d, 0);
+ this.data0 = d;
+ this.forms = 1;
+ },
+ tip1() {
+ if (this.panduanmeiyouziduan()) {
+ return;
+ }
+ var d = {};
+ for (var k in this.obj1) {
+ for (var i in column1) {
+ if (k == column1[i].prop && k != "title1") {
+ d[k] = this.obj1[k];
+ }
+ }
+ }
+ d["capital"] = d["capital2"];
+ delete d["capital2"];
+ // console.log(d);
+ for (var k in d) {
+ if (d[k] == "" || d[k] == undefined) {
+ console.log(k);
+ this.$message.warning("请检查表单是否填写完整!");
+ return;
+ }
+ }
+ console.log(d, 1);
+ this.data1 = d;
+ this.forms = 2;
+ },
+ tip2() {
+ if (this.panduanmeiyouziduan()) {
+ return;
+ }
+ var d = {};
+ for (var k in this.obj2) {
+ for (var i in column2) {
+ if (k == column2[i].prop && k != "title2") {
+ d[k] = this.obj2[k];
+ }
+ }
+ }
+ console.log(d);
+ d["cardid"] = d["cardid2"];
+ delete d["cardid2"];
+ d["cell"] = d["cell2"];
+ delete d["cell2"];
+ // d["shareholdingratio"] = d["shareholdingratio2"];
+ // delete d["shareholdingratio2"];
+ for (var k in d) {
+ if (d[k] == "" || d[k] == undefined) {
+ console.log(k);
+ this.$message.warning("请检查表单是否填写完整!");
+ return;
+ }
+ }
+ console.log(d, 2);
+ this.data2 = d;
+
+ // this.data0.departmentid = this.data0.useid;
+ // this.data1.departmentid = this.data1.useid;
+ // this.data2.departmentid = this.data2.useid;
+ // delete this.data0.useid;
+ // delete this.data1.useid;
+ // delete this.data2.useid;
+
+ adddata(this.data0).then((res) => {
+ console.log(res, 0);
+ });
+ adddata1(this.data1).then((res) => {
+ console.log(res, 1);
+ });
+ adddata2(this.data2).then((res) => {
+ console.log(res, 2);
+ });
+ var time = setTimeout(() => {
+ this.onLoad(this.page, this.query);
+ console.log(this.data0, this.data1, this.data2, "已刷新");
+ }, 500);
+ this.tipover();
+ },
+ tip1up1() {
+ this.forms = 0;
+ },
+ tip2up2() {
+ this.forms = 1;
+ },
+ tipover() {
+ this.forms = -1;
+ this.obj0 = {
+ title0: "保安单位基本信息",
+ };
+ this.obj1 = {
+ title1: "保安单位出资人员",
+ };
+ this.obj2 = {
+ title2: "主要管理人员信息",
+ };
+ this.data0 = {};
+ this.data1 = {};
+ this.data2 = {};
+ this.noshehuibianma = 0;
+ this.nobumen = 0;
+ },
+ panduanmeiyouziduan() {
+ if (this.noshehuibianma == 0) {
+ this.$message.warning("请输入统一社会信用代码");
+ return true;
+ }
+ if (this.nobumen == 0) {
+ return false;
+ this.$message.warning("请选则部门");
+ }
+ return false;
+ },
+ },
+ watch: {
+ haveID() {
+ // console.log(this.haveID);
+ if (this.haveID != undefined) {
+ if (this.haveID.length > 5) {
+ //统一社会信用代码判断
+ this.noshehuibianma = 1;
+ } else {
+ this.noshehuibianma = 0;
+ }
+ }
+ },
+ havedata() {
+ console.log(this.havedata, "qqqqq");
+ },
+ },
+ mounted() {},
+};
+</script>
+
+<style lang="scss">
+.securityUnit {
+ width: 100%;
+ height: 100%;
+ // border: 1px solid #000;
+ box-sizing: border-box;
+}
+// .el-card__body {
+// padding-bottom: 5px !important;
+// }
+// .avue-crud__tip,
+// .el-tag,
+// .el-tag--light {
+// padding: 0 !important;
+// }
+
+.lod {
+ position: absolute;
+ top: 0;
+ left: 0;
+ width: 100%;
+ height: 100%;
+ background-color: rgba($color: #000000, $alpha: 0.5);
+ padding: 100px 0 0 0;
+ z-index: 500 !important;
+ display: flex;
+ // align-items: center;
+ justify-content: center;
+ .trees {
+ z-index: 501 !important;
+ position: absolute;
+ width: 15%;
+ top: 100px;
+ left: 0;
+ // display: none;
+ }
+ .lod-in {
+ width: 70%;
+ height: auto;
+ background-color: transparent;
+
+ // padding: 10px 0 0 0;
+ }
+
+ .el-collapse-item {
+ padding-top: 15px !important;
+ }
+}
+.el-collapse {
+ border-top: 1px solid transparent !important;
+}
+.rowClickSelf {
+ &:hover {
+ cursor: pointer;
+ }
+}
+</style>
diff --git "a/src/views/securityUnit\345\244\207\344\273\275/data.js" "b/src/views/securityUnit\345\244\207\344\273\275/data.js"
new file mode 100644
index 0000000..026374d
--- /dev/null
+++ "b/src/views/securityUnit\345\244\207\344\273\275/data.js"
@@ -0,0 +1,725 @@
+var numbers = (rule, value, callback) => {
+ window.yanzhengnumbers = /^[0-9]+.?[0-9]*$/;
+ if (!yanzhengnumbers.test(value)) {
+ callback(new Error('请输入数字'));
+ } else {
+ callback();
+ }
+};
+
+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();
+ }
+};
+
+var cardids = (rule, value, callback) => {
+ window.yanzhengphons = /^([1-6][1-9]|50)\d{4}(18|19|20)\d{2}((0[1-9])|10|11|12)(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/;
+ if (!yanzhengphons.test(value)) {
+ callback(new Error('请输入正确身份证'));
+ } else {
+ callback();
+ }
+};
+
+var DIC = [
+ {
+ label: '招聘中',
+ value: 1,
+ }, {
+ label: '停止招聘',
+ value: 2,
+ }
+]
+
+export var column = [
+ {
+ label: "统一社会信用代码",
+ prop: "creditcode",
+ width: 140,
+ hide: true,
+
+ labelWidth: 160,
+ // hide: true,
+ // editDisplay: false,
+ // addDisplay: false
+ },
+
+ {
+ label: "企业名称",
+ prop: "enterprisename",
+ search: true,
+ width: 260,
+ searchSpan: 4,
+ labelWidth: 160,
+ // width: 130,
+ overHidden: true
+ },
+
+ {
+ label: "企业类型",
+ prop: "stats",
+ type: "tree",
+ hide: true,
+ labelWidth: 160,
+ dicUrl: "/api/blade-system/dict-biz/dictionary?code=stats",
+ props: {
+ label: "dictValue",
+ value: "dictKey"
+ },
+ width: 130,
+ rules: [
+ {
+ required: true,
+ message: "请选择企业类型",
+ trigger: "click",
+ },
+ ],
+ },
+ {
+ label: "法定代表人",
+ labelWidth: 160,
+ prop: "representative",
+ width: 110,
+ search: true,
+ searchSpan: 4,
+ searchLabelWidth: 100
+ },
+ {
+ label: "法定代表人电话",
+ labelWidth: 160,
+ prop: "representativecell",
+ width: 120,
+ // search: true,
+ searchSpan: 4,
+ searchLabelWidth: 100,
+ },
+
+ {
+ label: "保安人数",
+ labelWidth: 160,
+ prop: "znum",
+ width: 69,
+ // search: true,
+ searchSpan: 4,
+ searchLabelWidth: 100
+ },
+ {
+ label: "派遣人数",
+ labelWidth: 160,
+ prop: "pnum",
+ width: 69,
+ // search: true,
+ searchSpan: 4,
+ searchLabelWidth: 100
+ },
+ {
+ label: "持证人数",
+ labelWidth: 160,
+ prop: "cnum",
+ width: 69,
+ // search: true,
+ searchSpan: 4,
+ searchLabelWidth: 100
+ },
+ {
+ label: "注册时间",
+ prop: "establishtime",
+ labelWidth: 160,
+ width: 130,
+ overHidden: true,
+ type: "date",
+ format: "yyyy-MM-dd",
+ valueFormat: "yyyy-MM-dd",
+
+ },
+ {
+ label: "注册资本",
+ prop: "registeredcapital",
+ hide: true,
+ labelWidth: 160,
+ // search: true,
+ width: 80,
+ },
+ {
+ label: "联系人",
+ prop: "contacts",
+ labelWidth: 160,
+ width: 85,
+ }, {
+ label: "联系电话",
+ prop: "contactscell",
+ labelWidth: 160,
+ width: 95,
+ },
+
+ {
+ label: "注册地址",
+ prop: "address",
+ labelWidth: 160,
+ // search: true,
+ hide: true,
+ },
+ {
+ label: "经营范围",
+ prop: "business",
+ // search: true,
+ labelWidth: 160,
+ hide: true,
+ // width: 110,
+ overHidden: true
+ },
+ {
+ label: "所属辖区",
+ prop: "jurisdiction",
+ labelWidth: 160,
+ type: "tree",
+ dicUrl: "/api//jurisdiction/lazy-trees",
+ props: {
+ label: "title",
+ value: "id"
+ },
+ // labelWidth: w,
+ // span: s,
+ rules: [
+ {
+ required: true,
+ message: "请选择所属辖区",
+ trigger: "click",
+ },
+ ],
+ // width: 110,
+ // search: true,
+ overHidden: true
+ },
+ {
+ label: "登记机关",
+ prop: "registration",
+ // search: true,
+ labelWidth: 160,
+ // width: 88,
+ overHidden: true,
+ hide: true,
+ },
+
+ {
+ label: "所属行业",
+ prop: "industry",
+ labelWidth: 160,
+ hide: true,
+ // search: true,
+ // width: 88,
+ },
+]
+
+var w = 160
+ , s = 12;
+export var column0 = [
+ {
+ label: "",
+ labelWidth: 20,
+ type: 'title',
+ prop: "title0",
+ span: 24,
+ styles: {
+ fontSize: '24px'
+ }
+ },
+ {
+ label: "统一社会信用代码",
+ prop: "creditcode",
+ labelWidth: w,
+ span: s,
+ rules: [{
+ required: true,
+ message: "请输入社会信用代码",
+ trigger: "blur"
+ }]
+ },
+ {
+ label: "所属辖区",
+ prop: "jurisdiction",
+ // type: "tree",
+ // disabled: true,
+ type: "tree",
+ dicUrl: "/api//jurisdiction/lazy-trees",
+ props: {
+ label: "title",
+ value: "id"
+ },
+ labelWidth: w,
+ span: s,
+ rules: [
+ {
+ required: true,
+ message: "请选择所属辖区",
+ trigger: "click",
+ },
+ ],
+ },
+ // {
+ // label: "机构",
+ // prop: "departmentids",
+ // // type: "tree",
+ // // disabled: true,
+ // type: "tree",
+ // dicUrl: "/api/blade-system/dept/lazy-tree?parentId=0",
+ // props: {
+ // label: "title",
+ // value: "id"
+ // },
+ // labelWidth: w,
+ // span: s,
+ // rules: [
+ // {
+ // required: true,
+ // message: "请选择所属部门",
+ // trigger: "click",
+ // },
+ // ],
+ // },
+ {
+ label: "企业类型",
+ prop: "stats",
+ type: "tree",
+ dicUrl: "/api/blade-system/dict-biz/dictionary?code=stats",
+ props: {
+ label: "dictValue",
+ value: "dictKey"
+ },
+ labelWidth: w,
+ span: s,
+ rules: [
+ {
+ required: true,
+ message: "请选择企业类型",
+ trigger: "click",
+ },
+ ],
+ },
+ {
+ label: "企业名称",
+ prop: "enterprisename",
+ labelWidth: w,
+ span: s,
+ rules: [{
+ required: true,
+ message: "请输入企业名称",
+ trigger: "blur"
+ }]
+ },
+ {
+ label: "法定代表人",
+ prop: "representative",
+ labelWidth: w,
+ span: s,
+ rules: [{
+ required: true,
+ message: "请输入法定代表人",
+ trigger: "blur"
+ }]
+ },
+ {
+ label: "法定代表人电话",
+ prop: "representativecell",
+ labelWidth: w,
+ span: s,
+ rules: [{
+ required: true,
+ message: "请输入法定代表人电话",
+ trigger: "blur"
+ },
+ {
+ validator: phones, trigger: ['change', 'blur']
+ },]
+ }, {
+ label: "联系人",
+ prop: "contacts",
+ labelWidth: w,
+ span: s,
+ rules: [{
+ required: true,
+ message: "请输入联系人",
+ trigger: "blur"
+ }]
+ },
+ {
+ label: "联系电话",
+ prop: "contactscell",
+ labelWidth: w,
+ span: s,
+ rules: [{
+ required: true,
+ message: "请输入联系电话",
+ trigger: "blur"
+ },
+ {
+ validator: phones, trigger: ['change', 'blur']
+ }]
+ },
+ // {
+ // label: "企业类型",
+ // prop: "stats",
+ // labelWidth: w,
+ // span: s,
+ // rules: [{
+ // required: true,
+ // message: "请输入企业类型",
+ // trigger: "blur"
+ // }]
+ // },
+ {
+ label: "注册时间",
+ prop: "establishtime",
+ labelWidth: w,
+ span: s,
+ type: "date",
+ format: "yyyy-MM-dd",
+ valueFormat: "yyyy-MM-dd",
+ rules: [{
+ required: true,
+ message: "请输入注册时间",
+ trigger: "blur"
+ }]
+ },
+ {
+ label: "注册资本(万元人民币)",
+ prop: "registeredcapital",
+ labelWidth: w,
+ span: s,
+ rules: [{
+ required: true,
+ message: "请输入注册资本",
+ trigger: "blur"
+ }]
+ },
+ {
+ label: "实缴资本(万元人民币)",
+ prop: "capital",
+ labelWidth: w,
+ span: s,
+ },
+ {
+ label: "组织机构代码",
+ prop: "organizationcode",
+ labelWidth: w,
+ span: s,
+ rules: [{
+ required: true,
+ message: "请输入组织机构代码",
+ trigger: "blur"
+ }]
+ },
+ {
+ label: "工商注册号",
+ prop: "registrationnumber",
+
+ labelWidth: w,
+ span: s,
+ rules: [{
+ required: true,
+ message: "请输入工商注册号",
+ trigger: "blur"
+ }]
+ },
+ {
+ label: "纳税人识别号",
+ prop: "identificationnumber",
+ labelWidth: w,
+ span: s,
+ rules: [{
+ required: true,
+ message: "请输入纳税人识别号",
+ trigger: "blur"
+ }]
+ },
+ // {
+ // label: "企业类型",
+ // prop: "enterprises",
+ // labelWidth: w,
+ // span: s,
+ // rules: [{
+ // required: true,
+ // message: "请输入企业类型",
+ // trigger: "blur"
+ // }]
+ // },
+ {
+ label: "注册地址",
+ prop: "address",
+ labelWidth: w,
+ span: s,
+ rules: [{
+ required: true,
+ message: "请输入注册地址",
+ trigger: "blur"
+ }]
+ },
+ {
+ label: "经营范围",
+ prop: "business",
+ labelWidth: w,
+ span: s,
+ rules: [{
+ required: true,
+ message: "请输入经营范围",
+ trigger: "blur"
+ }]
+ },
+ // {
+ // label: "所属地区",
+ // prop: "region",
+ // labelWidth: w,
+ // span: s,
+ // rules: [{
+ // required: true,
+ // message: "请输入所属地区",
+ // trigger: "blur"
+ // }]
+ // },
+ {
+ label: "登记机关",
+ prop: "registration",
+ labelWidth: w,
+ span: s,
+ rules: [{
+ required: true,
+ message: "请输入登记机关",
+ trigger: "blur"
+ }]
+ // overHidden: true,
+ },
+
+ {
+ label: "所属行业",
+ prop: "industry",
+ labelWidth: w,
+ span: s,
+ rules: [{
+ required: true,
+ message: "请输入所属行业",
+ trigger: "blur"
+ }]
+ }
+]
+
+export var column1 = [
+ {
+ label: "",
+ labelWidth: 20,
+ type: 'title',
+ prop: "title1",
+ span: 24,
+ styles: {
+ fontSize: '24px'
+ }
+ },
+ {
+ label: "统一社会信用代码",
+ prop: "creditcode",
+ disabled: true,
+ labelWidth: w,
+ span: s,
+ rules: [{
+ required: true,
+ message: "请输入统一社会信用代码",
+ trigger: "blur"
+ }]
+ },
+ // {
+ // label: "部门",
+ // prop: "departmentid",
+ // // type: "tree",
+ // disabled: true,
+ // dicData: [],
+ // labelWidth: w,
+ // span: s,
+ // props: {
+ // label: "title",
+ // },
+ // rules: [
+ // {
+ // required: true,
+ // message: "请选择所属部门",
+ // trigger: "click",
+ // },
+ // ],
+ // },
+ {
+ label: "股东",
+ prop: "shareholder",
+ labelWidth: w,
+ span: s,
+ rules: [{
+ required: true,
+ message: "请输入法定代表人",
+ trigger: "blur"
+ }]
+ }, {
+ label: "持股比例(%)",
+ prop: "shareholdingratio",
+ labelWidth: w,
+ span: s,
+ rules: [{
+ required: true,
+ message: "请输入持股比例",
+ trigger: "blur"
+ }]
+ },
+ // {
+ // label: "最终受益股份",
+ // prop: "beneficial",
+ // labelWidth: w,
+ // span: s
+ // },
+ {
+ label: "出资金额",
+ prop: "capital2",
+ labelWidth: w,
+ span: s,
+ rules: [{
+ required: true,
+ message: "请输入出资金额",
+ trigger: "blur"
+ }]
+ }, {
+ label: "出资时间",
+ prop: "capitaltime",
+ type: "date",
+ format: "yyyy-MM-dd",
+ valueFormat: "yyyy-MM-dd",
+ labelWidth: w,
+ span: s,
+ rules: [{
+ required: true,
+ message: "请输入出资时间",
+ trigger: "blur"
+ }]
+ }, {
+ label: "身份证",
+ prop: "cardid",
+ labelWidth: w,
+ span: s,
+ rules: [{
+ required: true,
+ message: "请输入身份证",
+ trigger: "blur"
+ },
+ {
+ validator: cardids, trigger: ['change', 'blur']
+ }]
+ }, {
+ label: "联系电话",
+ prop: "cell",
+ labelWidth: w,
+ span: s,
+ rules: [{
+ required: true,
+ message: "请输入联系电话",
+ trigger: "blur"
+ },
+ {
+ validator: phones, trigger: ['change', 'blur']
+ }]
+ },
+]
+
+export var column2 = [
+ {
+ label: "",
+ labelWidth: 20,
+ type: 'title',
+ prop: "title2",
+ span: 24,
+ styles: {
+ fontSize: '24px'
+ }
+ },
+ {
+ label: "统一社会信用代码",
+ prop: "creditcode",
+ disabled: true,
+ labelWidth: w,
+ span: s,
+ rules: [{
+ required: true,
+ message: "请输入统一社会信用代码",
+ trigger: "blur"
+ }]
+ },
+ // {
+ // label: "部门",
+ // prop: "departmentid",
+ // // type: "tree",
+ // disabled: true,
+ // dicData: [],
+ // labelWidth: w,
+ // span: s,
+ // props: {
+ // label: "title",
+ // },
+ // rules: [
+ // {
+ // required: true,
+ // message: "请选择所属部门",
+ // trigger: "click",
+ // },
+ // ],
+ // },
+ {
+ label: "姓名",
+ prop: "name",
+ labelWidth: w,
+ span: s,
+ rules: [{
+ required: true,
+ message: "请输入姓名",
+ trigger: "blur"
+ }]
+ }, {
+ label: "职务",
+ prop: "post",
+ labelWidth: w,
+ span: s,
+ rules: [{
+ required: true,
+ message: "请输入职务",
+ trigger: "blur"
+ }]
+ }, {
+ label: "身份证",
+ prop: "cardid2",
+ labelWidth: w,
+ span: s,
+ rules: [{
+ required: true,
+ message: "请输入身份证",
+ trigger: "blur"
+ },
+ {
+ validator: cardids, trigger: ['change', 'blur']
+ }]
+ }, {
+ label: "联系电话",
+ prop: "cell2",
+ labelWidth: w,
+ span: s,
+ rules: [{
+ required: true,
+ message: "请输入联系电话",
+ trigger: "blur"
+ },
+ {
+ validator: phones, trigger: ['change', 'blur']
+ }]
+ }
+ // , {
+ // label: "持股比例(%)",
+ // prop: "shareholdingratio2",
+ // labelWidth: w,
+ // span: s
+ // }
+]
diff --git "a/src/views/securityUnit\345\244\207\344\273\275/index.vue" "b/src/views/securityUnit\345\244\207\344\273\275/index.vue"
new file mode 100644
index 0000000..9f6b96c
--- /dev/null
+++ "b/src/views/securityUnit\345\244\207\344\273\275/index.vue"
@@ -0,0 +1,712 @@
+<template>
+ <basic-container>
+ <div class="securityUnit">
+ <avue-crud
+ :option="option"
+ :data="data"
+ :page.sync="page"
+ ref="crudrec"
+ @on-load="onLoad"
+ :table-loading="loading"
+ @row-save="rowSave"
+ @search-change="searchChange"
+ @search-reset="searchReset"
+ @row-update="rowUpdate"
+ @row-del="rowDel"
+ @selection-change="selectionChange"
+ @refresh-change="refreshChange"
+ @row-click="rowClick"
+ >
+ <template slot-scope="{ type, size, row }" slot="menu">
+ <el-button
+ :size="size"
+ :type="type"
+ @click="handleUploadPage(row)"
+ icon="el-icon-circle-check"
+ >附件上传
+ </el-button>
+ </template>
+ <template slot="menuLeft">
+ <el-button
+ type="primary"
+ icon="el-icon-plus"
+ size="small"
+ plain
+ @click.stop="rowSave"
+ >新增</el-button
+ >
+ <el-button
+ type="danger"
+ size="small"
+ plain
+ icon="el-icon-delete"
+ @click="handleDelete"
+ >删 除
+ </el-button>
+ <el-button
+ type="success"
+ size="small"
+ plain
+ icon="el-icon-upload2"
+ @click="handleImport1"
+ >批量导入
+ </el-button>
+ </template>
+ </avue-crud>
+ <div class="lod" v-show="forms != -1">
+ <div class="lod-in">
+ <!-- <el-col class="trees" v-if="forms == 0">
+ <div class="box">
+ <el-scrollbar>
+ <basic-container>
+ <avue-tree
+ :option="treeOption"
+ :data="treeData"
+ @node-click="nodeClick"
+ />
+ </basic-container>
+ </el-scrollbar>
+ </div>
+ </el-col> -->
+ <avue-form
+ ref="form"
+ v-model="obj0"
+ :option="option0"
+ v-if="forms == 0"
+ >
+ <template slot="menuForm">
+ <el-button type="primary" @click="tip0">下一页</el-button>
+ <el-button type="info" @click="tipover">取消</el-button>
+ </template>
+ </avue-form>
+ <avue-form
+ ref="form1"
+ v-model="obj1"
+ :option="option1"
+ v-else-if="forms == 1"
+ >
+ <template slot="menuForm">
+ <el-button type="primary" @click="tip1up1">上一页</el-button>
+ <el-button type="primary" @click="tip1">下一页</el-button>
+ <el-button type="info" @click="tipover">取消</el-button>
+ </template>
+ </avue-form>
+ <avue-form
+ ref="form2"
+ v-model="obj2"
+ :option="option2"
+ v-else-if="forms == 2"
+ >
+ <template slot="menuForm">
+ <el-button type="primary" @click="tip2up2">上一页</el-button>
+ <el-button type="primary" @click="tip2">提交</el-button>
+ <el-button type="info" @click="tipover">取消</el-button>
+ </template>
+ </avue-form>
+ </div>
+ </div>
+ </div>
+ <el-dialog
+ title="保安单位导入"
+ append-to-body
+ :visible.sync="excelBox1"
+ width="555px"
+ >
+ <avue-form
+ :option="excelOption1"
+ v-model="excelForm1"
+ :upload-after="uploadAfter1"
+ >
+ <template slot="excelTemplate">
+ <el-button type="primary" @click="handleTemplate1">
+ 点击下载<i class="el-icon-download el-icon--right"></i>
+ </el-button>
+ </template>
+ </avue-form>
+ </el-dialog>
+ </basic-container>
+</template>
+
+<script>
+import { column, column0, column1, column2 } from "./data";
+import {
+ getdata,
+ adddata,
+ update,
+ remove,
+ adddata1,
+ adddata2,
+ getDeptLazyTree,
+} from "@/api/securityUnit/securityUnit";
+import { mapGetters } from "vuex";
+export default {
+ data() {
+ var w = 160,
+ s = 12;
+ return {
+ excelBox1: false,
+ excelForm1: {},
+ excelOption1: {
+ submitBtn: false,
+ emptyBtn: false,
+ column: [
+ {
+ label: "文件上传",
+ prop: "excelFile",
+ type: "upload",
+ drag: true,
+ loadText: "文件上传中,请稍等",
+ span: 24,
+ propsHttp: {
+ res: "data",
+ },
+ tip: "请上传 .xls,.xlsx 标准格式文件",
+ action: "/api/information/import-informaton",
+ },
+ {
+ label: "模板下载",
+ prop: "excelTemplate",
+ formslot: true,
+ span: 24,
+ },
+ ],
+ },
+
+ loading: true, //保安单位基本信息
+ selectionList: [],
+ page: {
+ pageSize: 10,
+ currentPage: 1,
+ total: 0,
+ },
+
+ treeData: [],
+ treeOption: {
+ title: "我是标题",
+ filterText: "搜索关键字自定义",
+ defaultExpandAll: true,
+ addBtn: false,
+ menu: false,
+ size: "small",
+ formOption: {
+ labelWidth: 100,
+ column: [
+ {
+ label: "自定义项",
+ prop: "label",
+ },
+ ],
+ },
+ props: {
+ labelText: "标题",
+ label: "title",
+ value: "id",
+ children: "children",
+ },
+ },
+ // treeOption: {
+ // nodeKey: "id",
+ // // lazy: true,
+ // // treeLoad: function (node, resolve) {
+ // // // const parentId = node.level === 0 ? 0 : node.data.id;
+ // // getDeptLazyTree().then((res) => {
+ // // resolve(
+ // // res.data.data.map((item) => {
+ // // console.log({
+ // // ...item,
+ // // leaf: !item.hasChildren,
+ // // });
+ // // return {
+ // // ...item,
+ // // leaf: !item.hasChildren,
+ // // };
+ // // })
+ // // );
+ // // });
+ // // },
+ // addBtn: false,
+ // menu: false,
+ // size: "small",
+ // props: {
+ // labelText: "标题",
+ // label: "title",
+ // value: "value",
+ // children: "children",
+ // },
+ // },
+
+ obj0: {
+ title0: "保安单位基本信息",
+ },
+ option0: {
+ emptyBtn: false,
+ submitBtn: false,
+ gutter: 30,
+ column: column0,
+ },
+ obj1: {
+ title1: "保安单位出资人员",
+ },
+ option1: {
+ emptyBtn: false,
+ submitBtn: false,
+ gutter: 30,
+ column: column1,
+ },
+ obj2: {
+ title2: "主要管理人员信息",
+ },
+ option2: {
+ emptyBtn: false,
+ submitBtn: false,
+ gutter: 30,
+ column: column2,
+ },
+
+ forms: -1,
+ data0: {},
+ data1: {},
+ data2: {},
+ b0: {},
+ b1: {},
+ b2: {},
+ noshehuibianma: 0,
+ nobumen: 0,
+
+ query: {},
+ data: [],
+ option: {
+ index: true,
+ addBtn: false,
+ // card: true,
+ tip: false,
+ searchSize: "mini",
+ searchMenuSpan: 6,
+ height: 583,
+ menuWidth: 220,
+ align: "center",
+ selection: true,
+ column: column,
+ },
+ };
+ },
+ computed: {
+ ...mapGetters(["userInfo"]),
+ ids() {
+ let ids = [];
+ this.selectionList.forEach((ele) => {
+ ids.push(ele.creditcode);
+ });
+ return ids.join(",");
+ },
+ ids1() {
+ let ids1 = [];
+ this.selectionList1.forEach((ele) => {
+ ids1.push(ele.id);
+ });
+ return ids1.join(",");
+ },
+ ids2() {
+ let ids2 = [];
+ this.selectionList2.forEach((ele) => {
+ ids2.push(ele.id);
+ });
+ return ids2.join(",");
+ },
+ haveID() {
+ return this.obj0.creditcode;
+ },
+ },
+ methods: {
+ handleImport1() {
+ this.excelBox1 = true;
+ },
+ uploadAfter1(res, done, loading, column) {
+ window.console.log(column);
+ this.excelBox1 = false;
+ // this.refreshChange();
+ done();
+ },
+ handleTemplate1() {
+ window.open(`/api/examSubjectChoices/export-template`);
+ },
+
+ // handleChangeTABS(column) {
+ // this.typeTABS = column;
+ // // this.$message.success(JSON.stringify(column));
+ // if (column.prop == "tab1") {
+ // this.loading1 = false;
+ // this.loading2 = false;
+ // this.onLoad(this.page);
+ // } else if (column.prop == "tab2") {
+ // this.loading = false;
+ // this.loading2 = false;
+ // this.onLoad1(this.page1); //第二个表格不会自动执行
+ // } else if (column.prop == "tab3") {
+ // this.loading1 = false;
+ // this.loading = false;
+ // this.onLoad2(this.page2); //第二个表格不会自动执行
+ // }
+ // },
+ //保安单位基本信息
+ sizeChange(val) {
+ this.page1.currentPage = 1;
+ this.page1.pageSize = val;
+ // this.getData();
+ this.onLoad(this.page, this.query);
+ // this.$message.success("行数" + val);
+ },
+ currentChange(val) {
+ this.page1.currentPage = val;
+ // this.getData();
+ this.onLoad(this.page, this.query);
+ // this.$message.success("页码" + val);
+ },
+ rowSave(form, done, loading) {
+ // console.log("save1");
+ this.forms = 0;
+ var that = this;
+ //先获取部门接口
+ getDeptLazyTree().then((res) => {
+ var d = res.data.data;
+ that.treeData = d;
+ // console.log(d);
+ });
+ },
+ searchChange(params, done) {
+ this.query = params;
+ this.page.currentPage = 1;
+ this.onLoad(this.page, params);
+ done();
+ },
+ searchReset() {
+ this.query = {};
+ this.onLoad(this.page);
+ },
+ rowUpdate(row, index, done, loading) {
+ delete row.tenantid;
+ delete row.regstsat;
+ console.log(row, 0);
+ update(row).then(
+ () => {
+ this.onLoad(this.page);
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ });
+ done();
+ },
+ (error) => {
+ window.console.log(error);
+ loading();
+ }
+ );
+ },
+ rowDel(row) {
+ this.$confirm("确定将选择数据删除?", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning",
+ })
+ .then(() => {
+ console.log(row);
+ return remove(row.creditcode, row.departmentid);
+ })
+ .then(() => {
+ this.onLoad(this.page);
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ });
+ });
+ },
+ selectionChange(list) {
+ this.selectionList = list;
+ },
+ handleDelete() {
+ if (this.selectionList.length === 0) {
+ this.$message.warning("请选择至少一条数据");
+ return;
+ }
+ this.$confirm("确定批量将选择数据删除?", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning",
+ })
+ .then(() => {
+ console.log(this.ids);
+ // return remove(this.ids);
+ })
+ .then(() => {
+ this.onLoad(this.page);
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ });
+ this.$refs.crudrec.toggleSelection();
+ });
+ },
+ refreshChange() {
+ this.onLoad(this.page, this.query);
+ },
+ rowClick(row) {
+ // console.log(row);
+ // row.identificationnumber; //统一社会信用代 码
+ window.localStorage.setItem("danweidata", JSON.stringify(row));
+ this.$router.push({
+ path: "/securityUnitChild",
+ // redirect: { name: "foo" },
+ query: { rowsecurity: "fromSecurity" },
+ // params: { row: row.identificationnumber },
+ });
+ },
+ //跳转到附近列表页面
+ handleUploadPage(row) {
+ this.$router.push({
+ path: `/resource/attachCopy`,
+ query: {
+ deptId: row.departmentid,
+ enterprisename: row.enterprisename,
+ },
+ });
+ },
+ onLoad(page, params = {}) {
+ if (this.userInfo.role_id == "1414840172333842433") {
+ console.log("是公安add jurisdiction");
+ params["jurisdiction"] = this.userInfo.jurisdiction;
+ }
+ this.loading = true;
+ getdata(
+ page.currentPage,
+ page.pageSize,
+ Object.assign(params, this.query)
+ ).then((res) => {
+ const data = res.data.data;
+ this.page.total = data.total;
+ this.data = data.records;
+ window.localStorage.setItem("danweidataS", JSON.stringify(this.data));
+ console.log(this.data);
+ this.loading = false;
+ });
+ },
+ // nodeClick(data) {//分局 不在这添加
+ // // this.treeDeptId = data.id;
+ // // this.page.currentPage = 1;
+ // // this.onLoad(this.page);
+ // // this.$message.success(JSON.stringify(data));
+ // this.obj0["departmentid"] = data.title;
+ // this.obj1["departmentid"] = data.title;
+ // this.obj2["departmentid"] = data.title;
+ // this.obj0["useid"] = data.id;
+ // this.obj1["useid"] = data.id;
+ // this.obj2["useid"] = data.id;
+ // this.nobumen = 1;
+ // },
+ tip0() {
+ if (this.panduanmeiyouziduan()) {
+ return;
+ }
+ var d = {};
+ for (var k in this.obj0) {
+ for (var i in column0) {
+ if (k == column0[i].prop && k != "title0") {
+ d[k] = this.obj0[k];
+ }
+ }
+ }
+ console.log(d);
+ for (var k in d) {
+ if (d[k] == "" || d[k] == undefined) {
+ console.log(k);
+ this.$message.warning("请检查表单是否填写完整!");
+ return;
+ }
+ }
+ console.log(d, 0);
+ this.data0 = d;
+ this.forms = 1;
+ },
+ tip1() {
+ if (this.panduanmeiyouziduan()) {
+ return;
+ }
+ var d = {};
+ for (var k in this.obj1) {
+ for (var i in column1) {
+ if (k == column1[i].prop && k != "title1") {
+ d[k] = this.obj1[k];
+ }
+ }
+ }
+ d["capital"] = d["capital2"];
+ delete d["capital2"];
+ // console.log(d);
+ for (var k in d) {
+ if (d[k] == "" || d[k] == undefined) {
+ console.log(k);
+ this.$message.warning("请检查表单是否填写完整!");
+ return;
+ }
+ }
+ console.log(d, 1);
+ this.data1 = d;
+ this.forms = 2;
+ },
+ tip2() {
+ if (this.panduanmeiyouziduan()) {
+ return;
+ }
+ var d = {};
+ for (var k in this.obj2) {
+ for (var i in column2) {
+ if (k == column2[i].prop && k != "title2") {
+ d[k] = this.obj2[k];
+ }
+ }
+ }
+ console.log(d);
+ d["cardid"] = d["cardid2"];
+ delete d["cardid2"];
+ d["cell"] = d["cell2"];
+ delete d["cell2"];
+ // d["shareholdingratio"] = d["shareholdingratio2"];
+ // delete d["shareholdingratio2"];
+ for (var k in d) {
+ if (d[k] == "" || d[k] == undefined) {
+ console.log(k);
+ this.$message.warning("请检查表单是否填写完整!");
+ return;
+ }
+ }
+ console.log(d, 2);
+ this.data2 = d;
+
+ // this.data0.departmentid = this.data0.useid;
+ // this.data1.departmentid = this.data1.useid;
+ // this.data2.departmentid = this.data2.useid;
+ // delete this.data0.useid;
+ // delete this.data1.useid;
+ // delete this.data2.useid;
+
+ adddata(this.data0).then((res) => {
+ console.log(res, 0);
+ });
+ adddata1(this.data1).then((res) => {
+ console.log(res, 1);
+ });
+ adddata2(this.data2).then((res) => {
+ console.log(res, 2);
+ });
+ var time = setTimeout(() => {
+ this.onLoad(this.page, this.query);
+ console.log(this.data0, this.data1, this.data2, "已刷新");
+ }, 500);
+ this.tipover();
+ },
+ tip1up1() {
+ this.forms = 0;
+ },
+ tip2up2() {
+ this.forms = 1;
+ },
+ tipover() {
+ this.forms = -1;
+ this.obj0 = {
+ title0: "保安单位基本信息",
+ };
+ this.obj1 = {
+ title1: "保安单位出资人员",
+ };
+ this.obj2 = {
+ title2: "主要管理人员信息",
+ };
+ this.data0 = {};
+ this.data1 = {};
+ this.data2 = {};
+ this.noshehuibianma = 0;
+ this.nobumen = 0;
+ },
+ panduanmeiyouziduan() {
+ if (this.noshehuibianma == 0) {
+ this.$message.warning("请输入统一社会信用代码");
+ return true;
+ }
+ if (this.nobumen == 0) {
+ return false;
+ this.$message.warning("请选则部门");
+ }
+ return false;
+ },
+ },
+ watch: {
+ haveID() {
+ // console.log(this.haveID);
+ if (this.haveID != undefined) {
+ if (this.haveID.length > 5) {
+ //统一社会信用代码判断
+ this.noshehuibianma = 1;
+ } else {
+ this.noshehuibianma = 0;
+ }
+ }
+ },
+ havedata() {
+ console.log(this.havedata, "qqqqq");
+ },
+ },
+ mounted() {},
+};
+</script>
+
+<style lang="scss">
+.securityUnit {
+ width: 100%;
+ height: 100%;
+ // border: 1px solid #000;
+ box-sizing: border-box;
+}
+// .el-card__body {
+// padding-bottom: 5px !important;
+// }
+// .avue-crud__tip,
+// .el-tag,
+// .el-tag--light {
+// padding: 0 !important;
+// }
+
+.lod {
+ position: absolute;
+ top: 0;
+ left: 0;
+ width: 100%;
+ height: 100%;
+ background-color: rgba($color: #000000, $alpha: 0.5);
+ padding: 100px 0 0 0;
+ z-index: 500 !important;
+ display: flex;
+ // align-items: center;
+ justify-content: center;
+ .trees {
+ z-index: 501 !important;
+ position: absolute;
+ width: 15%;
+ top: 100px;
+ left: 0;
+ // display: none;
+ }
+ .lod-in {
+ width: 70%;
+ height: auto;
+ background-color: transparent;
+
+ // padding: 10px 0 0 0;
+ }
+
+ .el-collapse-item {
+ padding-top: 15px !important;
+ }
+}
+.el-collapse {
+ border-top: 1px solid transparent !important;
+}
+</style>
diff --git "a/src/views/securityUnit\345\244\207\344\273\275/localCompany.vue" "b/src/views/securityUnit\345\244\207\344\273\275/localCompany.vue"
new file mode 100644
index 0000000..e521465
--- /dev/null
+++ "b/src/views/securityUnit\345\244\207\344\273\275/localCompany.vue"
@@ -0,0 +1,710 @@
+<template>
+ <basic-container>
+ <div class="securityUnit">
+ <avue-crud
+ :option="option"
+ :data="data"
+ :page.sync="page"
+ ref="crudrec"
+ @on-load="onLoad"
+ :table-loading="loading"
+ @row-save="rowSave"
+ @search-change="searchChange"
+ @search-reset="searchReset"
+ @row-update="rowUpdate"
+ @row-del="rowDel"
+ @selection-change="selectionChange"
+ @refresh-change="refreshChange"
+ >
+ <!-- @row-click="rowClick" -->
+ <template slot-scope="{ row }" slot="znum">
+ <el-tag
+ class="rowClickSelf"
+ @click="rowClickSelf(row)"
+ title="点击查看保安人员情况"
+ >{{ row.znum }}</el-tag
+ >
+ </template>
+
+ <template slot-scope="{ type, size, row }" slot="menu">
+ <el-button
+ icon="el-icon-s-custom"
+ :size="size"
+ :type="type"
+ @click.stop="rowClick(row)"
+ >查看
+ </el-button>
+ <el-button
+ :size="size"
+ :type="type"
+ @click="handleUploadPage(row)"
+ icon="el-icon-circle-check"
+ >附件上传
+ </el-button>
+ </template>
+ <template slot="menuLeft">
+ <el-button
+ type="primary"
+ icon="el-icon-plus"
+ size="small"
+ plain
+ @click.stop="rowSave"
+ >新增</el-button
+ >
+ <el-button
+ type="danger"
+ size="small"
+ plain
+ icon="el-icon-delete"
+ @click="handleDelete"
+ >删 除
+ </el-button>
+ <el-button
+ type="success"
+ size="small"
+ plain
+ icon="el-icon-upload2"
+ @click="handleImport1"
+ >批量导入
+ </el-button>
+ </template>
+ </avue-crud>
+ <div class="lod" v-show="forms != -1">
+ <div class="lod-in">
+ <!-- <el-col class="trees" v-if="forms == 0">
+ <div class="box">
+ <el-scrollbar>
+ <basic-container>
+ <avue-tree
+ :option="treeOption"
+ :data="treeData"
+ @node-click="nodeClick"
+ />
+ </basic-container>
+ </el-scrollbar>
+ </div>
+ </el-col> -->
+ <avue-form
+ ref="form"
+ v-model="obj0"
+ :option="option0"
+ v-if="forms == 0"
+ >
+ <template slot="menuForm">
+ <el-button type="primary" @click="tip0">下一页</el-button>
+ <el-button type="info" @click="tipover">取消</el-button>
+ </template>
+ </avue-form>
+ <avue-form
+ ref="form1"
+ v-model="obj1"
+ :option="option1"
+ v-else-if="forms == 1"
+ >
+ <template slot="menuForm">
+ <el-button type="primary" @click="tip1up1">上一页</el-button>
+ <el-button type="primary" @click="tip1">下一页</el-button>
+ <el-button type="info" @click="tipover">取消</el-button>
+ </template>
+ </avue-form>
+ <avue-form
+ ref="form2"
+ v-model="obj2"
+ :option="option2"
+ v-else-if="forms == 2"
+ >
+ <template slot="menuForm">
+ <el-button type="primary" @click="tip2up2">上一页</el-button>
+ <el-button type="primary" @click="tip2">提交</el-button>
+ <el-button type="info" @click="tipover">取消</el-button>
+ </template>
+ </avue-form>
+ </div>
+ </div>
+ </div>
+ <el-dialog
+ title="保安单位导入"
+ append-to-body
+ :visible.sync="excelBox1"
+ width="555px"
+ >
+ <avue-form
+ :option="excelOption1"
+ v-model="excelForm1"
+ :upload-after="uploadAfter1"
+ >
+ <template slot="excelTemplate">
+ <el-button type="primary" @click="handleTemplate1">
+ 点击下载<i class="el-icon-download el-icon--right"></i>
+ </el-button>
+ </template>
+ </avue-form>
+ </el-dialog>
+ </basic-container>
+</template>
+
+<script>
+import { column, column0, column1, column2 } from "./data";
+import {
+ getdata,
+ adddata,
+ update,
+ remove,
+ adddata1,
+ adddata2,
+ getDeptLazyTree,
+} from "@/api/securityUnit/securityUnit";
+import { mapGetters } from "vuex";
+export default {
+ data() {
+ var w = 160,
+ s = 12;
+ return {
+ excelBox1: false,
+ excelForm1: {},
+ excelOption1: {
+ submitBtn: false,
+ emptyBtn: false,
+ column: [
+ {
+ label: "文件上传",
+ prop: "excelFile",
+ type: "upload",
+ drag: true,
+ loadText: "文件上传中,请稍等",
+ span: 24,
+ propsHttp: {
+ res: "data",
+ },
+ tip: "请上传 .xls,.xlsx 标准格式文件",
+ action: "/api/information/import-informaton",
+ },
+ {
+ label: "模板下载",
+ prop: "excelTemplate",
+ formslot: true,
+ span: 24,
+ },
+ ],
+ },
+
+ loading: true, //保安单位基本信息
+ selectionList: [],
+ page: {
+ pageSize: 10,
+ currentPage: 1,
+ total: 0,
+ },
+
+ treeData: [],
+ treeOption: {
+ title: "我是标题",
+ filterText: "搜索关键字自定义",
+ defaultExpandAll: true,
+ addBtn: false,
+ menu: false,
+ size: "small",
+ formOption: {
+ labelWidth: 100,
+ column: [
+ {
+ label: "自定义项",
+ prop: "label",
+ },
+ ],
+ },
+ props: {
+ labelText: "标题",
+ label: "title",
+ value: "id",
+ children: "children",
+ },
+ },
+
+ obj0: {
+ title0: "保安单位基本信息",
+ },
+ option0: {
+ emptyBtn: false,
+ submitBtn: false,
+ gutter: 30,
+ column: column0,
+ },
+ obj1: {
+ title1: "保安单位出资人员",
+ },
+ option1: {
+ emptyBtn: false,
+ submitBtn: false,
+ gutter: 30,
+ column: column1,
+ },
+ obj2: {
+ title2: "主要管理人员信息",
+ },
+ option2: {
+ emptyBtn: false,
+ submitBtn: false,
+ gutter: 30,
+ column: column2,
+ },
+
+ forms: -1,
+ data0: {},
+ data1: {},
+ data2: {},
+ b0: {},
+ b1: {},
+ b2: {},
+ noshehuibianma: 0,
+ nobumen: 0,
+
+ query: {},
+ data: [],
+ option: {
+ index: true,
+ addBtn: false,
+ // card: true,
+ tip: false,
+ searchSize: "mini",
+ searchMenuSpan: 6,
+ height: 583,
+ menuWidth: 275,
+ border: true,
+ align: "center",
+ selection: true,
+ column: column,
+ },
+ };
+ },
+ computed: {
+ ...mapGetters(["userInfo"]),
+ ids() {
+ let ids = [];
+ this.selectionList.forEach((ele) => {
+ ids.push(ele.creditcode);
+ });
+ return ids.join(",");
+ },
+ ids1() {
+ let ids1 = [];
+ this.selectionList.forEach((ele) => {
+ ids1.push(ele.departmentid);
+ });
+ return ids1.join(",");
+ },
+ haveID() {
+ return this.obj0.creditcode;
+ },
+ },
+ methods: {
+ rowClickSelf(val) {
+ // console.log(val.departmentid);
+ this.$router.push({
+ path: "/securityGuardOnce/index",
+ query: { departmentid: val.departmentid },
+ });
+ },
+ handleImport1() {
+ this.excelBox1 = true;
+ },
+ uploadAfter1(res, done, loading, column) {
+ window.console.log(column);
+ this.excelBox1 = false;
+ // this.refreshChange();
+ done();
+ },
+ handleTemplate1() {
+ window.open(`/api/examSubjectChoices/export-template`);
+ },
+
+ // handleChangeTABS(column) {
+ // this.typeTABS = column;
+ // // this.$message.success(JSON.stringify(column));
+ // if (column.prop == "tab1") {
+ // this.loading1 = false;
+ // this.loading2 = false;
+ // this.onLoad(this.page);
+ // } else if (column.prop == "tab2") {
+ // this.loading = false;
+ // this.loading2 = false;
+ // this.onLoad1(this.page1); //第二个表格不会自动执行
+ // } else if (column.prop == "tab3") {
+ // this.loading1 = false;
+ // this.loading = false;
+ // this.onLoad2(this.page2); //第二个表格不会自动执行
+ // }
+ // },
+ //保安单位基本信息
+ sizeChange(val) {
+ this.page1.currentPage = 1;
+ this.page1.pageSize = val;
+ // this.getData();
+ this.onLoad(this.page, this.query);
+ // this.$message.success("行数" + val);
+ },
+ currentChange(val) {
+ this.page1.currentPage = val;
+ // this.getData();
+ this.onLoad(this.page, this.query);
+ // this.$message.success("页码" + val);
+ },
+ rowSave(form, done, loading) {
+ // console.log("save1");
+ this.forms = 0;
+ var that = this;
+ //先获取部门接口
+ getDeptLazyTree().then((res) => {
+ var d = res.data.data;
+ that.treeData = d;
+ // console.log(d);
+ });
+ },
+ searchChange(params, done) {
+ this.query = params;
+ this.page.currentPage = 1;
+ this.onLoad(this.page, params);
+ done();
+ },
+ searchReset() {
+ this.query = {};
+ this.onLoad(this.page);
+ },
+ rowUpdate(row, index, done, loading) {
+ delete row.tenantid;
+ delete row.regstsat;
+ console.log(row, 0);
+ update(row).then(
+ () => {
+ this.onLoad(this.page);
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ });
+ done();
+ },
+ (error) => {
+ window.console.log(error);
+ loading();
+ }
+ );
+ },
+ rowDel(row) {
+ this.$confirm("确定将选择数据删除?", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning",
+ })
+ .then(() => {
+ console.log(row);
+ return remove(row.creditcode, row.departmentid);
+ })
+ .then(() => {
+ this.onLoad(this.page);
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ });
+ });
+ },
+ selectionChange(list) {
+ this.selectionList = list;
+ },
+ handleDelete() {
+ if (this.selectionList.length === 0) {
+ this.$message.warning("请选择至少一条数据");
+ return;
+ }
+ this.$confirm("确定批量将选择数据删除?", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning",
+ })
+ .then(() => {
+ // console.log(this.ids);
+ return remove(this.ids, this.ids1);
+ })
+ .then(() => {
+ this.onLoad(this.page);
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ });
+ this.$refs.crudrec.toggleSelection();
+ })
+ .catch((res) => {});
+ },
+ refreshChange() {
+ this.onLoad(this.page, this.query);
+ },
+ rowClick(row) {
+ // console.log(row);
+ // row.identificationnumber; //统一社会信用代 码
+ window.localStorage.setItem("danweidata", JSON.stringify(row));
+ this.$router.push({
+ path: "/securityUnitChild",
+ // redirect: { name: "foo" },
+ query: { rowsecurity: "fromSecurity" },
+ // params: { row: row.identificationnumber },
+ });
+ },
+ //跳转到附近列表页面
+ handleUploadPage(row) {
+ this.$router.push({
+ path: `/resource/attachCopy`,
+ query: {
+ deptId: row.departmentid,
+ enterprisename: row.enterprisename,
+ },
+ });
+ },
+ onLoad(page, params = {}) {
+ if (this.userInfo.role_id == "1414840172333842433") {
+ console.log("是公安add jurisdiction");
+ params["jurisdiction"] = this.userInfo.jurisdiction;
+ }
+ params["stats"] = "2";
+ this.loading = true;
+ getdata(
+ page.currentPage,
+ page.pageSize,
+ Object.assign(params, this.query)
+ ).then((res) => {
+ const data = res.data.data;
+ this.page.total = data.total;
+ this.data = data.records;
+ window.localStorage.setItem("danweidataS", JSON.stringify(this.data));
+ console.log(this.data);
+ this.loading = false;
+ });
+ },
+ // nodeClick(data) {//分局 不在这添加
+ // // this.treeDeptId = data.id;
+ // // this.page.currentPage = 1;
+ // // this.onLoad(this.page);
+ // // this.$message.success(JSON.stringify(data));
+ // this.obj0["departmentid"] = data.title;
+ // this.obj1["departmentid"] = data.title;
+ // this.obj2["departmentid"] = data.title;
+ // this.obj0["useid"] = data.id;
+ // this.obj1["useid"] = data.id;
+ // this.obj2["useid"] = data.id;
+ // this.nobumen = 1;
+ // },
+ tip0() {
+ if (this.panduanmeiyouziduan()) {
+ return;
+ }
+ var d = {};
+ for (var k in this.obj0) {
+ for (var i in column0) {
+ if (k == column0[i].prop && k != "title0") {
+ d[k] = this.obj0[k];
+ }
+ }
+ }
+ console.log(d);
+ for (var k in d) {
+ if (d[k].prop == "capital") {
+ continue;
+ }
+ let iisit0 = d[k] == "" || d[k] == undefined;
+ if (iisit0) {
+ console.log(d[k]);
+ this.$message.warning("请检查表单是否填写完整!");
+ return;
+ }
+ }
+ console.log(d, 0);
+ this.data0 = d;
+ this.forms = 1;
+ },
+ tip1() {
+ if (this.panduanmeiyouziduan()) {
+ return;
+ }
+ var d = {};
+ for (var k in this.obj1) {
+ for (var i in column1) {
+ if (k == column1[i].prop && k != "title1") {
+ d[k] = this.obj1[k];
+ }
+ }
+ }
+ d["capital"] = d["capital2"];
+ delete d["capital2"];
+ // console.log(d);
+ for (var k in d) {
+ if (d[k] == "" || d[k] == undefined) {
+ console.log(k);
+ this.$message.warning("请检查表单是否填写完整!");
+ return;
+ }
+ }
+ console.log(d, 1);
+ this.data1 = d;
+ this.forms = 2;
+ },
+ tip2() {
+ if (this.panduanmeiyouziduan()) {
+ return;
+ }
+ var d = {};
+ for (var k in this.obj2) {
+ for (var i in column2) {
+ if (k == column2[i].prop && k != "title2") {
+ d[k] = this.obj2[k];
+ }
+ }
+ }
+ console.log(d);
+ d["cardid"] = d["cardid2"];
+ delete d["cardid2"];
+ d["cell"] = d["cell2"];
+ delete d["cell2"];
+ // d["shareholdingratio"] = d["shareholdingratio2"];
+ // delete d["shareholdingratio2"];
+ for (var k in d) {
+ if (d[k] == "" || d[k] == undefined) {
+ console.log(k);
+ this.$message.warning("请检查表单是否填写完整!");
+ return;
+ }
+ }
+ console.log(d, 2);
+ this.data2 = d;
+
+ // this.data0.departmentid = this.data0.useid;
+ // this.data1.departmentid = this.data1.useid;
+ // this.data2.departmentid = this.data2.useid;
+ // delete this.data0.useid;
+ // delete this.data1.useid;
+ // delete this.data2.useid;
+
+ adddata(this.data0).then((res) => {
+ console.log(res, 0);
+ });
+ adddata1(this.data1).then((res) => {
+ console.log(res, 1);
+ });
+ adddata2(this.data2).then((res) => {
+ console.log(res, 2);
+ });
+ var time = setTimeout(() => {
+ this.onLoad(this.page, this.query);
+ console.log(this.data0, this.data1, this.data2, "已刷新");
+ }, 500);
+ this.tipover();
+ },
+ tip1up1() {
+ this.forms = 0;
+ },
+ tip2up2() {
+ this.forms = 1;
+ },
+ tipover() {
+ this.forms = -1;
+ this.obj0 = {
+ title0: "保安单位基本信息",
+ };
+ this.obj1 = {
+ title1: "保安单位出资人员",
+ };
+ this.obj2 = {
+ title2: "主要管理人员信息",
+ };
+ this.data0 = {};
+ this.data1 = {};
+ this.data2 = {};
+ this.noshehuibianma = 0;
+ this.nobumen = 0;
+ },
+ panduanmeiyouziduan() {
+ if (this.noshehuibianma == 0) {
+ this.$message.warning("请输入统一社会信用代码");
+ return true;
+ }
+ if (this.nobumen == 0) {
+ return false;
+ this.$message.warning("请选则部门");
+ }
+ return false;
+ },
+ },
+ watch: {
+ haveID() {
+ // console.log(this.haveID);
+ if (this.haveID != undefined) {
+ if (this.haveID.length > 0) {
+ //统一社会信用代码判断
+ this.noshehuibianma = 1;
+ } else {
+ this.noshehuibianma = 0;
+ }
+ }
+ },
+ havedata() {
+ console.log(this.havedata, "qqqqq");
+ },
+ },
+ mounted() {},
+};
+</script>
+
+<style lang="scss">
+.securityUnit {
+ width: 100%;
+ height: 100%;
+ // border: 1px solid #000;
+ box-sizing: border-box;
+}
+// .el-card__body {
+// padding-bottom: 5px !important;
+// }
+// .avue-crud__tip,
+// .el-tag,
+// .el-tag--light {
+// padding: 0 !important;
+// }
+
+.lod {
+ position: absolute;
+ top: 0;
+ left: 0;
+ width: 100%;
+ height: 100%;
+ background-color: rgba($color: #000000, $alpha: 0.5);
+ padding: 100px 0 0 0;
+ z-index: 500 !important;
+ display: flex;
+ // align-items: center;
+ justify-content: center;
+ .trees {
+ z-index: 501 !important;
+ position: absolute;
+ width: 15%;
+ top: 100px;
+ left: 0;
+ // display: none;
+ }
+ .lod-in {
+ width: 70%;
+ height: auto;
+ background-color: transparent;
+
+ // padding: 10px 0 0 0;
+ }
+
+ .el-collapse-item {
+ padding-top: 15px !important;
+ }
+}
+.el-collapse {
+ border-top: 1px solid transparent !important;
+}
+.rowClickSelf {
+ &:hover {
+ cursor: pointer;
+ }
+}
+</style>
diff --git "a/src/views/securityUnit\345\244\207\344\273\275/securityTraining.vue" "b/src/views/securityUnit\345\244\207\344\273\275/securityTraining.vue"
new file mode 100644
index 0000000..45490f3
--- /dev/null
+++ "b/src/views/securityUnit\345\244\207\344\273\275/securityTraining.vue"
@@ -0,0 +1,732 @@
+<template>
+ <basic-container>
+ <div class="securityUnit">
+ <avue-crud
+ :option="option"
+ :data="data"
+ :page.sync="page"
+ ref="crudrec"
+ @on-load="onLoad"
+ :table-loading="loading"
+ @row-save="rowSave"
+ @search-change="searchChange"
+ @search-reset="searchReset"
+ @row-update="rowUpdate"
+ @row-del="rowDel"
+ @selection-change="selectionChange"
+ @refresh-change="refreshChange"
+ >
+ <!-- @row-click="rowClick" -->
+ <template slot-scope="{ row }" slot="znum">
+ <el-tag
+ class="rowClickSelf"
+ @click="rowClickSelf(row)"
+ title="点击查看保安人员情况"
+ >{{ row.znum }}</el-tag
+ >
+ </template>
+
+ <template slot-scope="{ type, size, row }" slot="menu">
+ <el-button
+ icon="el-icon-s-custom"
+ :size="size"
+ :type="type"
+ @click.stop="rowClick(row)"
+ >查看
+ </el-button>
+ <el-button
+ :size="size"
+ :type="type"
+ @click="handleUploadPage(row)"
+ icon="el-icon-circle-check"
+ >附件上传
+ </el-button>
+ </template>
+ <template slot="menuLeft">
+ <el-button
+ type="primary"
+ icon="el-icon-plus"
+ size="small"
+ plain
+ @click.stop="rowSave"
+ >新增</el-button
+ >
+ <el-button
+ type="danger"
+ size="small"
+ plain
+ icon="el-icon-delete"
+ @click="handleDelete"
+ >删 除
+ </el-button>
+ <el-button
+ type="success"
+ size="small"
+ plain
+ icon="el-icon-upload2"
+ @click="handleImport1"
+ >批量导入
+ </el-button>
+ </template>
+ </avue-crud>
+ <div class="lod" v-show="forms != -1">
+ <div class="lod-in">
+ <!-- <el-col class="trees" v-if="forms == 0">
+ <div class="box">
+ <el-scrollbar>
+ <basic-container>
+ <avue-tree
+ :option="treeOption"
+ :data="treeData"
+ @node-click="nodeClick"
+ />
+ </basic-container>
+ </el-scrollbar>
+ </div>
+ </el-col> -->
+ <avue-form
+ ref="form"
+ v-model="obj0"
+ :option="option0"
+ v-if="forms == 0"
+ >
+ <template slot="menuForm">
+ <el-button type="primary" @click="tip0">下一页</el-button>
+ <el-button type="info" @click="tipover">取消</el-button>
+ </template>
+ </avue-form>
+ <avue-form
+ ref="form1"
+ v-model="obj1"
+ :option="option1"
+ v-else-if="forms == 1"
+ >
+ <template slot="menuForm">
+ <el-button type="primary" @click="tip1up1">上一页</el-button>
+ <el-button type="primary" @click="tip1">下一页</el-button>
+ <el-button type="info" @click="tipover">取消</el-button>
+ </template>
+ </avue-form>
+ <avue-form
+ ref="form2"
+ v-model="obj2"
+ :option="option2"
+ v-else-if="forms == 2"
+ >
+ <template slot="menuForm">
+ <el-button type="primary" @click="tip2up2">上一页</el-button>
+ <el-button type="primary" @click="tip2">提交</el-button>
+ <el-button type="info" @click="tipover">取消</el-button>
+ </template>
+ </avue-form>
+ </div>
+ </div>
+ </div>
+ <el-dialog
+ title="保安单位导入"
+ append-to-body
+ :visible.sync="excelBox1"
+ width="555px"
+ >
+ <avue-form
+ :option="excelOption1"
+ v-model="excelForm1"
+ :upload-after="uploadAfter1"
+ >
+ <template slot="excelTemplate">
+ <el-button type="primary" @click="handleTemplate1">
+ 点击下载<i class="el-icon-download el-icon--right"></i>
+ </el-button>
+ </template>
+ </avue-form>
+ </el-dialog>
+ </basic-container>
+</template>
+
+<script>
+import { column, column0, column1, column2 } from "./data";
+import {
+ getdata,
+ adddata,
+ update,
+ remove,
+ adddata1,
+ adddata2,
+ getDeptLazyTree,
+} from "@/api/securityUnit/securityUnit";
+import { mapGetters } from "vuex";
+export default {
+ data() {
+ var w = 160,
+ s = 12;
+ return {
+ excelBox1: false,
+ excelForm1: {},
+ excelOption1: {
+ submitBtn: false,
+ emptyBtn: false,
+ column: [
+ {
+ label: "文件上传",
+ prop: "excelFile",
+ type: "upload",
+ drag: true,
+ loadText: "文件上传中,请稍等",
+ span: 24,
+ propsHttp: {
+ res: "data",
+ },
+ tip: "请上传 .xls,.xlsx 标准格式文件",
+ action: "/api/information/import-informaton",
+ },
+ {
+ label: "模板下载",
+ prop: "excelTemplate",
+ formslot: true,
+ span: 24,
+ },
+ ],
+ },
+
+ loading: true, //保安单位基本信息
+ selectionList: [],
+ page: {
+ pageSize: 10,
+ currentPage: 1,
+ total: 0,
+ },
+
+ treeData: [],
+ treeOption: {
+ title: "我是标题",
+ filterText: "搜索关键字自定义",
+ defaultExpandAll: true,
+ addBtn: false,
+ menu: false,
+ size: "small",
+ formOption: {
+ labelWidth: 100,
+ column: [
+ {
+ label: "自定义项",
+ prop: "label",
+ },
+ ],
+ },
+ props: {
+ labelText: "标题",
+ label: "title",
+ value: "id",
+ children: "children",
+ },
+ },
+ // treeOption: {
+ // nodeKey: "id",
+ // // lazy: true,
+ // // treeLoad: function (node, resolve) {
+ // // // const parentId = node.level === 0 ? 0 : node.data.id;
+ // // getDeptLazyTree().then((res) => {
+ // // resolve(
+ // // res.data.data.map((item) => {
+ // // console.log({
+ // // ...item,
+ // // leaf: !item.hasChildren,
+ // // });
+ // // return {
+ // // ...item,
+ // // leaf: !item.hasChildren,
+ // // };
+ // // })
+ // // );
+ // // });
+ // // },
+ // addBtn: false,
+ // menu: false,
+ // size: "small",
+ // props: {
+ // labelText: "标题",
+ // label: "title",
+ // value: "value",
+ // children: "children",
+ // },
+ // },
+
+ obj0: {
+ title0: "保安单位基本信息",
+ },
+ option0: {
+ emptyBtn: false,
+ submitBtn: false,
+ gutter: 30,
+ column: column0,
+ },
+ obj1: {
+ title1: "保安单位出资人员",
+ },
+ option1: {
+ emptyBtn: false,
+ submitBtn: false,
+ gutter: 30,
+ column: column1,
+ },
+ obj2: {
+ title2: "主要管理人员信息",
+ },
+ option2: {
+ emptyBtn: false,
+ submitBtn: false,
+ gutter: 30,
+ column: column2,
+ },
+
+ forms: -1,
+ data0: {},
+ data1: {},
+ data2: {},
+ b0: {},
+ b1: {},
+ b2: {},
+ noshehuibianma: 0,
+ nobumen: 0,
+
+ query: {},
+ data: [],
+ option: {
+ index: true,
+ addBtn: false,
+ // card: true,
+ tip: false,
+ searchSize: "mini",
+ border: true,
+
+ searchMenuSpan: 6,
+ height: 583,
+ menuWidth: 275,
+ align: "center",
+ selection: true,
+ column: column,
+ },
+ };
+ },
+ computed: {
+ ...mapGetters(["userInfo"]),
+ ids() {
+ let ids = [];
+ this.selectionList.forEach((ele) => {
+ ids.push(ele.creditcode);
+ });
+ return ids.join(",");
+ },
+ ids1() {
+ let ids1 = [];
+ this.selectionList.forEach((ele) => {
+ ids1.push(ele.departmentid);
+ });
+ return ids1.join(",");
+ },
+ haveID() {
+ return this.obj0.creditcode;
+ },
+ },
+ methods: {
+ rowClickSelf(val) {
+ // console.log(val.departmentid);
+ this.$router.push({
+ path: "/securityGuardOnce/index",
+ query: { departmentid: val.departmentid },
+ });
+ },
+ handleImport1() {
+ this.excelBox1 = true;
+ },
+ uploadAfter1(res, done, loading, column) {
+ window.console.log(column);
+ this.excelBox1 = false;
+ // this.refreshChange();
+ done();
+ },
+ handleTemplate1() {
+ window.open(`/api/examSubjectChoices/export-template`);
+ },
+
+ // handleChangeTABS(column) {
+ // this.typeTABS = column;
+ // // this.$message.success(JSON.stringify(column));
+ // if (column.prop == "tab1") {
+ // this.loading1 = false;
+ // this.loading2 = false;
+ // this.onLoad(this.page);
+ // } else if (column.prop == "tab2") {
+ // this.loading = false;
+ // this.loading2 = false;
+ // this.onLoad1(this.page1); //第二个表格不会自动执行
+ // } else if (column.prop == "tab3") {
+ // this.loading1 = false;
+ // this.loading = false;
+ // this.onLoad2(this.page2); //第二个表格不会自动执行
+ // }
+ // },
+ //保安单位基本信息
+ sizeChange(val) {
+ this.page1.currentPage = 1;
+ this.page1.pageSize = val;
+ // this.getData();
+ this.onLoad(this.page, this.query);
+ // this.$message.success("行数" + val);
+ },
+ currentChange(val) {
+ this.page1.currentPage = val;
+ // this.getData();
+ this.onLoad(this.page, this.query);
+ // this.$message.success("页码" + val);
+ },
+ rowSave(form, done, loading) {
+ // console.log("save1");
+ this.forms = 0;
+ var that = this;
+ //先获取部门接口
+ getDeptLazyTree().then((res) => {
+ var d = res.data.data;
+ that.treeData = d;
+ // console.log(d);
+ });
+ },
+ searchChange(params, done) {
+ this.query = params;
+ this.page.currentPage = 1;
+ this.onLoad(this.page, params);
+ done();
+ },
+ searchReset() {
+ this.query = {};
+ this.onLoad(this.page);
+ },
+ rowUpdate(row, index, done, loading) {
+ delete row.tenantid;
+ delete row.regstsat;
+ console.log(row, 0);
+ update(row).then(
+ () => {
+ this.onLoad(this.page);
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ });
+ done();
+ },
+ (error) => {
+ window.console.log(error);
+ loading();
+ }
+ );
+ },
+ rowDel(row) {
+ this.$confirm("确定将选择数据删除?", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning",
+ })
+ .then(() => {
+ console.log(row);
+ return remove(row.creditcode, row.departmentid);
+ })
+ .then(() => {
+ this.onLoad(this.page);
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ });
+ });
+ },
+ selectionChange(list) {
+ this.selectionList = list;
+ },
+ handleDelete() {
+ if (this.selectionList.length === 0) {
+ this.$message.warning("请选择至少一条数据");
+ return;
+ }
+ this.$confirm("确定批量将选择数据删除?", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning",
+ })
+ .then(() => {
+ // console.log(this.ids);
+ return remove(this.ids, this.ids1);
+ })
+ .then(() => {
+ this.onLoad(this.page);
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ });
+ this.$refs.crudrec.toggleSelection();
+ })
+ .catch((res) => {});
+ },
+ refreshChange() {
+ this.onLoad(this.page, this.query);
+ },
+ rowClick(row) {
+ // console.log(row);
+ // row.identificationnumber; //统一社会信用代 码
+ window.localStorage.setItem("danweidata", JSON.stringify(row));
+ this.$router.push({
+ path: "/securityUnitChild",
+ // redirect: { name: "foo" },
+ query: { rowsecurity: "fromSecurity" },
+ // params: { row: row.identificationnumber },
+ });
+ },
+ //跳转到附近列表页面
+ handleUploadPage(row) {
+ this.$router.push({
+ path: `/resource/attachCopy`,
+ query: {
+ deptId: row.departmentid,
+ enterprisename: row.enterprisename,
+ },
+ });
+ },
+ onLoad(page, params = {}) {
+ if (this.userInfo.role_id == "1414840172333842433") {
+ console.log("是公安add jurisdiction");
+ params["jurisdiction"] = this.userInfo.jurisdiction;
+ }
+ params["stats"] = 1;
+ this.loading = true;
+ getdata(
+ page.currentPage,
+ page.pageSize,
+ Object.assign(params, this.query)
+ ).then((res) => {
+ const data = res.data.data;
+ this.page.total = data.total;
+ this.data = data.records;
+ window.localStorage.setItem("danweidataS", JSON.stringify(this.data));
+ console.log(this.data);
+ this.loading = false;
+ });
+ },
+ // nodeClick(data) {//分局 不在这添加
+ // // this.treeDeptId = data.id;
+ // // this.page.currentPage = 1;
+ // // this.onLoad(this.page);
+ // // this.$message.success(JSON.stringify(data));
+ // this.obj0["departmentid"] = data.title;
+ // this.obj1["departmentid"] = data.title;
+ // this.obj2["departmentid"] = data.title;
+ // this.obj0["useid"] = data.id;
+ // this.obj1["useid"] = data.id;
+ // this.obj2["useid"] = data.id;
+ // this.nobumen = 1;
+ // },
+ tip0() {
+ if (this.panduanmeiyouziduan()) {
+ return;
+ }
+ var d = {};
+ for (var k in this.obj0) {
+ for (var i in column0) {
+ if (k == column0[i].prop && k != "title0") {
+ d[k] = this.obj0[k];
+ }
+ }
+ }
+ console.log(d);
+ for (var k in d) {
+ if (d[k] == "" || d[k] == undefined) {
+ console.log(k);
+ this.$message.warning("请检查表单是否填写完整!");
+ return;
+ }
+ }
+ console.log(d, 0);
+ this.data0 = d;
+ this.forms = 1;
+ },
+ tip1() {
+ if (this.panduanmeiyouziduan()) {
+ return;
+ }
+ var d = {};
+ for (var k in this.obj1) {
+ for (var i in column1) {
+ if (k == column1[i].prop && k != "title1") {
+ d[k] = this.obj1[k];
+ }
+ }
+ }
+ d["capital"] = d["capital2"];
+ delete d["capital2"];
+ // console.log(d);
+ for (var k in d) {
+ if (d[k] == "" || d[k] == undefined) {
+ console.log(k);
+ this.$message.warning("请检查表单是否填写完整!");
+ return;
+ }
+ }
+ console.log(d, 1);
+ this.data1 = d;
+ this.forms = 2;
+ },
+ tip2() {
+ if (this.panduanmeiyouziduan()) {
+ return;
+ }
+ var d = {};
+ for (var k in this.obj2) {
+ for (var i in column2) {
+ if (k == column2[i].prop && k != "title2") {
+ d[k] = this.obj2[k];
+ }
+ }
+ }
+ console.log(d);
+ d["cardid"] = d["cardid2"];
+ delete d["cardid2"];
+ d["cell"] = d["cell2"];
+ delete d["cell2"];
+ // d["shareholdingratio"] = d["shareholdingratio2"];
+ // delete d["shareholdingratio2"];
+ for (var k in d) {
+ if (d[k] == "" || d[k] == undefined) {
+ console.log(k);
+ this.$message.warning("请检查表单是否填写完整!");
+ return;
+ }
+ }
+ console.log(d, 2);
+ this.data2 = d;
+
+ // this.data0.departmentid = this.data0.useid;
+ // this.data1.departmentid = this.data1.useid;
+ // this.data2.departmentid = this.data2.useid;
+ // delete this.data0.useid;
+ // delete this.data1.useid;
+ // delete this.data2.useid;
+
+ adddata(this.data0).then((res) => {
+ console.log(res, 0);
+ });
+ adddata1(this.data1).then((res) => {
+ console.log(res, 1);
+ });
+ adddata2(this.data2).then((res) => {
+ console.log(res, 2);
+ });
+ var time = setTimeout(() => {
+ this.onLoad(this.page, this.query);
+ console.log(this.data0, this.data1, this.data2, "已刷新");
+ }, 500);
+ this.tipover();
+ },
+ tip1up1() {
+ this.forms = 0;
+ },
+ tip2up2() {
+ this.forms = 1;
+ },
+ tipover() {
+ this.forms = -1;
+ this.obj0 = {
+ title0: "保安单位基本信息",
+ };
+ this.obj1 = {
+ title1: "保安单位出资人员",
+ };
+ this.obj2 = {
+ title2: "主要管理人员信息",
+ };
+ this.data0 = {};
+ this.data1 = {};
+ this.data2 = {};
+ this.noshehuibianma = 0;
+ this.nobumen = 0;
+ },
+ panduanmeiyouziduan() {
+ if (this.noshehuibianma == 0) {
+ this.$message.warning("请输入统一社会信用代码");
+ return true;
+ }
+ if (this.nobumen == 0) {
+ return false;
+ this.$message.warning("请选则部门");
+ }
+ return false;
+ },
+ },
+ watch: {
+ haveID() {
+ // console.log(this.haveID);
+ if (this.haveID != undefined) {
+ if (this.haveID.length > 5) {
+ //统一社会信用代码判断
+ this.noshehuibianma = 1;
+ } else {
+ this.noshehuibianma = 0;
+ }
+ }
+ },
+ havedata() {
+ console.log(this.havedata, "qqqqq");
+ },
+ },
+ mounted() {},
+};
+</script>
+
+<style lang="scss">
+.securityUnit {
+ width: 100%;
+ height: 100%;
+ // border: 1px solid #000;
+ box-sizing: border-box;
+}
+// .el-card__body {
+// padding-bottom: 5px !important;
+// }
+// .avue-crud__tip,
+// .el-tag,
+// .el-tag--light {
+// padding: 0 !important;
+// }
+
+.lod {
+ position: absolute;
+ top: 0;
+ left: 0;
+ width: 100%;
+ height: 100%;
+ background-color: rgba($color: #000000, $alpha: 0.5);
+ padding: 100px 0 0 0;
+ z-index: 500 !important;
+ display: flex;
+ // align-items: center;
+ justify-content: center;
+ .trees {
+ z-index: 501 !important;
+ position: absolute;
+ width: 15%;
+ top: 100px;
+ left: 0;
+ // display: none;
+ }
+ .lod-in {
+ width: 70%;
+ height: auto;
+ background-color: transparent;
+
+ // padding: 10px 0 0 0;
+ }
+
+ .el-collapse-item {
+ padding-top: 15px !important;
+ }
+}
+.el-collapse {
+ border-top: 1px solid transparent !important;
+}
+</style>
diff --git "a/src/views/securityUnit\345\244\207\344\273\275/selfRecruitedSecurityGuard.vue" "b/src/views/securityUnit\345\244\207\344\273\275/selfRecruitedSecurityGuard.vue"
new file mode 100644
index 0000000..d404aec
--- /dev/null
+++ "b/src/views/securityUnit\345\244\207\344\273\275/selfRecruitedSecurityGuard.vue"
@@ -0,0 +1,749 @@
+<template>
+ <basic-container>
+ <div class="securityUnit">
+ <avue-crud
+ :option="option"
+ :data="data"
+ :page.sync="page"
+ ref="crudrec"
+ @on-load="onLoad"
+ :table-loading="loading"
+ @row-save="rowSave"
+ @search-change="searchChange"
+ @search-reset="searchReset"
+ @row-update="rowUpdate"
+ @row-del="rowDel"
+ @selection-change="selectionChange"
+ @refresh-change="refreshChange"
+ >
+ <!-- @row-click="rowClick" -->
+ <template slot-scope="{ row }" slot="znum">
+ <el-tag
+ class="rowClickSelf"
+ @click="rowClickSelf(row)"
+ title="点击查看保安人员情况"
+ >{{ row.znum }}</el-tag
+ >
+ </template>
+
+ <template slot-scope="{ type, size, row }" slot="menu">
+ <el-button
+ icon="el-icon-s-custom"
+ :size="size"
+ :type="type"
+ @click.stop="rowClick(row)"
+ >查看
+ </el-button>
+ <el-button
+ :size="size"
+ :type="type"
+ @click="handleUploadPage(row)"
+ icon="el-icon-circle-check"
+ >附件上传
+ </el-button>
+ </template>
+ <template slot="menuLeft">
+ <el-button
+ type="primary"
+ icon="el-icon-plus"
+ size="small"
+ plain
+ @click.stop="rowSave"
+ >新增</el-button
+ >
+ <el-button
+ type="danger"
+ size="small"
+ plain
+ icon="el-icon-delete"
+ @click="handleDelete"
+ >删 除
+ </el-button>
+ <el-button
+ type="success"
+ size="small"
+ plain
+ icon="el-icon-upload2"
+ @click="handleImport1"
+ >批量导入
+ </el-button>
+ </template>
+ </avue-crud>
+ <div class="lod" v-show="forms != -1">
+ <div class="lod-in">
+ <!-- <el-col class="trees" v-if="forms == 0">
+ <div class="box">
+ <el-scrollbar>
+ <basic-container>
+ <avue-tree
+ :option="treeOption"
+ :data="treeData"
+ @node-click="nodeClick"
+ />
+ </basic-container>
+ </el-scrollbar>
+ </div>
+ </el-col> -->
+ <avue-form
+ ref="form"
+ v-model="obj0"
+ :option="option0"
+ v-if="forms == 0"
+ >
+ <template slot="menuForm">
+ <el-button type="primary" @click="tip0">下一页</el-button>
+ <el-button type="info" @click="tipover">取消</el-button>
+ </template>
+ </avue-form>
+ <avue-form
+ ref="form1"
+ v-model="obj1"
+ :option="option1"
+ v-else-if="forms == 1"
+ >
+ <template slot="menuForm">
+ <el-button type="primary" @click="tip1up1">上一页</el-button>
+ <el-button type="primary" @click="tip1">下一页</el-button>
+ <el-button type="info" @click="tipover">取消</el-button>
+ </template>
+ </avue-form>
+ <avue-form
+ ref="form2"
+ v-model="obj2"
+ :option="option2"
+ v-else-if="forms == 2"
+ >
+ <template slot="menuForm">
+ <el-button type="primary" @click="tip2up2">上一页</el-button>
+ <el-button type="primary" @click="tip2">提交</el-button>
+ <el-button type="info" @click="tipover">取消</el-button>
+ </template>
+ </avue-form>
+ </div>
+ </div>
+ </div>
+ <el-dialog
+ title="保安单位导入"
+ append-to-body
+ :visible.sync="excelBox1"
+ width="555px"
+ >
+ <avue-form
+ :option="excelOption1"
+ v-model="excelForm1"
+ :upload-after="uploadAfter1"
+ >
+ <template slot="excelTemplate">
+ <el-button type="primary" @click="handleTemplate1">
+ 点击下载<i class="el-icon-download el-icon--right"></i>
+ </el-button>
+ </template>
+ </avue-form>
+ </el-dialog>
+ </basic-container>
+</template>
+
+<script>
+import { column, column0, column1, column2 } from "./data";
+import {
+ getdata,
+ adddata,
+ update,
+ remove,
+ adddata1,
+ adddata2,
+ getDeptLazyTree,
+} from "@/api/securityUnit/securityUnit";
+import { mapGetters } from "vuex";
+export default {
+ data() {
+ var w = 160,
+ s = 12;
+ return {
+ excelBox1: false,
+ excelForm1: {},
+ excelOption1: {
+ submitBtn: false,
+ emptyBtn: false,
+ column: [
+ {
+ label: "文件上传",
+ prop: "excelFile",
+ type: "upload",
+ drag: true,
+ loadText: "文件上传中,请稍等",
+ span: 24,
+ propsHttp: {
+ res: "data",
+ },
+ tip: "请上传 .xls,.xlsx 标准格式文件",
+ action: "/api/information/import-informaton",
+ },
+ {
+ label: "模板下载",
+ prop: "excelTemplate",
+ formslot: true,
+ span: 24,
+ },
+ ],
+ },
+
+ loading: true, //保安单位基本信息
+ selectionList: [],
+ page: {
+ pageSize: 10,
+ currentPage: 1,
+ total: 0,
+ },
+
+ treeData: [],
+ treeOption: {
+ title: "我是标题",
+ filterText: "搜索关键字自定义",
+ defaultExpandAll: true,
+ addBtn: false,
+ menu: false,
+ size: "small",
+ formOption: {
+ labelWidth: 100,
+ column: [
+ {
+ label: "自定义项",
+ prop: "label",
+ },
+ ],
+ },
+ props: {
+ labelText: "标题",
+ label: "title",
+ value: "id",
+ children: "children",
+ },
+ },
+ // treeOption: {
+ // nodeKey: "id",
+ // // lazy: true,
+ // // treeLoad: function (node, resolve) {
+ // // // const parentId = node.level === 0 ? 0 : node.data.id;
+ // // getDeptLazyTree().then((res) => {
+ // // resolve(
+ // // res.data.data.map((item) => {
+ // // console.log({
+ // // ...item,
+ // // leaf: !item.hasChildren,
+ // // });
+ // // return {
+ // // ...item,
+ // // leaf: !item.hasChildren,
+ // // };
+ // // })
+ // // );
+ // // });
+ // // },
+ // addBtn: false,
+ // menu: false,
+ // size: "small",
+ // props: {
+ // labelText: "标题",
+ // label: "title",
+ // value: "value",
+ // children: "children",
+ // },
+ // },
+
+ obj0: {
+ title0: "保安单位基本信息",
+ },
+ option0: {
+ emptyBtn: false,
+ submitBtn: false,
+ gutter: 30,
+ column: column0,
+ },
+ obj1: {
+ title1: "保安单位出资人员",
+ },
+ option1: {
+ emptyBtn: false,
+ submitBtn: false,
+ gutter: 30,
+ column: column1,
+ },
+ obj2: {
+ title2: "主要管理人员信息",
+ },
+ option2: {
+ emptyBtn: false,
+ submitBtn: false,
+ gutter: 30,
+ column: column2,
+ },
+
+ forms: -1,
+ data0: {},
+ data1: {},
+ data2: {},
+ b0: {},
+ b1: {},
+ b2: {},
+ noshehuibianma: 0,
+ nobumen: 0,
+
+ query: {},
+ data: [],
+ option: {
+ index: true,
+ addBtn: false,
+ // card: true,
+ tip: false,
+ searchSize: "mini",
+ searchMenuSpan: 6,
+ height: 583,
+ menuWidth: 275,
+ align: "center",
+ border: true,
+
+ selection: true,
+ column: [
+ ...column,
+ {
+ label: "服务区域",
+ labelWidth: 160,
+ prop: "fregion",
+ width: 69,
+ },
+ {
+ label: "服务时间",
+ labelWidth: 160,
+ prop: "ftime",
+ width: 69,
+ type: "date",
+ format: "yyyy-MM-dd",
+ valueFormat: "timestamp",
+ },
+ ],
+ },
+ };
+ },
+ computed: {
+ ...mapGetters(["userInfo"]),
+ ids() {
+ let ids = [];
+ this.selectionList.forEach((ele) => {
+ ids.push(ele.creditcode);
+ });
+ return ids.join(",");
+ },
+ ids1() {
+ let ids1 = [];
+ this.selectionList.forEach((ele) => {
+ ids1.push(ele.departmentid);
+ });
+ return ids1.join(",");
+ },
+ haveID() {
+ return this.obj0.creditcode;
+ },
+ },
+ methods: {
+ rowClickSelf(val) {
+ // console.log(val.departmentid);
+ this.$router.push({
+ path: "/securityGuardOnce/index",
+ query: { departmentid: val.departmentid },
+ });
+ },
+ handleImport1() {
+ this.excelBox1 = true;
+ },
+ uploadAfter1(res, done, loading, column) {
+ window.console.log(column);
+ this.excelBox1 = false;
+ // this.refreshChange();
+ done();
+ },
+ handleTemplate1() {
+ window.open(`/api/examSubjectChoices/export-template`);
+ },
+
+ // handleChangeTABS(column) {
+ // this.typeTABS = column;
+ // // this.$message.success(JSON.stringify(column));
+ // if (column.prop == "tab1") {
+ // this.loading1 = false;
+ // this.loading2 = false;
+ // this.onLoad(this.page);
+ // } else if (column.prop == "tab2") {
+ // this.loading = false;
+ // this.loading2 = false;
+ // this.onLoad1(this.page1); //第二个表格不会自动执行
+ // } else if (column.prop == "tab3") {
+ // this.loading1 = false;
+ // this.loading = false;
+ // this.onLoad2(this.page2); //第二个表格不会自动执行
+ // }
+ // },
+ //保安单位基本信息
+ sizeChange(val) {
+ this.page1.currentPage = 1;
+ this.page1.pageSize = val;
+ // this.getData();
+ this.onLoad(this.page, this.query);
+ // this.$message.success("行数" + val);
+ },
+ currentChange(val) {
+ this.page1.currentPage = val;
+ // this.getData();
+ this.onLoad(this.page, this.query);
+ // this.$message.success("页码" + val);
+ },
+ rowSave(form, done, loading) {
+ // console.log("save1");
+ this.forms = 0;
+ var that = this;
+ //先获取部门接口
+ getDeptLazyTree().then((res) => {
+ var d = res.data.data;
+ that.treeData = d;
+ // console.log(d);
+ });
+ },
+ searchChange(params, done) {
+ this.query = params;
+ this.page.currentPage = 1;
+ this.onLoad(this.page, params);
+ done();
+ },
+ searchReset() {
+ this.query = {};
+ this.onLoad(this.page);
+ },
+ rowUpdate(row, index, done, loading) {
+ delete row.tenantid;
+ delete row.regstsat;
+ console.log(row, 0);
+ update(row).then(
+ () => {
+ this.onLoad(this.page);
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ });
+ done();
+ },
+ (error) => {
+ window.console.log(error);
+ loading();
+ }
+ );
+ },
+ rowDel(row) {
+ this.$confirm("确定将选择数据删除?", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning",
+ })
+ .then(() => {
+ console.log(row);
+ return remove(row.creditcode, row.departmentid);
+ })
+ .then(() => {
+ this.onLoad(this.page);
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ });
+ });
+ },
+ selectionChange(list) {
+ this.selectionList = list;
+ },
+ handleDelete() {
+ if (this.selectionList.length === 0) {
+ this.$message.warning("请选择至少一条数据");
+ return;
+ }
+ this.$confirm("确定批量将选择数据删除?", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning",
+ })
+ .then(() => {
+ // console.log(this.ids);
+ return remove(this.ids, this.ids1);
+ })
+ .then(() => {
+ this.onLoad(this.page);
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ });
+ this.$refs.crudrec.toggleSelection();
+ })
+ .catch((res) => {});
+ },
+ refreshChange() {
+ this.onLoad(this.page, this.query);
+ },
+ rowClick(row) {
+ // console.log(row);
+ // row.identificationnumber; //统一社会信用代 码
+ window.localStorage.setItem("danweidata", JSON.stringify(row));
+ this.$router.push({
+ path: "/securityUnitChild",
+ // redirect: { name: "foo" },
+ query: { rowsecurity: "fromSecurity" },
+ // params: { row: row.identificationnumber },
+ });
+ },
+ //跳转到附近列表页面
+ handleUploadPage(row) {
+ this.$router.push({
+ path: `/resource/attachCopy`,
+ query: {
+ deptId: row.departmentid,
+ enterprisename: row.enterprisename,
+ },
+ });
+ },
+ onLoad(page, params = {}) {
+ if (this.userInfo.role_id == "1414840172333842433") {
+ console.log("是公安add jurisdiction");
+ params["jurisdiction"] = this.userInfo.jurisdiction;
+ }
+ params["stats"] = 0;
+ this.loading = true;
+ getdata(
+ page.currentPage,
+ page.pageSize,
+ Object.assign(params, this.query)
+ ).then((res) => {
+ const data = res.data.data;
+ this.page.total = data.total;
+ this.data = data.records;
+ window.localStorage.setItem("danweidataS", JSON.stringify(this.data));
+ console.log(this.data);
+ this.loading = false;
+ });
+ },
+ // nodeClick(data) {//分局 不在这添加
+ // // this.treeDeptId = data.id;
+ // // this.page.currentPage = 1;
+ // // this.onLoad(this.page);
+ // // this.$message.success(JSON.stringify(data));
+ // this.obj0["departmentid"] = data.title;
+ // this.obj1["departmentid"] = data.title;
+ // this.obj2["departmentid"] = data.title;
+ // this.obj0["useid"] = data.id;
+ // this.obj1["useid"] = data.id;
+ // this.obj2["useid"] = data.id;
+ // this.nobumen = 1;
+ // },
+ tip0() {
+ if (this.panduanmeiyouziduan()) {
+ return;
+ }
+ var d = {};
+ for (var k in this.obj0) {
+ for (var i in column0) {
+ if (k == column0[i].prop && k != "title0") {
+ d[k] = this.obj0[k];
+ }
+ }
+ }
+ console.log(d);
+ for (var k in d) {
+ if (d[k] == "" || d[k] == undefined) {
+ console.log(k);
+ this.$message.warning("请检查表单是否填写完整!");
+ return;
+ }
+ }
+ console.log(d, 0);
+ this.data0 = d;
+ this.forms = 1;
+ },
+ tip1() {
+ if (this.panduanmeiyouziduan()) {
+ return;
+ }
+ var d = {};
+ for (var k in this.obj1) {
+ for (var i in column1) {
+ if (k == column1[i].prop && k != "title1") {
+ d[k] = this.obj1[k];
+ }
+ }
+ }
+ d["capital"] = d["capital2"];
+ delete d["capital2"];
+ // console.log(d);
+ for (var k in d) {
+ if (d[k] == "" || d[k] == undefined) {
+ console.log(k);
+ this.$message.warning("请检查表单是否填写完整!");
+ return;
+ }
+ }
+ console.log(d, 1);
+ this.data1 = d;
+ this.forms = 2;
+ },
+ tip2() {
+ if (this.panduanmeiyouziduan()) {
+ return;
+ }
+ var d = {};
+ for (var k in this.obj2) {
+ for (var i in column2) {
+ if (k == column2[i].prop && k != "title2") {
+ d[k] = this.obj2[k];
+ }
+ }
+ }
+ console.log(d);
+ d["cardid"] = d["cardid2"];
+ delete d["cardid2"];
+ d["cell"] = d["cell2"];
+ delete d["cell2"];
+ // d["shareholdingratio"] = d["shareholdingratio2"];
+ // delete d["shareholdingratio2"];
+ for (var k in d) {
+ if (d[k] == "" || d[k] == undefined) {
+ console.log(k);
+ this.$message.warning("请检查表单是否填写完整!");
+ return;
+ }
+ }
+ console.log(d, 2);
+ this.data2 = d;
+
+ // this.data0.departmentid = this.data0.useid;
+ // this.data1.departmentid = this.data1.useid;
+ // this.data2.departmentid = this.data2.useid;
+ // delete this.data0.useid;
+ // delete this.data1.useid;
+ // delete this.data2.useid;
+
+ adddata(this.data0).then((res) => {
+ console.log(res, 0);
+ });
+ adddata1(this.data1).then((res) => {
+ console.log(res, 1);
+ });
+ adddata2(this.data2).then((res) => {
+ console.log(res, 2);
+ });
+ var time = setTimeout(() => {
+ this.onLoad(this.page, this.query);
+ console.log(this.data0, this.data1, this.data2, "已刷新");
+ }, 500);
+ this.tipover();
+ },
+ tip1up1() {
+ this.forms = 0;
+ },
+ tip2up2() {
+ this.forms = 1;
+ },
+ tipover() {
+ this.forms = -1;
+ this.obj0 = {
+ title0: "保安单位基本信息",
+ };
+ this.obj1 = {
+ title1: "保安单位出资人员",
+ };
+ this.obj2 = {
+ title2: "主要管理人员信息",
+ };
+ this.data0 = {};
+ this.data1 = {};
+ this.data2 = {};
+ this.noshehuibianma = 0;
+ this.nobumen = 0;
+ },
+ panduanmeiyouziduan() {
+ if (this.noshehuibianma == 0) {
+ this.$message.warning("请输入统一社会信用代码");
+ return true;
+ }
+ if (this.nobumen == 0) {
+ return false;
+ this.$message.warning("请选则部门");
+ }
+ return false;
+ },
+ },
+ watch: {
+ haveID() {
+ // console.log(this.haveID);
+ if (this.haveID != undefined) {
+ if (this.haveID.length > 5) {
+ //统一社会信用代码判断
+ this.noshehuibianma = 1;
+ } else {
+ this.noshehuibianma = 0;
+ }
+ }
+ },
+ havedata() {
+ console.log(this.havedata, "qqqqq");
+ },
+ },
+ mounted() {},
+};
+</script>
+
+<style lang="scss">
+.securityUnit {
+ width: 100%;
+ height: 100%;
+ // border: 1px solid #000;
+ box-sizing: border-box;
+}
+// .el-card__body {
+// padding-bottom: 5px !important;
+// }
+// .avue-crud__tip,
+// .el-tag,
+// .el-tag--light {
+// padding: 0 !important;
+// }
+
+.lod {
+ position: absolute;
+ top: 0;
+ left: 0;
+ width: 100%;
+ height: 100%;
+ background-color: rgba($color: #000000, $alpha: 0.5);
+ padding: 100px 0 0 0;
+ z-index: 500 !important;
+ display: flex;
+ // align-items: center;
+ justify-content: center;
+ .trees {
+ z-index: 501 !important;
+ position: absolute;
+ width: 15%;
+ top: 100px;
+ left: 0;
+ // display: none;
+ }
+ .lod-in {
+ width: 70%;
+ height: auto;
+ background-color: transparent;
+
+ // padding: 10px 0 0 0;
+ }
+
+ .el-collapse-item {
+ padding-top: 15px !important;
+ }
+}
+.el-collapse {
+ border-top: 1px solid transparent !important;
+}
+</style>
diff --git "a/src/views/securityUnit\345\244\207\344\273\275/transRegionalcompany.vue" "b/src/views/securityUnit\345\244\207\344\273\275/transRegionalcompany.vue"
new file mode 100644
index 0000000..5598241
--- /dev/null
+++ "b/src/views/securityUnit\345\244\207\344\273\275/transRegionalcompany.vue"
@@ -0,0 +1,734 @@
+<template>
+ <basic-container>
+ <div class="securityUnit">
+ <avue-crud
+ :option="option"
+ :data="data"
+ :page.sync="page"
+ ref="crudrec"
+ @on-load="onLoad"
+ :table-loading="loading"
+ @row-save="rowSave"
+ @search-change="searchChange"
+ @search-reset="searchReset"
+ @row-update="rowUpdate"
+ @row-del="rowDel"
+ @selection-change="selectionChange"
+ @refresh-change="refreshChange"
+ >
+ <!-- @row-click="rowClick" -->
+
+ <template slot-scope="{ row }" slot="znum">
+ <el-tag
+ class="rowClickSelf"
+ @click="rowClickSelf(row)"
+ title="点击查看保安人员情况"
+ >{{ row.znum }}</el-tag
+ >
+ </template>
+
+ <template slot-scope="{ type, size, row }" slot="menu">
+ <el-button
+ icon="el-icon-s-custom"
+ :size="size"
+ :type="type"
+ @click.stop="rowClick(row)"
+ >查看
+ </el-button>
+ <el-button
+ :size="size"
+ :type="type"
+ @click="handleUploadPage(row)"
+ icon="el-icon-circle-check"
+ >附件上传
+ </el-button>
+ </template>
+ <template slot="menuLeft">
+ <el-button
+ type="primary"
+ icon="el-icon-plus"
+ size="small"
+ plain
+ @click.stop="rowSave"
+ >新增</el-button
+ >
+
+ <el-button
+ type="danger"
+ size="small"
+ plain
+ icon="el-icon-delete"
+ @click="handleDelete"
+ >删 除
+ </el-button>
+ <el-button
+ type="success"
+ size="small"
+ plain
+ icon="el-icon-upload2"
+ @click="handleImport1"
+ >批量导入
+ </el-button>
+ </template>
+ </avue-crud>
+ <div class="lod" v-show="forms != -1">
+ <div class="lod-in">
+ <!-- <el-col class="trees" v-if="forms == 0">
+ <div class="box">
+ <el-scrollbar>
+ <basic-container>
+ <avue-tree
+ :option="treeOption"
+ :data="treeData"
+ @node-click="nodeClick"
+ />
+ </basic-container>
+ </el-scrollbar>
+ </div>
+ </el-col> -->
+ <avue-form
+ ref="form"
+ v-model="obj0"
+ :option="option0"
+ v-if="forms == 0"
+ >
+ <template slot="menuForm">
+ <el-button type="primary" @click="tip0">下一页</el-button>
+ <el-button type="info" @click="tipover">取消</el-button>
+ </template>
+ </avue-form>
+ <avue-form
+ ref="form1"
+ v-model="obj1"
+ :option="option1"
+ v-else-if="forms == 1"
+ >
+ <template slot="menuForm">
+ <el-button type="primary" @click="tip1up1">上一页</el-button>
+ <el-button type="primary" @click="tip1">下一页</el-button>
+ <el-button type="info" @click="tipover">取消</el-button>
+ </template>
+ </avue-form>
+ <avue-form
+ ref="form2"
+ v-model="obj2"
+ :option="option2"
+ v-else-if="forms == 2"
+ >
+ <template slot="menuForm">
+ <el-button type="primary" @click="tip2up2">上一页</el-button>
+ <el-button type="primary" @click="tip2">提交</el-button>
+ <el-button type="info" @click="tipover">取消</el-button>
+ </template>
+ </avue-form>
+ </div>
+ </div>
+ </div>
+ <el-dialog
+ title="保安单位导入"
+ append-to-body
+ :visible.sync="excelBox1"
+ width="555px"
+ >
+ <avue-form
+ :option="excelOption1"
+ v-model="excelForm1"
+ :upload-after="uploadAfter1"
+ >
+ <template slot="excelTemplate">
+ <el-button type="primary" @click="handleTemplate1">
+ 点击下载<i class="el-icon-download el-icon--right"></i>
+ </el-button>
+ </template>
+ </avue-form>
+ </el-dialog>
+ </basic-container>
+</template>
+
+<script>
+import { column, column0, column1, column2 } from "./data";
+import {
+ getdata,
+ adddata,
+ update,
+ remove,
+ adddata1,
+ adddata2,
+ getDeptLazyTree,
+} from "@/api/securityUnit/securityUnit";
+import { mapGetters } from "vuex";
+export default {
+ data() {
+ var w = 160,
+ s = 12;
+ return {
+ excelBox1: false,
+ excelForm1: {},
+ excelOption1: {
+ submitBtn: false,
+ emptyBtn: false,
+ column: [
+ {
+ label: "文件上传",
+ prop: "excelFile",
+ type: "upload",
+ drag: true,
+ loadText: "文件上传中,请稍等",
+ span: 24,
+ propsHttp: {
+ res: "data",
+ },
+ tip: "请上传 .xls,.xlsx 标准格式文件",
+ action: "/api/information/import-informaton",
+ },
+ {
+ label: "模板下载",
+ prop: "excelTemplate",
+ formslot: true,
+ span: 24,
+ },
+ ],
+ },
+
+ loading: true, //保安单位基本信息
+ selectionList: [],
+ page: {
+ pageSize: 10,
+ currentPage: 1,
+ total: 0,
+ },
+
+ treeData: [],
+ treeOption: {
+ title: "我是标题",
+ filterText: "搜索关键字自定义",
+ defaultExpandAll: true,
+ addBtn: false,
+ menu: false,
+ size: "small",
+ formOption: {
+ labelWidth: 100,
+ column: [
+ {
+ label: "自定义项",
+ prop: "label",
+ },
+ ],
+ },
+ props: {
+ labelText: "标题",
+ label: "title",
+ value: "id",
+ children: "children",
+ },
+ },
+ // treeOption: {
+ // nodeKey: "id",
+ // // lazy: true,
+ // // treeLoad: function (node, resolve) {
+ // // // const parentId = node.level === 0 ? 0 : node.data.id;
+ // // getDeptLazyTree().then((res) => {
+ // // resolve(
+ // // res.data.data.map((item) => {
+ // // console.log({
+ // // ...item,
+ // // leaf: !item.hasChildren,
+ // // });
+ // // return {
+ // // ...item,
+ // // leaf: !item.hasChildren,
+ // // };
+ // // })
+ // // );
+ // // });
+ // // },
+ // addBtn: false,
+ // menu: false,
+ // size: "small",
+ // props: {
+ // labelText: "标题",
+ // label: "title",
+ // value: "value",
+ // children: "children",
+ // },
+ // },
+
+ obj0: {
+ title0: "保安单位基本信息",
+ },
+ option0: {
+ emptyBtn: false,
+ submitBtn: false,
+ gutter: 30,
+ column: column0,
+ },
+ obj1: {
+ title1: "保安单位出资人员",
+ },
+ option1: {
+ emptyBtn: false,
+ submitBtn: false,
+ gutter: 30,
+ column: column1,
+ },
+ obj2: {
+ title2: "主要管理人员信息",
+ },
+ option2: {
+ emptyBtn: false,
+ submitBtn: false,
+ gutter: 30,
+ column: column2,
+ },
+
+ forms: -1,
+ data0: {},
+ data1: {},
+ data2: {},
+ b0: {},
+ b1: {},
+ b2: {},
+ noshehuibianma: 0,
+ nobumen: 0,
+
+ query: {},
+ data: [],
+ option: {
+ index: true,
+ addBtn: false,
+ // card: true,
+ tip: false,
+ searchSize: "mini",
+ searchMenuSpan: 6,
+ height: 583,
+ menuWidth: 275,
+ align: "center",
+ border: true,
+
+ selection: true,
+ column: column,
+ },
+ };
+ },
+ computed: {
+ ...mapGetters(["userInfo"]),
+ ids() {
+ let ids = [];
+ this.selectionList.forEach((ele) => {
+ ids.push(ele.creditcode);
+ });
+ return ids.join(",");
+ },
+ ids1() {
+ let ids1 = [];
+ this.selectionList.forEach((ele) => {
+ ids1.push(ele.departmentid);
+ });
+ return ids1.join(",");
+ },
+ haveID() {
+ return this.obj0.creditcode;
+ },
+ },
+ methods: {
+ rowClickSelf(val) {
+ // console.log(val.departmentid);
+ this.$router.push({
+ path: "/securityGuardOnce/index",
+ query: { departmentid: val.departmentid },
+ });
+ },
+ handleImport1() {
+ this.excelBox1 = true;
+ },
+ uploadAfter1(res, done, loading, column) {
+ window.console.log(column);
+ this.excelBox1 = false;
+ // this.refreshChange();
+ done();
+ },
+ handleTemplate1() {
+ window.open(`/api/examSubjectChoices/export-template`);
+ },
+
+ // handleChangeTABS(column) {
+ // this.typeTABS = column;
+ // // this.$message.success(JSON.stringify(column));
+ // if (column.prop == "tab1") {
+ // this.loading1 = false;
+ // this.loading2 = false;
+ // this.onLoad(this.page);
+ // } else if (column.prop == "tab2") {
+ // this.loading = false;
+ // this.loading2 = false;
+ // this.onLoad1(this.page1); //第二个表格不会自动执行
+ // } else if (column.prop == "tab3") {
+ // this.loading1 = false;
+ // this.loading = false;
+ // this.onLoad2(this.page2); //第二个表格不会自动执行
+ // }
+ // },
+ //保安单位基本信息
+ sizeChange(val) {
+ this.page1.currentPage = 1;
+ this.page1.pageSize = val;
+ // this.getData();
+ this.onLoad(this.page, this.query);
+ // this.$message.success("行数" + val);
+ },
+ currentChange(val) {
+ this.page1.currentPage = val;
+ // this.getData();
+ this.onLoad(this.page, this.query);
+ // this.$message.success("页码" + val);
+ },
+ rowSave(form, done, loading) {
+ // console.log("save1");
+ this.forms = 0;
+ var that = this;
+ //先获取部门接口
+ getDeptLazyTree().then((res) => {
+ var d = res.data.data;
+ that.treeData = d;
+ // console.log(d);
+ });
+ },
+ searchChange(params, done) {
+ this.query = params;
+ this.page.currentPage = 1;
+ this.onLoad(this.page, params);
+ done();
+ },
+ searchReset() {
+ this.query = {};
+ this.onLoad(this.page);
+ },
+ rowUpdate(row, index, done, loading) {
+ delete row.tenantid;
+ delete row.regstsat;
+ console.log(row, 0);
+ update(row).then(
+ () => {
+ this.onLoad(this.page);
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ });
+ done();
+ },
+ (error) => {
+ window.console.log(error);
+ loading();
+ }
+ );
+ },
+ rowDel(row) {
+ this.$confirm("确定将选择数据删除?", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning",
+ })
+ .then(() => {
+ console.log(row);
+ return remove(row.creditcode, row.departmentid);
+ })
+ .then(() => {
+ this.onLoad(this.page);
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ });
+ });
+ },
+ selectionChange(list) {
+ this.selectionList = list;
+ },
+ handleDelete() {
+ if (this.selectionList.length === 0) {
+ this.$message.warning("请选择至少一条数据");
+ return;
+ }
+ this.$confirm("确定批量将选择数据删除?", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning",
+ })
+ .then(() => {
+ // console.log(this.ids);
+ return remove(this.ids, this.ids1);
+ })
+ .then(() => {
+ this.onLoad(this.page);
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ });
+ this.$refs.crudrec.toggleSelection();
+ })
+ .catch((res) => {});
+ },
+ refreshChange() {
+ this.onLoad(this.page, this.query);
+ },
+ rowClick(row) {
+ // console.log(row);
+ // row.identificationnumber; //统一社会信用代 码
+ window.localStorage.setItem("danweidata", JSON.stringify(row));
+ this.$router.push({
+ path: "/securityUnitChild",
+ // redirect: { name: "foo" },
+ query: { rowsecurity: "fromSecurity" },
+ // params: { row: row.identificationnumber },
+ });
+ },
+ //跳转到附近列表页面
+ handleUploadPage(row) {
+ this.$router.push({
+ path: `/resource/attachCopy`,
+ query: {
+ deptId: row.departmentid,
+ enterprisename: row.enterprisename,
+ },
+ });
+ },
+ onLoad(page, params = {}) {
+ if (this.userInfo.role_id == "1414840172333842433") {
+ console.log("是公安add jurisdiction");
+ params["jurisdiction"] = this.userInfo.jurisdiction;
+ }
+ params["stats"] = 4;
+ this.loading = true;
+ getdata(
+ page.currentPage,
+ page.pageSize,
+ Object.assign(params, this.query)
+ ).then((res) => {
+ const data = res.data.data;
+ this.page.total = data.total;
+ this.data = data.records;
+ window.localStorage.setItem("danweidataS", JSON.stringify(this.data));
+ console.log(this.data);
+ this.loading = false;
+ });
+ },
+ // nodeClick(data) {//分局 不在这添加
+ // // this.treeDeptId = data.id;
+ // // this.page.currentPage = 1;
+ // // this.onLoad(this.page);
+ // // this.$message.success(JSON.stringify(data));
+ // this.obj0["departmentid"] = data.title;
+ // this.obj1["departmentid"] = data.title;
+ // this.obj2["departmentid"] = data.title;
+ // this.obj0["useid"] = data.id;
+ // this.obj1["useid"] = data.id;
+ // this.obj2["useid"] = data.id;
+ // this.nobumen = 1;
+ // },
+ tip0() {
+ if (this.panduanmeiyouziduan()) {
+ return;
+ }
+ var d = {};
+ for (var k in this.obj0) {
+ for (var i in column0) {
+ if (k == column0[i].prop && k != "title0") {
+ d[k] = this.obj0[k];
+ }
+ }
+ }
+ console.log(d);
+ for (var k in d) {
+ if (d[k] == "" || d[k] == undefined) {
+ console.log(k);
+ this.$message.warning("请检查表单是否填写完整!");
+ return;
+ }
+ }
+ console.log(d, 0);
+ this.data0 = d;
+ this.forms = 1;
+ },
+ tip1() {
+ if (this.panduanmeiyouziduan()) {
+ return;
+ }
+ var d = {};
+ for (var k in this.obj1) {
+ for (var i in column1) {
+ if (k == column1[i].prop && k != "title1") {
+ d[k] = this.obj1[k];
+ }
+ }
+ }
+ d["capital"] = d["capital2"];
+ delete d["capital2"];
+ // console.log(d);
+ for (var k in d) {
+ if (d[k] == "" || d[k] == undefined) {
+ console.log(k);
+ this.$message.warning("请检查表单是否填写完整!");
+ return;
+ }
+ }
+ console.log(d, 1);
+ this.data1 = d;
+ this.forms = 2;
+ },
+ tip2() {
+ if (this.panduanmeiyouziduan()) {
+ return;
+ }
+ var d = {};
+ for (var k in this.obj2) {
+ for (var i in column2) {
+ if (k == column2[i].prop && k != "title2") {
+ d[k] = this.obj2[k];
+ }
+ }
+ }
+ console.log(d);
+ d["cardid"] = d["cardid2"];
+ delete d["cardid2"];
+ d["cell"] = d["cell2"];
+ delete d["cell2"];
+ // d["shareholdingratio"] = d["shareholdingratio2"];
+ // delete d["shareholdingratio2"];
+ for (var k in d) {
+ if (d[k] == "" || d[k] == undefined) {
+ console.log(k);
+ this.$message.warning("请检查表单是否填写完整!");
+ return;
+ }
+ }
+ console.log(d, 2);
+ this.data2 = d;
+
+ // this.data0.departmentid = this.data0.useid;
+ // this.data1.departmentid = this.data1.useid;
+ // this.data2.departmentid = this.data2.useid;
+ // delete this.data0.useid;
+ // delete this.data1.useid;
+ // delete this.data2.useid;
+
+ adddata(this.data0).then((res) => {
+ console.log(res, 0);
+ });
+ adddata1(this.data1).then((res) => {
+ console.log(res, 1);
+ });
+ adddata2(this.data2).then((res) => {
+ console.log(res, 2);
+ });
+ var time = setTimeout(() => {
+ this.onLoad(this.page, this.query);
+ console.log(this.data0, this.data1, this.data2, "已刷新");
+ }, 500);
+ this.tipover();
+ },
+ tip1up1() {
+ this.forms = 0;
+ },
+ tip2up2() {
+ this.forms = 1;
+ },
+ tipover() {
+ this.forms = -1;
+ this.obj0 = {
+ title0: "保安单位基本信息",
+ };
+ this.obj1 = {
+ title1: "保安单位出资人员",
+ };
+ this.obj2 = {
+ title2: "主要管理人员信息",
+ };
+ this.data0 = {};
+ this.data1 = {};
+ this.data2 = {};
+ this.noshehuibianma = 0;
+ this.nobumen = 0;
+ },
+ panduanmeiyouziduan() {
+ if (this.noshehuibianma == 0) {
+ this.$message.warning("请输入统一社会信用代码");
+ return true;
+ }
+ if (this.nobumen == 0) {
+ return false;
+ this.$message.warning("请选则部门");
+ }
+ return false;
+ },
+ },
+ watch: {
+ haveID() {
+ // console.log(this.haveID);
+ if (this.haveID != undefined) {
+ if (this.haveID.length > 5) {
+ //统一社会信用代码判断
+ this.noshehuibianma = 1;
+ } else {
+ this.noshehuibianma = 0;
+ }
+ }
+ },
+ havedata() {
+ console.log(this.havedata, "qqqqq");
+ },
+ },
+ mounted() {},
+};
+</script>
+
+<style lang="scss">
+.securityUnit {
+ width: 100%;
+ height: 100%;
+ // border: 1px solid #000;
+ box-sizing: border-box;
+}
+// .el-card__body {
+// padding-bottom: 5px !important;
+// }
+// .avue-crud__tip,
+// .el-tag,
+// .el-tag--light {
+// padding: 0 !important;
+// }
+
+.lod {
+ position: absolute;
+ top: 0;
+ left: 0;
+ width: 100%;
+ height: 100%;
+ background-color: rgba($color: #000000, $alpha: 0.5);
+ padding: 100px 0 0 0;
+ z-index: 500 !important;
+ display: flex;
+ // align-items: center;
+ justify-content: center;
+ .trees {
+ z-index: 501 !important;
+ position: absolute;
+ width: 15%;
+ top: 100px;
+ left: 0;
+ // display: none;
+ }
+ .lod-in {
+ width: 70%;
+ height: auto;
+ background-color: transparent;
+
+ // padding: 10px 0 0 0;
+ }
+
+ .el-collapse-item {
+ padding-top: 15px !important;
+ }
+}
+.el-collapse {
+ border-top: 1px solid transparent !important;
+}
+</style>
--
Gitblit v1.9.3