From 192010c64e8c3ff3418f27c906e499ccdad1bbad Mon Sep 17 00:00:00 2001
From: liuyg <376836862@qq.com>
Date: Fri, 09 Jul 2021 08:45:45 +0800
Subject: [PATCH] 公司详情关联出资人和管理人,派遣管理关联各小区自己的派遣记录
---
src/router/avue-router.js | 1
src/api/dispatch/dispatch.js | 1
src/views/dispatchChild/data.js | 261 ++++
src/views/securityUnit/index.vue | 673 ++++--------
src/api/securityUnit/securityUnit.js | 45
src/router/views/index.js | 26
src/views/securityUnitChild/index.vue | 717 +++++++++++++
src/views/dispatch/data.js | 40
src/views/dispatch/index.vue | 402 ++++---
src/views/securityUnit/data.js | 414 +++---
src/views/dispatchChild/index.vue | 481 ++++++++
src/views/securityUnitChild/data.js | 202 +++
12 files changed, 2,422 insertions(+), 841 deletions(-)
diff --git a/src/api/dispatch/dispatch.js b/src/api/dispatch/dispatch.js
index 6e2687a..e467c82 100644
--- a/src/api/dispatch/dispatch.js
+++ b/src/api/dispatch/dispatch.js
@@ -39,6 +39,7 @@
}
export const getdata1 = (current, size, params) => {
+ console.log(params,'set')
return request({
url: '/api/dispatcher/page',
method: 'get',
diff --git a/src/api/securityUnit/securityUnit.js b/src/api/securityUnit/securityUnit.js
index 02bf948..e32fbac 100644
--- a/src/api/securityUnit/securityUnit.js
+++ b/src/api/securityUnit/securityUnit.js
@@ -32,13 +32,14 @@
}
export const remove = (ids) => {
+ console.log(ids)
return request({
// url: '/api/information/remove',
url: 'http://192.168.0.104:80/information/remove',
method: 'post',
params: {
- ids,
- }
+ creditcode: ids
+ },
})
}
@@ -55,10 +56,23 @@
})
}
+export const getdataOnce1 = (current, size, params) => {
+ return request({
+ // url: '/api/shareholder/page',
+ url: 'http://192.168.0.104:80/shareholder/selectShareholderInfo',
+ method: 'post',
+ params: {
+ ...params,
+ current,
+ size,
+ }
+ })
+}
+
export const adddata1 = (row) => {
return request({
// url: '/api/shareholder/submit',
- url: 'http://192.168.0.104:80/shareholder/submit',
+ url: 'http://192.168.0.104:80/shareholder/save',
method: 'post',
data: row
})
@@ -84,8 +98,24 @@
})
}
+
+export const getdataOnce2 = (current, size, params) => {
+ return request({
+ // url: '/api/shareholder/page',
+ url: 'http://192.168.0.104:80/member/selectMemberInfo',
+ method: 'post',
+ params: {
+ ...params,
+ current,
+ size,
+ }
+ })
+}
+
+
export const getdata2 = (current, size, params) => {
return request({
+ url: 'http://192.168.0.104:80/member/list',
// url: '/api/dispatcher/page',
method: 'get',
params: {
@@ -98,7 +128,8 @@
export const adddata2 = (row) => {
return request({
- url: '/api/dispatcher/submit',
+ url: 'http://192.168.0.104:80/member/save',
+ // url: '/api/dispatcher/submit',
method: 'post',
data: row
})
@@ -106,7 +137,8 @@
export const update2 = (row) => {
return request({
- url: '/api/dispatcher/submit',
+ url: 'http://192.168.0.104:80/member/update',
+ // url: '/api/dispatcher/submit',
method: 'post',
data: row
})
@@ -114,7 +146,8 @@
export const remove2 = (ids) => {
return request({
- url: '/api/dispatcher/remove',
+ url: 'http://192.168.0.104:80/member/remove',
+ // url: '/api/dispatcher/remove',
method: 'post',
params: {
ids,
diff --git a/src/router/avue-router.js b/src/router/avue-router.js
index 0e68bda..f616be9 100644
--- a/src/router/avue-router.js
+++ b/src/router/avue-router.js
@@ -31,6 +31,7 @@
safe: this,
// 设置标题
setTitle: (title) => {
+ // console.log(title,'luyou')
const defaultTitle = this.$vue.$t('title');
title = title ? `${title}-${defaultTitle}` : defaultTitle;
document.title = title;
diff --git a/src/router/views/index.js b/src/router/views/index.js
index aec0d81..7a8290e 100644
--- a/src/router/views/index.js
+++ b/src/router/views/index.js
@@ -143,6 +143,19 @@
import( /* webpackChunkName: "views" */ '@/views/securityUnit/index')
}]
}, {
+ path: '/securityUnitChild',
+ component: Layout,
+ redirect: '/securityUnitChild/index',
+ children: [{
+ path: 'index',
+ name: '保安单位详情',
+ meta: {
+ i18n: 'dict'
+ },
+ component: () =>
+ import( /* webpackChunkName: "views" */ '@/views/securityUnitChild/index')
+ }]
+}, {
path: '/securityGuard',
component: Layout,
redirect: '/securityGuard/securityGuard',
@@ -168,4 +181,17 @@
component: () =>
import( /* webpackChunkName: "views" */ '@/views/dispatch/index')
}]
+}, {
+ path: '/dispatchChild',
+ component: Layout,
+ redirect: '/dispatchChild/index',
+ children: [{
+ path: 'index',
+ name: '派遣服务记录',
+ meta: {
+ i18n: 'dict'
+ },
+ component: () =>
+ import( /* webpackChunkName: "views" */ '@/views/dispatchChild/index')
+ }]
}]
\ No newline at end of file
diff --git a/src/views/dispatch/data.js b/src/views/dispatch/data.js
index f2a556d..85198ad 100644
--- a/src/views/dispatch/data.js
+++ b/src/views/dispatch/data.js
@@ -1,12 +1,12 @@
-var DIC = [
- {
- label: '招聘中',
- value: 1,
- }, {
- label: '停止招聘',
- value: 2,
- }
-]
+// var DIC = [
+// {
+// label: '招聘中',
+// value: 1,
+// }, {
+// label: '停止招聘',
+// value: 2,
+// }
+// ]
export var column = [//派遣服务公司登记
// {
@@ -33,13 +33,29 @@
{
label: "派遣单位名称",
prop: "name",
- // search: true,
+ search: true,
+ searchLabelWidth: 110,
},
{
label: "保安公司",
prop: "tenantId",
- // width: 70,
- // search: true,
+ type: "tree",
+ search: true,
+ dicUrl: "/api/blade-system/tenant/select",
+ props: {
+ label: "tenantName",
+ value: "tenantId"
+ },
+ // hide: !website.tenantMode,
+ // addDisplay: website.tenantMode,
+ // editDisplay: website.tenantMode,
+ // viewDisplay: website.tenantMode,
+ rules: [{
+ required: true,
+ message: "请输入所属保安单位",
+ trigger: "click"
+ }],
+ // span: 11,
},
{
label: " 联系人",
diff --git a/src/views/dispatch/index.vue b/src/views/dispatch/index.vue
index 568fcc9..2ab82fb 100644
--- a/src/views/dispatch/index.vue
+++ b/src/views/dispatch/index.vue
@@ -1,34 +1,35 @@
<template>
<div class="dispatch">
- <avue-tabs :option="optionTABS" @change="handleChangeTABS"></avue-tabs>
- <span v-if="typeTABS.prop === 'tab1'">
- <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"
- >
- <template slot="menuLeft">
- <el-button
- type="danger"
- size="small"
- plain
- icon="el-icon-delete"
- @click="handleDelete"
- >删 除
- </el-button>
- </template>
- </avue-crud>
- </span>
+ <!-- <avue-tabs :option="optionTABS" @change="handleChangeTABS"></avue-tabs>
+ <span v-if="typeTABS.prop === 'tab1'"> -->
+ <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="menuLeft">
+ <el-button
+ type="danger"
+ size="small"
+ plain
+ icon="el-icon-delete"
+ @click="handleDelete"
+ >删 除
+ </el-button>
+ </template>
+ </avue-crud>
+ <!-- </span>
<span v-else-if="typeTABS.prop === 'tab2'">
<avue-crud
:option="option1"
@@ -56,7 +57,7 @@
</el-button>
</template>
</avue-crud>
- </span>
+ </span> -->
<!-- <span v-else-if="typeTABS.prop === 'tab3'">选项卡内容3</span> -->
</div>
</template>
@@ -116,27 +117,57 @@
align: "center",
selection: true,
column: column,
+ // group: [
+ // {
+ // label: "基础信息",
+ // prop: "baseInfo",
+ // icon: "el-icon-user-solid",
+ // column: [
+ // {
+ // label: "所属保安单位",
+ // prop: "tenantId",
+ // type: "tree",
+ // dicUrl: "/api/blade-system/tenant/select",
+ // props: {
+ // label: "tenantName",
+ // value: "tenantId",
+ // },
+ // hide: !website.tenantMode,
+ // addDisplay: website.tenantMode,
+ // editDisplay: website.tenantMode,
+ // viewDisplay: website.tenantMode,
+ // rules: [
+ // {
+ // required: true,
+ // message: "请输入所属保安单位",
+ // trigger: "click",
+ // },
+ // ],
+ // span: 24,
+ // },
+ // ],
+ // },
+ // ],
},
-
- loading1: true, //派遣记录
- selectionList1: [],
- page1: {
- pageSize: 10,
- currentPage: 1,
- total: 0,
- },
- query1: {},
- data1: [],
- option1: {
- card: true,
- searchSize: "mini",
- searchMenuSpan: 6,
- height: 547,
- menuWidth: 160,
- align: "center",
- selection: true,
- column: column1,
- },
+ // loading1: true, //派遣记录
+ // selectionList1: [],
+ // page1: {
+ // pageSize: 10,
+ // currentPage: 1,
+ // total: 0,
+ // },
+ // query1: {},
+ // data1: [],
+ // option1: {
+ // card: true,
+ // searchSize: "mini",
+ // searchMenuSpan: 6,
+ // height: 547,
+ // menuWidth: 160,
+ // align: "center",
+ // selection: true,
+ // column: column1,
+ // },
};
},
computed: {
@@ -182,10 +213,10 @@
// this.$message.success("页码" + val);
},
rowSave(form, done, loading) {
- var that = this;
- // var form = this.data[0];
- // delete form.id;
- // for (var k = 0; k < 13; k++) {
+ // var that = this;
+ // var form = this.data[0];
+ // delete form.id;
+ // for (var k = 0; k < 13; k++) {
adddata(form).then(
(res) => {
this.onLoad(this.page);
@@ -200,7 +231,7 @@
loading();
}
);
- // }
+ // }
},
searchChange(params, done) {
this.query = params;
@@ -274,6 +305,15 @@
refreshChange() {
this.onLoad(this.page, this.query);
},
+ rowClick(row) {
+ console.log(row);
+ this.$router.push({
+ path: "/dispatchChild",
+ // redirect: { name: "foo" },
+ query: { row: row },
+ // params: { row: row.identificationnumber },
+ });
+ },
onLoad(page, params = {}) {
this.loading = true;
getdata(
@@ -292,133 +332,133 @@
//派遣服务公司登记
//派遣记录
- sizeChange1(val) {
- this.page1.currentPage = 1;
- this.page1.pageSize = val;
- // this.getData();
- this.onLoad1(this.page1, this.query1);
- // this.$message.success("行数" + val);
- },
- currentChange1(val) {
- this.page1.currentPage = val;
- // this.getData();
- this.onLoad1(this.page1, this.query1);
- // this.$message.success("页码" + val);
- },
- rowSave1(form, done, loading) {
- var that = this;
- // var form = this.data[0];
- // delete form.id;
- // for (var k = 0; k < 13; k++) {
- adddata1(form).then(
- (res) => {
- this.onLoad1(this.page1);
- this.$message({
- type: "success",
- message: "操作成功!",
- });
- done();
- },
- (error) => {
- window.console.log(error);
- loading();
- }
- );
- // }
- },
- searchChange1(params, done) {
- this.query1 = params;
- this.page1.currentPage = 1;
- this.onLoad1(this.page1, params);
- done();
- },
- searchReset1() {
- this.query = {};
- this.onLoad1(this.page1);
- },
- rowUpdate1(row, index, done, loading) {
- console.log(row);
- update1(row).then(
- () => {
- this.onLoad1(this.page1);
- this.$message({
- type: "success",
- message: "操作成功!",
- });
- done();
- },
- (error) => {
- window.console.log(error);
- loading();
- }
- );
- },
- rowDel1(row) {
- this.$confirm("确定将选择数据删除?", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning",
- })
- .then(() => {
- return remove1(row.id);
- })
- .then(() => {
- this.onLoad1(this.page1);
- this.$message({
- type: "success",
- message: "操作成功!",
- });
- });
- },
- selectionChange1(list) {
- this.selectionList1 = list;
- console.log(this.selectionList1.length);
- },
- handleDelete1() {
- console.log(this.selectionList1);
- if (this.selectionList1.length === 0) {
- this.$message.warning("请选择至少一条数据");
- return;
- }
- this.$confirm("确定将选择数据删除?", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning",
- })
- .then(() => {
- return remove1(this.ids1);
- })
- .then(() => {
- this.onLoad1(this.page1);
- this.$message({
- type: "success",
- message: "操作成功!",
- });
- this.$refs.crudrec1.toggleSelection();
- });
- },
- refreshChange1() {
- // console.log(4534)
- this.onLoad1(this.page1, this.query1);
- },
+ // sizeChange1(val) {
+ // this.page1.currentPage = 1;
+ // this.page1.pageSize = val;
+ // // this.getData();
+ // this.onLoad1(this.page1, this.query1);
+ // // this.$message.success("行数" + val);
+ // },
+ // currentChange1(val) {
+ // this.page1.currentPage = val;
+ // // this.getData();
+ // this.onLoad1(this.page1, this.query1);
+ // // this.$message.success("页码" + val);
+ // },
+ // rowSave1(form, done, loading) {
+ // var that = this;
+ // var form = this.data1[0];
+ // delete form.id;
+ // for (var k = 0; k < 13; k++) {
+ // adddata1(form).then(
+ // (res) => {
+ // this.onLoad1(this.page1);
+ // this.$message({
+ // type: "success",
+ // message: "操作成功!",
+ // });
+ // done();
+ // },
+ // (error) => {
+ // window.console.log(error);
+ // loading();
+ // }
+ // );
+ // }
+ // },
+ // searchChange1(params, done) {
+ // this.query1 = params;
+ // this.page1.currentPage = 1;
+ // this.onLoad1(this.page1, params);
+ // done();
+ // },
+ // searchReset1() {
+ // this.query = {};
+ // this.onLoad1(this.page1);
+ // },
+ // rowUpdate1(row, index, done, loading) {
+ // console.log(row);
+ // update1(row).then(
+ // () => {
+ // this.onLoad1(this.page1);
+ // this.$message({
+ // type: "success",
+ // message: "操作成功!",
+ // });
+ // done();
+ // },
+ // (error) => {
+ // window.console.log(error);
+ // loading();
+ // }
+ // );
+ // },
+ // rowDel1(row) {
+ // this.$confirm("确定将选择数据删除?", {
+ // confirmButtonText: "确定",
+ // cancelButtonText: "取消",
+ // type: "warning",
+ // })
+ // .then(() => {
+ // return remove1(row.id);
+ // })
+ // .then(() => {
+ // this.onLoad1(this.page1);
+ // this.$message({
+ // type: "success",
+ // message: "操作成功!",
+ // });
+ // });
+ // },
+ // selectionChange1(list) {
+ // this.selectionList1 = list;
+ // console.log(this.selectionList1.length);
+ // },
+ // handleDelete1() {
+ // console.log(this.selectionList1);
+ // if (this.selectionList1.length === 0) {
+ // this.$message.warning("请选择至少一条数据");
+ // return;
+ // }
+ // this.$confirm("确定将选择数据删除?", {
+ // confirmButtonText: "确定",
+ // cancelButtonText: "取消",
+ // type: "warning",
+ // })
+ // .then(() => {
+ // return remove1(this.ids1);
+ // })
+ // .then(() => {
+ // this.onLoad1(this.page1);
+ // this.$message({
+ // type: "success",
+ // message: "操作成功!",
+ // });
+ // this.$refs.crudrec1.toggleSelection();
+ // });
+ // },
+ // refreshChange1() {
+ // // console.log(4534)
+ // this.onLoad1(this.page1, this.query1);
+ // },
- //
- onLoad1(page, params = {}) {
- this.loading1 = true;
- // console.log(page);
- getdata1(
- page.currentPage,
- page.pageSize,
- Object.assign(params, this.query)
- ).then((res) => {
- // console.log(res);
- const data = res.data.data;
- this.page1.total = data.total;
- this.data1 = data.records;
- console.log(this.data1, 1);
- this.loading1 = false;
- });
- },
+ // //
+ // onLoad1(page, params = {}) {
+ // this.loading1 = true;
+ // // console.log(page);
+ // getdata1(
+ // page.currentPage,
+ // page.pageSize,
+ // Object.assign(params, this.query)
+ // ).then((res) => {
+ // // console.log(res);
+ // const data = res.data.data;
+ // this.page1.total = data.total;
+ // this.data1 = data.records;
+ // console.log(this.data1, 1);
+ // this.loading1 = false;
+ // });
+ // },
//派遣记录
},
mounted() {
diff --git a/src/views/dispatchChild/data.js b/src/views/dispatchChild/data.js
new file mode 100644
index 0000000..5a153d7
--- /dev/null
+++ b/src/views/dispatchChild/data.js
@@ -0,0 +1,261 @@
+// var DIC = [
+// {
+// label: '招聘中',
+// value: 1,
+// }, {
+// label: '停止招聘',
+// value: 2,
+// }
+// ]
+
+export var column = [
+ {
+ label: "",
+ labelWidth: 20,
+ type: 'title',
+ prop: "title",
+ span: 24,
+ styles: {
+ fontSize: '24px'
+ }
+ },
+ {
+ label: "派遣单位名称",
+ prop: "name",
+ span: 11,
+ labelWidth: 130,
+ disabled: true,
+ },
+ {
+ label: "保安公司",
+ prop: "tenantId",
+ span: 11,
+ labelWidth: 130,
+ disabled: true,
+ },
+ {
+ label: "联系人",
+ prop: "linkman",
+ span: 11,
+ labelWidth: 130,
+ disabled: true,
+ },
+ {
+ label: "联系电话",
+ prop: "phone",
+ span: 11,
+ labelWidth: 130,
+ disabled: true,
+ },
+ {
+ label: "详细地址",
+ prop: "address",
+ span: 11,
+ labelWidth: 130,
+ disabled: true,
+ },
+ {
+ label: "创建时间",
+ prop: "createTime",
+ span: 11,
+ labelWidth: 130,
+ disabled: true,
+ }
+
+
+]
+
+export var column1 = [//派遣服务公司登记
+ {
+ label: "id",
+ prop: "id",
+ // search: true,
+ // searchSpan: 4,
+ // overHidden: true,
+ hide: true,
+ editDisplay: false,
+ addDisplay: false
+ }, {
+ label: "保安人名称",
+ prop: "name",
+ // search: true,
+ // searchSpan: 4,
+ // overHidden: true
+ }, {
+ label: "身份证",
+ prop: "cardid",
+ // search: true,
+ // searchSpan: 4,
+ // overHidden: true
+ }, {
+ label: "派遣人",
+ prop: "dispatcher",
+ // search: true,
+ // searchSpan: 4,
+ // overHidden: true
+ }, {
+ label: "派遣时间",
+ prop: "dispatchertime",
+ // search: true,
+ // searchSpan: 4,
+ // overHidden: true
+ }, {
+ label: "派遣地址",
+ prop: "dispatcheraddress",
+ // search: true,
+ // searchSpan: 4,
+ // overHidden: true
+ }, {
+ label: "派遣单位",
+ prop: "dispatcherUnitId",
+ // search: true,
+ // searchSpan: 4,
+ // overHidden: true
+ },
+
+
+]
+
+
+export var data = [
+ {
+ "tenant_id": "xx保安公司", "name": "xx职务",
+ "number": "10",
+ "education": "大专以上",
+ "experience": "2年",
+ "max_salary": "8k",
+ "units_scale": "200人+",
+ "linkman": "XX",
+ "phone": "xxxxxxxxxx",
+ "address": "环城路地一大道30号口下",
+ "start_time": "7月8日",
+ "end_time": "7月31日",
+ "status": "2"
+ },
+ {
+ "tenant_id": "xx保安公司", "name": "xx职务",
+ "number": "10",
+ "education": "大专以上",
+ "experience": "2年",
+ "max_salary": "8k",
+ "units_scale": "200人+",
+ "linkman": "XX",
+ "phone": "xxxxxxxxxx",
+ "address": "环城路地一大道30号口下",
+ "start_time": "7月8日",
+ "end_time": "7月31日",
+ "status": "2"
+ },
+ {
+ "tenant_id": "xx保安公司", "name": "xx职务",
+ "number": "10",
+ "education": "大专以上",
+ "experience": "2年",
+ "max_salary": "8k",
+ "units_scale": "200人+",
+ "linkman": "XX",
+ "phone": "xxxxxxxxxx",
+ "address": "环城路地一大道30号口下",
+ "start_time": "7月8日",
+ "end_time": "7月31日",
+ "status": "2"
+ },
+ {
+ "tenant_id": "xx保安公司", "name": "xx职务",
+ "number": "10",
+ "education": "大专以上",
+ "experience": "3年",
+ "max_salary": "8k",
+ "units_scale": "200人+",
+ "linkman": "XX",
+ "phone": "xxxxxxxxxx",
+ "address": "环城路地一大道30号口下",
+ "start_time": "7月8日",
+ "end_time": "7月31日",
+ "status": "2"
+ },
+ {
+ "tenant_id": "xx保安公司", "name": "xx职务",
+ "number": "10",
+ "education": "大专以上",
+ "experience": "5年",
+ "max_salary": "8k",
+ "units_scale": "200人+",
+ "linkman": "XX",
+ "phone": "xxxxxxxxxx",
+ "address": "环城路地一大道30号口下",
+ "start_time": "7月8日",
+ "end_time": "7月31日",
+ "status": "2"
+ },
+ {
+ "tenant_id": "xx保安公司", "name": "xx职务",
+ "number": "10",
+ "education": "大专以上",
+ "experience": "2年",
+ "max_salary": "8k",
+ "units_scale": "200人+",
+ "linkman": "XX",
+ "phone": "xxxxxxxxxx",
+ "address": "环城路地一大道30号口下",
+ "start_time": "7月8日",
+ "end_time": "7月31日",
+ "status": "2"
+ },
+ {
+ "tenant_id": "xx保安公司", "name": "xx职务",
+ "number": "10",
+ "education": "大专以上",
+ "experience": "2年",
+ "max_salary": "8k",
+ "units_scale": "200人+",
+ "linkman": "XX",
+ "phone": "xxxxxxxxxx",
+ "address": "环城路地一大道30号口下",
+ "start_time": "7月8日",
+ "end_time": "7月31日",
+ "status": "2"
+ },
+ {
+ "tenant_id": "xx保安公司", "name": "xx职务",
+ "number": "10",
+ "education": "大专以上",
+ "experience": "2年",
+ "max_salary": "8k",
+ "units_scale": "200人+",
+ "linkman": "XX",
+ "phone": "xxxxxxxxxx",
+ "address": "环城路地一大道30号口下",
+ "start_time": "7月8日",
+ "end_time": "7月31日",
+ "status": "2"
+ },
+ {
+ "tenant_id": "xx保安公司", "name": "xx职务",
+ "number": "10",
+ "education": "大专以上",
+ "experience": "2年",
+ "max_salary": "8k",
+ "units_scale": "200人+",
+ "linkman": "XX",
+ "phone": "xxxxxxxxxx",
+ "address": "环城路地一大道30号口下",
+ "start_time": "7月8日",
+ "end_time": "7月31日",
+ "status": "2"
+ },
+ {
+ "tenant_id": "xx保安公司", "name": "xx职务",
+ "number": "10",
+ "education": "大专以上",
+ "experience": "2年",
+ "max_salary": "8k",
+ "units_scale": "200人+",
+ "linkman": "XX",
+ "phone": "xxxxxxxxxx",
+ "address": "环城路地一大道30号口下",
+ "start_time": "7月8日",
+ "end_time": "7月31日",
+ "status": "2"
+ }
+]
diff --git a/src/views/dispatchChild/index.vue b/src/views/dispatchChild/index.vue
new file mode 100644
index 0000000..dc58b98
--- /dev/null
+++ b/src/views/dispatchChild/index.vue
@@ -0,0 +1,481 @@
+<template>
+ <div class="dispatch">
+ <avue-tabs :option="optionTABS" @change="handleChangeTABS"></avue-tabs>
+ <span v-if="typeTABS.prop === 'tab1'">
+ <!-- <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"
+ >
+ <template slot="menuLeft">
+ <el-button
+ type="danger"
+ size="small"
+ plain
+ icon="el-icon-delete"
+ @click="handleDelete"
+ >删 除
+ </el-button>
+ </template>
+ </avue-crud> -->
+ <avue-form ref="form" v-model="obj0" :option="option0">
+ <!-- <template slot-scope="scope" slot="menuForm">
+ <el-button @click="tip">自定义按钮</el-button>
+ </template> -->
+ </avue-form>
+ </span>
+ <span v-else-if="typeTABS.prop === 'tab2'">
+ <avue-crud
+ :option="option1"
+ :data="data1"
+ :page.sync="page1"
+ ref="crudrec1"
+ :table-loading="loading1"
+ @row-save="rowSave1"
+ @search-change="searchChange1"
+ @search-reset="searchReset1"
+ @row-update="rowUpdate1"
+ @row-del="rowDel1"
+ @selection-change="selectionChange1"
+ @refresh-change="refreshChange1"
+ >
+ <template slot="menuLeft">
+ <el-button
+ type="danger"
+ size="small"
+ plain
+ icon="el-icon-delete"
+ @click="handleDelete1"
+ >删 除
+ </el-button>
+ </template>
+ </avue-crud>
+ </span>
+ <!-- <span v-else-if="typeTABS.prop === 'tab3'">选项卡内容3</span> -->
+ </div>
+</template>
+
+<script>
+import { column, column1 } from "./data";
+import {
+ // getdata,
+ // adddata,
+ // update,
+ // remove,
+ getdata1,
+ adddata1,
+ update1,
+ remove1,
+} from "@/api/dispatch/dispatch";
+
+export default {
+ data() {
+ return {
+ typeTABS: {}, //标签页
+ optionTABS: {
+ column: [
+ {
+ icon: "el-icon-info",
+ label: "派遣服务公司详情",
+ prop: "tab1",
+ },
+ {
+ icon: "el-icon-info",
+ label: "派遣记录",
+ prop: "tab2",
+ },
+ // {
+ // icon: "el-icon-info",
+ // label: "选项卡3",
+ // prop: "tab3",
+ // },
+ ],
+ },
+
+ cardid: "", //获取派遣记录参数
+ name: "", //获取派遣记录参数
+ dispatcherCompany: "", //获取派遣记录参数
+ id: "",
+ //基本信息
+ //保安单位信息表单
+ obj0: {
+ title: "我是头部标题",
+ },
+ option0: {
+ emptyBtn: false,
+ submitBtn: false,
+ gutter: 30,
+ column: column,
+ },
+ // loading: true, //派遣服务公司登记
+ // selectionList: [],
+ // page: {
+ // pageSize: 10,
+ // currentPage: 1,
+ // total: 0,
+ // },
+ // query: {},
+ // data: [],
+ // option: {
+ // card: true,
+ // searchSize: "mini",
+ // searchMenuSpan: 6,
+ // height: 547,
+ // menuWidth: 160,
+ // align: "center",
+ // selection: true,
+ // column: column,
+ // },
+
+ loading1: true, //派遣记录
+ selectionList1: [],
+ page1: {
+ pageSize: 10,
+ currentPage: 1,
+ total: 0,
+ },
+ query1: {},
+ data1: [],
+ option1: {
+ card: true,
+ searchSize: "mini",
+ searchMenuSpan: 6,
+ height: 547,
+ menuWidth: 160,
+ align: "center",
+ selection: true,
+ column: column1,
+ },
+ };
+ },
+ computed: {
+ // ids() {
+ // let ids = [];
+ // this.selectionList.forEach((ele) => {
+ // ids.push(ele.id);
+ // });
+ // return ids.join(",");
+ // },
+ ids1() {
+ let ids1 = [];
+ this.selectionList1.forEach((ele) => {
+ ids1.push(ele.id);
+ });
+ return ids1.join(",");
+ },
+ },
+ methods: {
+ handleChangeTABS(column) {
+ this.typeTABS = column;
+ if (column.prop == "tab1") {
+ this.loading1 = false;
+ // this.onLoad(this.page);
+ } else if (column.prop == "tab2") {
+ // this.loading = false;
+ this.onLoad1(this.page1); //第二个表格不会自动执行
+ }
+ // this.$message.success(JSON.stringify(column));
+ },
+ //派遣服务公司登记
+ // 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) {
+ // var that = this;
+ // var form = this.data[0];
+ // delete form.id;
+ // for (var k = 0; k < 13; k++) {
+ // adddata(form).then(
+ // (res) => {
+ // this.onLoad(this.page);
+ // this.$message({
+ // type: "success",
+ // message: "操作成功!",
+ // });
+ // done();
+ // },
+ // (error) => {
+ // window.console.log(error);
+ // loading();
+ // }
+ // );
+ // }
+ // },
+ // 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) {
+ // console.log(row);
+ // 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(() => {
+ // return remove(row.id);
+ // })
+ // .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(() => {
+ // 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);
+ // },
+ // onLoad(page, params = {}) {
+ // this.loading = true;
+ // getdata(
+ // page.currentPage,
+ // page.pageSize,
+ // Object.assign(params, this.query)
+ // ).then((res) => {
+ // // console.log(res);
+ // const data = res.data.data;
+ // this.page.total = data.total;
+ // this.data = data.records;
+ // console.log(this.data);
+ // this.loading = false;
+ // });
+ // },
+ //派遣服务公司登记
+
+ //派遣记录
+ sizeChange1(val) {
+ this.page1.currentPage = 1;
+ this.page1.pageSize = val;
+ // this.getData();
+ this.onLoad1(this.page1, this.query1);
+ // this.$message.success("行数" + val);
+ },
+ currentChange1(val) {
+ this.page1.currentPage = val;
+ // this.getData();
+ this.onLoad1(this.page1, this.query1);
+ // this.$message.success("页码" + val);
+ },
+ rowSave1(form, done, loading) {
+ var that = this;
+ var form = this.data1[0];
+ delete form.id;
+ for (var k = 0; k < 13; k++) {
+ adddata1(form).then(
+ (res) => {
+ this.onLoad1(this.page1);
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ });
+ done();
+ },
+ (error) => {
+ window.console.log(error);
+ loading();
+ }
+ );
+ }
+ },
+ searchChange1(params, done) {
+ this.query1 = params;
+ this.page1.currentPage = 1;
+ this.onLoad1(this.page1, params);
+ done();
+ },
+ searchReset1() {
+ this.query = {};
+ this.onLoad1(this.page1);
+ },
+ rowUpdate1(row, index, done, loading) {
+ console.log(row);
+ update1(row).then(
+ () => {
+ this.onLoad1(this.page1);
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ });
+ done();
+ },
+ (error) => {
+ window.console.log(error);
+ loading();
+ }
+ );
+ },
+ rowDel1(row) {
+ this.$confirm("确定将选择数据删除?", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning",
+ })
+ .then(() => {
+ return remove1(row.id);
+ })
+ .then(() => {
+ this.onLoad1(this.page1);
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ });
+ });
+ },
+ selectionChange1(list) {
+ this.selectionList1 = list;
+ console.log(this.selectionList1.length);
+ },
+ handleDelete1() {
+ console.log(this.selectionList1);
+ if (this.selectionList1.length === 0) {
+ this.$message.warning("请选择至少一条数据");
+ return;
+ }
+ this.$confirm("确定将选择数据删除?", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning",
+ })
+ .then(() => {
+ return remove1(this.ids1);
+ })
+ .then(() => {
+ this.onLoad1(this.page1);
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ });
+ this.$refs.crudrec1.toggleSelection();
+ });
+ },
+ refreshChange1() {
+ // console.log(4534)
+ this.onLoad1(this.page1, this.query1);
+ },
+
+ //
+ onLoad1(page, params = {}) {
+ this.loading1 = true;
+ // params["cardid"] = this.cardid;
+ // params["name"] = this.name;
+ // params["dispatcherCompany"] = this.dispatcherCompany;
+ params["dispatcherUnitId"] = this.id;
+ console.log(params, "get");
+ getdata1(
+ page.currentPage,
+ page.pageSize,
+ Object.assign(params, this.query)
+ ).then((res) => {
+ // console.log(res);
+ const data = res.data.data;
+ this.page1.total = data.total;
+ this.data1 = data.records;
+ console.log(this.data1, 1);
+ this.loading1 = false;
+ });
+ },
+ //派遣记录
+ },
+ mounted() {
+ this.typeTABS = this.optionTABS.column[0];
+
+ if (this.$route.query.row) {
+ var row = this.$route.query.row;
+ for (var k in row) {
+ this.obj0[k] = row[k];
+ }
+ this.obj0.title = row.name + "基本信息";
+ console.log(row);
+ this.cardid = row.cardid;
+ this.name = row.name;
+ this.dispatcherCompany = row.dispatcherCompany;
+ this.id = row.id;
+ }
+ },
+};
+</script>
+
+<style lang="scss">
+.dispatch {
+ 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;
+}
+</style>
\ No newline at end of file
diff --git a/src/views/securityUnit/data.js b/src/views/securityUnit/data.js
index a13f16b..dd11928 100644
--- a/src/views/securityUnit/data.js
+++ b/src/views/securityUnit/data.js
@@ -19,6 +19,7 @@
{
label: "统一社会信用代码",
prop: "creditcode",
+ width: 140
// hide: true,
// editDisplay: false,
// addDisplay: false
@@ -33,13 +34,16 @@
{
label: "企业名称",
prop: "enterprisename",
- // search: true,
+ search: true,
+ width: 130,
},
{
label: "法定代表人",
prop: "representative",
- // width: 70,
- // search: true,
+ width: 80,
+ search: true,
+ searchSpan: 5,
+ searchLabelWidth: 100
},
// {
// label: "登记状态",
@@ -64,6 +68,8 @@
{
label: "成立日期",
prop: "establishtime",
+ width: 130,
+ overHidden: true,
// addDisplay: true,
// editDisplay: true,
// viewDisplay: true,
@@ -82,15 +88,16 @@
// // }],
},
{
- label: "注册资本",
+ label: "注册资本(万元人民币)",
prop: "registeredcapital",
// search: true,
- // width: 110,
+ width: 110,
// overHidden: true
},
{
- label: "实缴资本",
+ label: "实缴资本(万元人民币)",
prop: "capital",
+ width: 85,
// search: true,
// searchSpan: 4,
// overHidden: true
@@ -98,6 +105,7 @@
{
label: "组织机构代码",
prop: "organizationcode",
+ width: 110,
// search: true,
// searchSpan: 4,
},
@@ -130,6 +138,7 @@
{
label: "企业类型",
prop: "enterprises",
+ width: 130,
// addDisplay: true,
// editDisplay: true,
// viewDisplay: true,
@@ -196,207 +205,220 @@
// },
]
-export var column1 = [
+var w = 160
+ , s = 12;
+export var column0 = [
{
- label: "id",
- prop: "id",
- },{
- label: "股东",
- prop: "shareholder",
- },{
- label: "持股比例",
- prop: "shareholdingratio",
- },{
- label: "最终受益股份",
- prop: "beneficial",
- },{
- label: "出资金额",
- prop: "capital",
- },{
- label: "出资时间",
- prop: "capitaltime",
- },{
- label: "身份证",
- prop: "cardid",
- },{
- label: "联系电话",
- prop: "cell",
- },{
+ label: "",
+ labelWidth: 20,
+ type: 'title',
+ prop: "title",
+ span: 24,
+ styles: {
+ fontSize: '24px'
+ }
+ },
+ {
label: "统一社会信用代码",
prop: "creditcode",
+ labelWidth: w,
+ span: s,
+ rules: [{
+ required: true,
+ message: "请输入社会信用代码",
+ trigger: "blur"
+ }]
+ },
+ {
+ label: "企业名称",
+ prop: "enterprisename",
+ labelWidth: w,
+ span: s
+ },
+ {
+ label: "法定代表人",
+ prop: "representative",
+ labelWidth: w,
+ span: s
+ },
+ {
+ label: "成立日期",
+ prop: "establishtime",
+ labelWidth: w,
+ span: s
+ },
+ {
+ label: "注册资本(万元人民币)",
+ prop: "registeredcapital",
+ labelWidth: w,
+ span: s
+ },
+ {
+ label: "实缴资本(万元人民币)",
+ prop: "capital",
+ labelWidth: w,
+ span: s
+ },
+ {
+ label: "组织机构代码",
+ prop: "organizationcode",
+ labelWidth: w,
+ span: s
+ },
+ {
+ label: "工商注册号",
+ prop: "registrationnumber",
+ labelWidth: w,
+ span: s
+ },
+ {
+ label: "纳税人识别号",
+ prop: "identificationnumber",
+ labelWidth: w,
+ span: s
+ },
+ {
+ label: "企业类型",
+ prop: "enterprises",
+ labelWidth: w,
+ span: s
+ },
+ {
+ label: "注册地址",
+ prop: "address",
+ labelWidth: w,
+ span: s
+ },
+ {
+ label: "经营范围",
+ prop: "business",
+ labelWidth: w,
+ span: s
+ },
+ {
+ label: "所属地区",
+ prop: "region",
+ labelWidth: w,
+ span: s
+ },
+ {
+ label: "登记机关",
+ prop: "registration",
+ labelWidth: w,
+ span: s
+ },
+
+ {
+ label: "所属行业",
+ prop: "industry",
+ labelWidth: w,
+ span: s
+ }
+]
+
+export var column1 = [
+ {
+ label: "",
+ labelWidth: 20,
+ type: 'title',
+ prop: "title",
+ span: 24,
+ styles: {
+ fontSize: '24px'
+ }
+ },
+ {
+ label: "统一社会信用代码",
+ prop: "creditcode",
+ disabled: true,
+ labelWidth: w,
+ span: s
+ },
+ {
+ label: "股东",
+ prop: "shareholder",
+ labelWidth: w,
+ span: s
+ }, {
+ label: "持股比例(%)",
+ prop: "shareholdingratio",
+ labelWidth: w,
+ span: s
+ },
+ // {
+ // label: "最终受益股份",
+ // prop: "beneficial",
+ // labelWidth: w,
+ // span: s
+ // },
+ {
+ label: "出资金额",
+ prop: "capital",
+ labelWidth: w,
+ span: s
+ }, {
+ label: "出资时间",
+ prop: "capitaltime",
+ type: "date",
+ format: "yyyy-MM-dd hh:mm:ss",
+ valueFormat: "timestamp",
+ labelWidth: w,
+ span: s
+ }, {
+ label: "身份证",
+ prop: "cardid",
+ labelWidth: w,
+ span: s
+ }, {
+ label: "联系电话",
+ prop: "cell",
+ labelWidth: w,
+ span: s
},
]
export var column2 = [
{
- label: "id",
- prop: "id",
- },{
- label: "股东",
- prop: "shareholder",
- },{
- label: "持股比例",
- prop: "shareholdingRatio",
- },{
- label: "最终受益股份",
- prop: "beneficial",
- },{
- label: "出资金额",
- prop: "capital",
- },{
- label: "出资时间",
- prop: "capitalTime",
- },{
+ label: "",
+ labelWidth: 20,
+ type: 'title',
+ prop: "title",
+ span: 24,
+ styles: {
+ fontSize: '24px'
+ }
+ },
+ {
+ label: "统一社会信用代码",
+ prop: "creditcode",
+ disabled: true,
+ labelWidth: w,
+ span: s
+ },
+ {
+ label: "姓名",
+ prop: "name",
+ labelWidth: w,
+ span: s
+ }, {
+ label: "职务",
+ prop: "post",
+ labelWidth: w,
+ span: s
+ }, {
label: "身份证",
prop: "cardid",
- },{
+ labelWidth: w,
+ span: s
+ }, {
label: "联系电话",
prop: "cell",
- },{
- label: "统一社会信用代码",
- prop: "creditCode",
- },
-]
-
-export var data = [
- {
- "tenant_id": "xx保安公司", "name": "xx职务",
- "number": "10",
- "education": "大专以上",
- "experience": "2年",
- "max_salary": "8k",
- "units_scale": "200人+",
- "linkman": "XX",
- "phone": "xxxxxxxxxx",
- "address": "环城路地一大道30号口下",
- "start_time": "7月8日",
- "end_time": "7月31日",
- "status": "2"
- },
- {
- "tenant_id": "xx保安公司", "name": "xx职务",
- "number": "10",
- "education": "大专以上",
- "experience": "2年",
- "max_salary": "8k",
- "units_scale": "200人+",
- "linkman": "XX",
- "phone": "xxxxxxxxxx",
- "address": "环城路地一大道30号口下",
- "start_time": "7月8日",
- "end_time": "7月31日",
- "status": "2"
- },
- {
- "tenant_id": "xx保安公司", "name": "xx职务",
- "number": "10",
- "education": "大专以上",
- "experience": "2年",
- "max_salary": "8k",
- "units_scale": "200人+",
- "linkman": "XX",
- "phone": "xxxxxxxxxx",
- "address": "环城路地一大道30号口下",
- "start_time": "7月8日",
- "end_time": "7月31日",
- "status": "2"
- },
- {
- "tenant_id": "xx保安公司", "name": "xx职务",
- "number": "10",
- "education": "大专以上",
- "experience": "3年",
- "max_salary": "8k",
- "units_scale": "200人+",
- "linkman": "XX",
- "phone": "xxxxxxxxxx",
- "address": "环城路地一大道30号口下",
- "start_time": "7月8日",
- "end_time": "7月31日",
- "status": "2"
- },
- {
- "tenant_id": "xx保安公司", "name": "xx职务",
- "number": "10",
- "education": "大专以上",
- "experience": "5年",
- "max_salary": "8k",
- "units_scale": "200人+",
- "linkman": "XX",
- "phone": "xxxxxxxxxx",
- "address": "环城路地一大道30号口下",
- "start_time": "7月8日",
- "end_time": "7月31日",
- "status": "2"
- },
- {
- "tenant_id": "xx保安公司", "name": "xx职务",
- "number": "10",
- "education": "大专以上",
- "experience": "2年",
- "max_salary": "8k",
- "units_scale": "200人+",
- "linkman": "XX",
- "phone": "xxxxxxxxxx",
- "address": "环城路地一大道30号口下",
- "start_time": "7月8日",
- "end_time": "7月31日",
- "status": "2"
- },
- {
- "tenant_id": "xx保安公司", "name": "xx职务",
- "number": "10",
- "education": "大专以上",
- "experience": "2年",
- "max_salary": "8k",
- "units_scale": "200人+",
- "linkman": "XX",
- "phone": "xxxxxxxxxx",
- "address": "环城路地一大道30号口下",
- "start_time": "7月8日",
- "end_time": "7月31日",
- "status": "2"
- },
- {
- "tenant_id": "xx保安公司", "name": "xx职务",
- "number": "10",
- "education": "大专以上",
- "experience": "2年",
- "max_salary": "8k",
- "units_scale": "200人+",
- "linkman": "XX",
- "phone": "xxxxxxxxxx",
- "address": "环城路地一大道30号口下",
- "start_time": "7月8日",
- "end_time": "7月31日",
- "status": "2"
- },
- {
- "tenant_id": "xx保安公司", "name": "xx职务",
- "number": "10",
- "education": "大专以上",
- "experience": "2年",
- "max_salary": "8k",
- "units_scale": "200人+",
- "linkman": "XX",
- "phone": "xxxxxxxxxx",
- "address": "环城路地一大道30号口下",
- "start_time": "7月8日",
- "end_time": "7月31日",
- "status": "2"
- },
- {
- "tenant_id": "xx保安公司", "name": "xx职务",
- "number": "10",
- "education": "大专以上",
- "experience": "2年",
- "max_salary": "8k",
- "units_scale": "200人+",
- "linkman": "XX",
- "phone": "xxxxxxxxxx",
- "address": "环城路地一大道30号口下",
- "start_time": "7月8日",
- "end_time": "7月31日",
- "status": "2"
+ labelWidth: w,
+ span: s
+ }, {
+ label: "持股比例(%)",
+ prop: "shareholdingRatio",
+ labelWidth: w,
+ span: s
}
]
diff --git a/src/views/securityUnit/index.vue b/src/views/securityUnit/index.vue
index fa5efb1..4f2e0fc 100644
--- a/src/views/securityUnit/index.vue
+++ b/src/views/securityUnit/index.vue
@@ -1,134 +1,98 @@
<template>
- <div class="dispatch">
- <avue-tabs :option="optionTABS" @change="handleChangeTABS"></avue-tabs>
- <span v-if="typeTABS.prop === 'tab1'">
- <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"
- >
- <template slot="menuLeft">
- <el-button
- type="danger"
- size="small"
- plain
- icon="el-icon-delete"
- @click="handleDelete"
- >删 除
- </el-button>
- </template>
- </avue-crud>
- </span>
- <span v-else-if="typeTABS.prop === 'tab2'">
- <avue-crud
- :option="option1"
- :data="data1"
- :page.sync="page1"
- ref="crudrec1"
- @on-load="onLoad1"
- :table-loading="loading1"
- @row-save="rowSave1"
- @search-change="searchChange1"
- @search-reset="searchReset1"
- @row-update="rowUpdate1"
- @row-del="rowDel1"
- @selection-change="selectionChange1"
- @refresh-change="refreshChange1"
- >
- <template slot="menuLeft">
- <el-button
- type="danger"
- size="small"
- plain
- icon="el-icon-delete"
- @click="handleDelete1"
- >删 除
- </el-button>
- </template>
- </avue-crud>
- </span>
- <span v-else-if="typeTABS.prop === 'tab3'">
- <avue-crud
- :option="option2"
- :data="data2"
- :page.sync="page2"
- ref="crudrec2"
- @on-load="onLoad2"
- :table-loading="loading2"
- @row-save="rowSave2"
- @search-change="searchChange2"
- @search-reset="searchReset2"
- @row-update="rowUpdate2"
- @row-del="rowDel2"
- @selection-change="selectionChange2"
- @refresh-change="refreshChange2"
- >
- <template slot="menuLeft">
- <el-button
- type="danger"
- size="small"
- plain
- icon="el-icon-delete"
- @click="handleDelete2"
- >删 除
- </el-button>
- </template>
- </avue-crud>
- </span>
+ <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="menuLeft">
+ <el-button
+ type="primary"
+ icon="el-icon-plus"
+ size="small"
+ plain
+ @click.stop="rowSave"
+ >新增</el-button
+ >
+ </template>
+ <template slot="menuLeft">
+ <el-button
+ type="danger"
+ size="small"
+ plain
+ icon="el-icon-delete"
+ @click="handleDelete"
+ >删 除
+ </el-button>
+ </template>
+ </avue-crud>
+ <div class="lod" v-show="forms != -1">
+ <div class="lod-in">
+ <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="form"
+ 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="form"
+ 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>
</template>
<script>
-import { data, column, column1, column2 } from "./data";
+import { column, column0, column1, column2 } from "./data";
import {
getdata,
adddata,
update,
remove,
- getdata1,
adddata1,
- update1,
- remove1,
- getdata2,
adddata2,
- update2,
- remove2,
} from "@/api/securityUnit/securityUnit";
export default {
data() {
return {
- typeTABS: {}, //标签页
- optionTABS: {
- column: [
- {
- icon: "el-icon-info",
- label: "保安单位基本信息",
- prop: "tab1",
- },
- {
- icon: "el-icon-info",
- label: "保安单位出资人员登记",
- prop: "tab2",
- },
- {
- icon: "el-icon-info",
- label: "主要管理人员信息采集",
- prop: "tab3",
- },
- ],
- },
-
loading: true, //保安单位基本信息
selectionList: [],
page: {
@@ -136,9 +100,44 @@
currentPage: 1,
total: 0,
},
+
+ obj0: {
+ title: "保安单位基本信息",
+ },
+ option0: {
+ emptyBtn: false,
+ submitBtn: false,
+ gutter: 30,
+ column: column0,
+ },
+ obj1: {
+ title: "保安单位出资人员",
+ },
+ option1: {
+ emptyBtn: false,
+ submitBtn: false,
+ gutter: 30,
+ column: column1,
+ },
+ obj2: {
+ title: "主要管理人员信息",
+ },
+ option2: {
+ emptyBtn: false,
+ submitBtn: false,
+ gutter: 30,
+ column: column2,
+ },
+
+ forms: -1,
+ data0: {},
+ data1: {},
+ data2: {},
+
query: {},
data: [],
option: {
+ addBtn: false,
card: true,
searchSize: "mini",
searchMenuSpan: 6,
@@ -147,46 +146,6 @@
align: "center",
selection: true,
column: column,
- },
-
- loading1: true, //派遣记录
- selectionList1: [],
- page1: {
- pageSize: 10,
- currentPage: 1,
- total: 0,
- },
- query1: {},
- data1: [],
- option1: {
- card: true,
- searchSize: "mini",
- searchMenuSpan: 6,
- height: 547,
- menuWidth: 160,
- align: "center",
- selection: true,
- column: column1,
- },
-
- loading2: true, //派遣记录
- selectionList2: [],
- page2: {
- pageSize: 10,
- currentPage: 1,
- total: 0,
- },
- query2: {},
- data2: [],
- option2: {
- card: true,
- searchSize: "mini",
- searchMenuSpan: 6,
- height: 547,
- menuWidth: 160,
- align: "center",
- selection: true,
- column: column2,
},
};
},
@@ -212,25 +171,28 @@
});
return ids2.join(",");
},
+ haveID() {
+ return this.obj0.creditcode;
+ },
},
methods: {
- 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); //第二个表格不会自动执行
- }
- },
+ // 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;
@@ -246,25 +208,8 @@
// this.$message.success("页码" + val);
},
rowSave(form, done, loading) {
- var that = this;
- // var form = this.data[0];
- // delete form.id;
- // for (var k = 0; k < 13; k++) {
- adddata(form).then(
- (res) => {
- this.onLoad(this.page);
- this.$message({
- type: "success",
- message: "操作成功!",
- });
- done();
- },
- (error) => {
- window.console.log(error);
- loading();
- }
- );
- // }
+ console.log("save1");
+ this.forms = 0;
},
searchChange(params, done) {
this.query = params;
@@ -278,6 +223,7 @@
},
rowUpdate(row, index, done, loading) {
delete row.tenantid;
+ delete row.regstsat;
console.log(row, 0);
update(row).then(
() => {
@@ -301,7 +247,8 @@
type: "warning",
})
.then(() => {
- return remove(row.id);
+ console.log(row);
+ return remove(row.creditcode);
})
.then(() => {
this.onLoad(this.page);
@@ -339,6 +286,16 @@
refreshChange() {
this.onLoad(this.page, this.query);
},
+ rowClick(row) {
+ console.log(row);
+ row.identificationnumber; //统一社会信用代码
+ this.$router.push({
+ path: "/securityUnitChild",
+ // redirect: { name: "foo" },
+ query: { row: row },
+ // params: { row: row.identificationnumber },
+ });
+ },
onLoad(page, params = {}) {
this.loading = true;
getdata(
@@ -354,275 +311,80 @@
this.loading = false;
});
},
- //保安单位基本信息
-
- //派遣记录
- sizeChange1(val) {
- this.page1.currentPage = 1;
- this.page1.pageSize = val;
- // this.getData();
- this.onLoad1(this.page1, this.query1);
- // this.$message.success("行数" + val);
- },
- currentChange1(val) {
- this.page1.currentPage = val;
- // this.getData();
- this.onLoad1(this.page1, this.query1);
- // this.$message.success("页码" + val);
- },
- rowSave1(form, done, loading) {
- var that = this;
- // var form = this.data[0];
- // delete form.id;
- // for (var k = 0; k < 13; k++) {
- adddata1(form).then(
- (res) => {
- this.onLoad1(this.page1);
- this.$message({
- type: "success",
- message: "操作成功!",
- });
- done();
- },
- (error) => {
- window.console.log(error);
- loading();
+ tip0() {
+ var b = {};
+ for (var k in this.obj0) {
+ if (k != "title") {
+ b[k] = this.obj0[k];
}
- );
- // }
- },
- searchChange1(params, done) {
- this.query1 = params;
- this.page1.currentPage = 1;
- this.onLoad1(this.page1, params);
- done();
- },
- searchReset1() {
- this.query = {};
- this.onLoad1(this.page1);
- },
- rowUpdate1(row, index, done, loading) {
- delete row.shareholdingratio;
- delete row.tenantId;
- console.log(row);
- update1(row).then(
- () => {
- this.onLoad1(this.page1);
- this.$message({
- type: "success",
- message: "操作成功!",
- });
- done();
- },
- (error) => {
- window.console.log(error);
- loading();
- }
- );
- },
- rowDel1(row) {
- this.$confirm("确定将选择数据删除?", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning",
- })
- .then(() => {
- return remove1(row.id);
- })
- .then(() => {
- this.onLoad1(this.page1);
- this.$message({
- type: "success",
- message: "操作成功!",
- });
- });
- },
- selectionChange1(list) {
- this.selectionList1 = list;
- },
- handleDelete1() {
- if (this.selectionList1.length === 0) {
- this.$message.warning("请选择至少一条数据");
- return;
}
- this.$confirm("确定将选择数据删除?", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning",
- })
- .then(() => {
- return remove1(this.ids1);
- })
- .then(() => {
- this.onLoad1(this.page1);
- this.$message({
- type: "success",
- message: "操作成功!",
- });
- this.$refs.crudrec1.toggleSelection();
- });
+ this.data0 = b;
+ this.forms = 1;
},
- refreshChange1() {
- this.onLoad1(this.page1, this.query1);
- },
-
- //
- onLoad1(page, params = {}) {
- this.loading1 = true;
- // console.log(page);
- getdata1(
- page.currentPage,
- page.pageSize,
- Object.assign(params, this.query)
- ).then((res) => {
- // console.log(res);
- const data = res.data.data;
- this.page1.total = data.total;
- this.data1 = data.records;
- console.log(this.data1);
- this.loading1 = false;
- });
- },
- //派遣记录
-
- //派遣记录
- sizeChange2(val) {
- this.page2.currentPage = 1;
- this.page2.pageSize = val;
- // this.getData();
- this.onLoad2(this.page2, this.query2);
- // this.$message.success("行数" + val);
- },
- currentChange2(val) {
- this.page2.currentPage = val;
- // this.getData();
- this.onLoad2(this.page2, this.query2);
- // this.$message.success("页码" + val);
- },
- rowSave2(form, done, loading) {
- var that = this;
- // var form = this.data[0];
- // delete form.id;
- // for (var k = 0; k < 13; k++) {
- adddata2(form).then(
- (res) => {
- this.onLoad2(this.page1);
- this.$message({
- type: "success",
- message: "操作成功!",
- });
- done();
- },
- (error) => {
- window.console.log(error);
- loading();
+ tip1() {
+ var b = {};
+ for (var k in this.obj1) {
+ if (k != "title") {
+ b[k] = this.obj1[k];
}
- );
- // }
- },
- searchChange2(params, done) {
- this.query2 = params;
- this.page2.currentPage = 1;
- this.onLoad2(this.page2, params);
- done();
- },
- searchReset2() {
- this.query = {};
- this.onLoad2(this.page2);
- },
- rowUpdate2(row, index, done, loading) {
- console.log(row);
- update2(row).then(
- () => {
- this.onLoad2(this.page2);
- this.$message({
- type: "success",
- message: "操作成功!",
- });
- done();
- },
- (error) => {
- window.console.log(error);
- loading();
- }
- );
- },
- rowDel2(row) {
- this.$confirm("确定将选择数据删除?", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning",
- })
- .then(() => {
- return remove2(row.id);
- })
- .then(() => {
- this.onLoad2(this.page1);
- this.$message({
- type: "success",
- message: "操作成功!",
- });
- });
- },
- selectionChange2(list) {
- this.selectionList2 = list;
- },
- handleDelete2() {
- if (this.selectionList2.length === 0) {
- this.$message.warning("请选择至少一条数据");
- return;
}
- this.$confirm("确定将选择数据删除?", {
- confirmButtonText: "确定",
- cancelButtonText: "取消",
- type: "warning",
- })
- .then(() => {
- return remove2(this.ids2);
- })
- .then(() => {
- this.onLoad2(this.page2);
- this.$message({
- type: "success",
- message: "操作成功!",
- });
- this.$refs.crudrec2.toggleSelection();
- });
+ this.data1 = b;
+ this.forms = 2;
},
- refreshChange2() {
- this.onLoad2(this.page2, this.query2);
- },
-
- //
- onLoad2(page, params = {}) {
- this.loading2 = true;
- console.log(page);
- getdata2(
- page.currentPage,
- page.pageSize,
- Object.assign(params, this.query)
- ).then((res) => {
- // console.log(res);
- const data = res.data.data;
- this.page2.total = data.total;
- this.data2 = data.records;
- console.log(this.data2);
- this.loading2 = false;
+ tip2() {
+ var b = {};
+ for (var k in this.obj2) {
+ if (k != "title") {
+ b[k] = this.obj2[k];
+ }
+ }
+ this.data2 = b;
+ 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);
+ });
+ this.onLoad(this.page, this.query);
+ console.log(this.data0, this.data1, this.data2);
+ this.tipover();
},
- //派遣记录
+ tip1up1() {
+ this.forms = 0;
+ },
+ tip1up2() {
+ this.forms = 1;
+ },
+ tipover() {
+ this.forms = -1;
+ this.obj0 = {
+ title: "保安单位基本信息",
+ };
+ this.obj0 = {
+ title: "保安单位出资人员",
+ };
+ this.obj2 = {
+ title: "主要管理人员信息",
+ };
+ this.data0 = {};
+ this.data1 = {};
+ this.data2 = {};
+ },
},
- mounted() {
- // this.Ourdata = data;
- // this.onLoad1(this.page1); //第二个表格不会自动执行
- // this.onLoad2(this.page2); //第三个表格不会自动执行
- this.typeTABS = this.optionTABS.column[0];
+ watch: {
+ haveID() {
+ // console.log(this.haveID);
+ },
},
+ mounted() {},
};
</script>
<style lang="scss">
-.dispatch {
+.securityUnit {
width: 100%;
height: 100%;
// border: 1px solid #000;
@@ -636,4 +398,23 @@
.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: 10000 !important;
+ display: flex;
+ // align-items: center;
+ justify-content: center;
+ .lod-in {
+ width: 80%;
+ height: auto;
+ // padding: 10px 0 0 0;
+ }
+}
</style>
\ No newline at end of file
diff --git a/src/views/securityUnitChild/data.js b/src/views/securityUnitChild/data.js
new file mode 100644
index 0000000..3b90fc1
--- /dev/null
+++ b/src/views/securityUnitChild/data.js
@@ -0,0 +1,202 @@
+var DIC = [
+ {
+ label: '招聘中',
+ value: 1,
+ }, {
+ label: '停止招聘',
+ value: 2,
+ }
+]
+
+export var column = [
+ {
+ label: "",
+ labelWidth: 20,
+ type: 'title',
+ prop: "title",
+ span: 24,
+ styles: {
+ fontSize: '24px'
+ }
+ },
+ {
+ label: "统一社会信用代码",
+ prop: "creditcode",
+ span: 11,
+ labelWidth: 130,
+ disabled: true,
+ },
+ {
+ label: "企业名称",
+ prop: "enterprisename",
+ span: 11,
+ labelWidth: 130,
+ disabled: true,
+ },
+ {
+ label: "法定代表人",
+ prop: "representative",
+ span: 11,
+ labelWidth: 130,
+ disabled: true,
+ },
+ {
+ label: "成立日期",
+ prop: "establishtime",
+ span: 11,
+ labelWidth: 130,
+ disabled: true,
+ },
+ {
+ label: "注册资本",
+ prop: "registeredcapital",
+ span: 11,
+ labelWidth: 130,
+ disabled: true,
+ },
+ {
+ label: "实缴资本",
+ prop: "capital",
+ span: 11,
+ labelWidth: 130,
+ disabled: true,
+ },
+ {
+ label: "组织机构代码",
+ prop: "organizationcode",
+ span: 11,
+ labelWidth: 130,
+ disabled: true,
+ },
+ {
+ label: "工商注册号",
+ prop: "registrationnumber",
+ span: 11,
+ labelWidth: 130,
+ disabled: true,
+ },
+ {
+ label: "纳税人识别号",
+ prop: "identificationnumber",
+ span: 11,
+ labelWidth: 130,
+ disabled: true,
+ },
+ {
+ label: "企业类型",
+ prop: "enterprises",
+ span: 11,
+ labelWidth: 130,
+ disabled: true,
+ },
+ {
+ label: "注册地址",
+ prop: "address",
+ span: 11,
+ labelWidth: 130,
+ disabled: true,
+ // search: true,
+ },
+ {
+ label: "经营范围",
+ prop: "business",
+ span: 11,
+ labelWidth: 130,
+ width: 110,
+ overHidden: true,
+ disabled: true,
+ },
+ {
+ label: "所属地区",
+ prop: "region",
+ span: 11,
+ labelWidth: 130,
+ width: 110,
+ overHidden: true,
+ disabled: true,
+ },
+ {
+ label: "登记机关",
+ prop: "registration",
+ span: 11,
+ labelWidth: 130,
+ disabled: true,
+ },
+
+ {
+ label: "所属行业",
+ prop: "industry",
+ span: 11,
+ labelWidth: 130,
+ disabled: true,
+ }
+]
+
+export var column1 = [
+ {
+ label: "id",
+ prop: "id",
+ hide: true,
+ addDisplay: false,
+ editDisplay:false
+ }, {
+ label: "股东",
+ prop: "shareholder",
+ }, {
+ label: "持股比例(%)",
+ prop: "shareholdingratio",
+ }, {
+ label: "最终受益股份",
+ prop: "beneficial",
+ }, {
+ label: "出资金额(万元)",
+ prop: "capital",
+ }, {
+ label: "出资时间",
+ prop: "capitaltime",
+ type: "date",
+ format: "yyyy-MM-dd hh:mm:ss",
+ valueFormat: "timestamp",
+ }, {
+ label: "身份证",
+ prop: "cardid",
+ }, {
+ label: "联系电话",
+ prop: "cell",
+ }, {
+ label: "统一社会信用代码",
+ prop: "creditcode",
+ addDisplay: false,
+ editDisplay:false
+ },
+]
+
+export var column2 = [
+ {
+ label: "统一社会信用代码",
+ prop: "creditcode",
+ addDisplay: false,
+ editDisplay:false
+ }, {
+ label: "id",
+ prop: "id",
+ hide: true,
+ addDisplay: false,
+ editDisplay:false
+ }, {
+ label: "姓名",
+ prop: "name",
+ }, {
+ label: "职务",
+ prop: "post",
+ }, {
+ label: "身份证",
+ prop: "cardid",
+ }, {
+ label: "联系电话",
+ prop: "cell",
+ }, {
+ label: "持股比例(%)",
+ prop: "shareholdingratio",
+ }
+]
diff --git a/src/views/securityUnitChild/index.vue b/src/views/securityUnitChild/index.vue
new file mode 100644
index 0000000..da5dd05
--- /dev/null
+++ b/src/views/securityUnitChild/index.vue
@@ -0,0 +1,717 @@
+<template>
+ <div class="dispatch">
+ <avue-tabs :option="optionTABS" @change="handleChangeTABS"></avue-tabs>
+ <span v-if="typeTABS.prop === 'tab1'">
+ <!-- <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"
+ >
+ <template slot="menuLeft">
+ <el-button
+ type="danger"
+ size="small"
+ plain
+ icon="el-icon-delete"
+ @click="handleDelete"
+ >删 除
+ </el-button>
+ </template>
+ </avue-crud>-->
+ <!-- 表单组件 -->
+ <avue-form ref="form" v-model="obj0" :option="option0">
+ <!-- <template slot-scope="scope" slot="menuForm">
+ <el-button @click="tip">自定义按钮</el-button>
+ </template> -->
+ </avue-form>
+ </span>
+ <span v-else-if="typeTABS.prop === 'tab2'">
+ <!-- <span v-if="typeTABS.prop === 'tab2'"> -->
+ <avue-crud
+ :option="option1"
+ :data="data1"
+ :page.sync="page1"
+ ref="crudrec1"
+ :table-loading="loading1"
+ @row-save="rowSave1"
+ @search-change="searchChange1"
+ @search-reset="searchReset1"
+ @row-update="rowUpdate1"
+ @row-del="rowDel1"
+ @selection-change="selectionChange1"
+ @refresh-change="refreshChange1"
+ >
+ <template slot="menuLeft">
+ <el-button
+ type="danger"
+ size="small"
+ plain
+ icon="el-icon-delete"
+ @click="handleDelete1"
+ >删 除
+ </el-button>
+ </template>
+ </avue-crud>
+ </span>
+ <span v-else-if="typeTABS.prop === 'tab3'">
+ <avue-crud
+ :option="option2"
+ :data="data2"
+ :page.sync="page2"
+ ref="crudrec2"
+ :table-loading="loading2"
+ @row-save="rowSave2"
+ @search-change="searchChange2"
+ @search-reset="searchReset2"
+ @row-update="rowUpdate2"
+ @row-del="rowDel2"
+ @selection-change="selectionChange2"
+ @refresh-change="refreshChange2"
+ >
+ <template slot="menuLeft">
+ <el-button
+ type="danger"
+ size="small"
+ plain
+ icon="el-icon-delete"
+ @click="handleDelete2"
+ >删 除
+ </el-button>
+ </template>
+ </avue-crud>
+ </span>
+ </div>
+</template>
+
+<script>
+import { column, column1, column2 } from "./data";
+import {
+ // getdata,
+ // adddata,
+ // update,
+ // remove,
+ getdataOnce1,
+ getdata1,
+ adddata1,
+ update1,
+ remove1,
+ getdataOnce2,
+ getdata2,
+ adddata2,
+ update2,
+ remove2,
+} from "@/api/securityUnit/securityUnit";
+
+export default {
+ data() {
+ var DIC = {
+ VAILD: [
+ {
+ label: "真",
+ value: "true",
+ },
+ {
+ label: "假",
+ value: "false",
+ },
+ ],
+ SEX: [
+ {
+ label: "男",
+ value: 0,
+ },
+ {
+ label: "女",
+ value: 1,
+ },
+ ],
+ };
+ return {
+ typeTABS: {}, //标签页
+ optionTABS: {
+ column: [
+ {
+ icon: "el-icon-info",
+ label: "保安单位基本信息",
+ prop: "tab1",
+ },
+ {
+ icon: "el-icon-info",
+ label: "保安单位出资人员",
+ prop: "tab2",
+ },
+ {
+ icon: "el-icon-info",
+ label: "主要管理人员信息",
+ prop: "tab3",
+ },
+ ],
+ },
+
+ // loading: true, //保安单位基本信息
+ // selectionList: [],
+ // page: {
+ // pageSize: 10,
+ // currentPage: 1,
+ // total: 0,
+ // },
+ // query: {},
+ // data: [],
+ // option: {
+ // card: true,
+ // searchSize: "mini",
+ // searchMenuSpan: 6,
+ // height: 547,
+ // menuWidth: 160,
+ // align: "center",
+ // selection: true,
+ // column: column,
+ // },
+
+ //全局单位统一社会信用代码
+ creditcode: "",
+ //保安单位信息表单
+ obj0: {
+ title: "我是头部标题",
+ },
+ option0: {
+ emptyBtn: false,
+ submitBtn: false,
+ gutter: 30,
+ column: column,
+ },
+
+ loading1: true, //派遣记录
+ selectionList1: [],
+ page1: {
+ pageSize: 10,
+ currentPage: 1,
+ total: 0,
+ },
+ query1: {},
+ data1: [],
+ option1: {
+ card: true,
+ searchSize: "mini",
+ searchMenuSpan: 6,
+ height: 547,
+ menuWidth: 200,
+ align: "center",
+ selection: true,
+ column: column1,
+ },
+
+ loading2: true, //派遣记录
+ selectionList2: [],
+ page2: {
+ pageSize: 10,
+ currentPage: 1,
+ total: 0,
+ },
+ query2: {},
+ data2: [],
+ option2: {
+ card: true,
+ searchSize: "mini",
+ searchMenuSpan: 6,
+ height: 547,
+ menuWidth: 200,
+ align: "center",
+ selection: true,
+ column: column2,
+ },
+ };
+ },
+ computed: {
+ chuzitime() {
+ return this.data1.capitaltime;
+ },
+ // ids() {
+ // let ids = [];
+ // this.selectionList.forEach((ele) => {
+ // ids.push(ele.id);
+ // });
+ // 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(",");
+ },
+ },
+ methods: {
+ 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.loading1 = false;
+ this.loading2 = false;
+ this.onLoad1(this.page1); //第二个表格不会自动执行
+ } else if (column.prop == "tab3") {
+ this.loading1 = false;
+ // this.loading2 = 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) {
+ // // var that = this;
+ // // var form = this.data[0];
+ // // delete form.id;
+ // // for (var k = 0; k < 13; k++) {
+ // adddata(form).then(
+ // () => {
+ // this.onLoad(this.page);
+ // this.$message({
+ // type: "success",
+ // message: "操作成功!",
+ // });
+ // done();
+ // },
+ // (error) => {
+ // window.console.log(error);
+ // loading();
+ // }
+ // );
+ // // }
+ // },
+ // 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;
+ // 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(() => {
+ // return remove(row.id);
+ // })
+ // .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(() => {
+ // 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);
+ // },
+ // onLoad(page, params = {}) {
+ // this.loading = true;
+ // getdata(
+ // page.currentPage,
+ // page.pageSize,
+ // Object.assign(params, this.query)
+ // ).then((res) => {
+ // // console.log(res);
+ // const data = res.data.data;
+ // this.page.total = data.total;
+ // this.data = data.records;
+ // console.log(this.data);
+ // this.loading = false;
+ // });
+ // },
+ //保安单位基本信息
+
+ //派遣记录
+ sizeChange1(val) {
+ this.page1.currentPage = 1;
+ this.page1.pageSize = val;
+ // this.getData();
+ this.onLoad1(this.page1, this.query1);
+ // this.$message.success("行数" + val);
+ },
+ currentChange1(val) {
+ this.page1.currentPage = val;
+ // this.getData();
+ this.onLoad1(this.page1, this.query1);
+ // this.$message.success("页码" + val);
+ },
+ rowSave1(form, done, loading) {
+ // var that = this;
+ // var form = this.data[0];
+ // delete form.id;
+ // for (var k = 0; k < 13; k++) {
+ form["creditcode"] = this.creditcode;
+ adddata1(form).then(
+ () => {
+ this.onLoad1(this.page1);
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ });
+ done();
+ },
+ (error) => {
+ window.console.log(error);
+ loading();
+ }
+ );
+ // }
+ },
+ searchChange1(params, done) {
+ this.query1 = params;
+ this.page1.currentPage = 1;
+ this.onLoad1(this.page1, params);
+ done();
+ },
+ searchReset1() {
+ this.query = {};
+ this.onLoad1(this.page1);
+ },
+ rowUpdate1(row, index, done, loading) {
+ delete row.shareholdingratio;
+ delete row.tenantId;
+ console.log(row);
+ update1(row).then(
+ () => {
+ this.onLoad1(this.page1);
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ });
+ done();
+ },
+ (error) => {
+ window.console.log(error);
+ loading();
+ }
+ );
+ },
+ rowDel1(row) {
+ this.$confirm("确定将选择数据删除?", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning",
+ })
+ .then(() => {
+ return remove1(row.id);
+ })
+ .then(() => {
+ this.onLoad1(this.page1);
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ });
+ });
+ },
+ selectionChange1(list) {
+ this.selectionList1 = list;
+ },
+ handleDelete1() {
+ if (this.selectionList1.length === 0) {
+ this.$message.warning("请选择至少一条数据");
+ return;
+ }
+ this.$confirm("确定将选择数据删除?", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning",
+ })
+ .then(() => {
+ return remove1(this.ids1);
+ })
+ .then(() => {
+ this.onLoad1(this.page1);
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ });
+ this.$refs.crudrec1.toggleSelection();
+ });
+ },
+ refreshChange1() {
+ this.onLoad1(this.page1, this.query1);
+ },
+
+ //
+ onLoad1(page, params = {}) {
+ this.loading1 = true;
+ console.log(page, params, 3435434);
+ params["creditcode"] = this.creditcode;
+ getdataOnce1(
+ page.currentPage,
+ page.pageSize,
+ Object.assign(params, this.query)
+ ).then((res) => {
+ // console.log(res);
+ const data = res.data.data;
+ this.page1.total = data.total;
+ this.data1 = data.records;
+ console.log(this.data1);
+ this.loading1 = false;
+ });
+ // onLoad1(page, params = {}) {
+ // this.loading1 = true;
+ // // console.log(page);
+ // getdata1(
+ // page.currentPage,
+ // page.pageSize,
+ // Object.assign(params, this.query)
+ // ).then((res) => {
+ // // console.log(res);
+ // const data = res.data.data;
+ // this.page1.total = data.total;
+ // this.data1 = data.records;
+ // console.log(this.data1);
+ // this.loading1 = false;
+ // });
+ },
+ //派遣记录
+
+ //派遣记录
+ sizeChange2(val) {
+ this.page2.currentPage = 1;
+ this.page2.pageSize = val;
+ // this.getData();
+ this.onLoad2(this.page2, this.query2);
+ // this.$message.success("行数" + val);
+ },
+ currentChange2(val) {
+ this.page2.currentPage = val;
+ // this.getData();
+ this.onLoad2(this.page2, this.query2);
+ // this.$message.success("页码" + val);
+ },
+ rowSave2(form, done, loading) {
+ // var that = this;
+ // var form = this.data[0];
+ // delete form.id;
+ // for (var k = 0; k < 13; k++) {
+ form["creditcode"] = this.creditcode;
+ adddata2(form).then(
+ () => {
+ this.onLoad2(this.page1);
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ });
+ done();
+ },
+ (error) => {
+ window.console.log(error);
+ loading();
+ }
+ );
+ // }
+ },
+ searchChange2(params, done) {
+ this.query2 = params;
+ this.page2.currentPage = 1;
+ this.onLoad2(this.page2, params);
+ done();
+ },
+ searchReset2() {
+ this.query = {};
+ this.onLoad2(this.page2);
+ },
+ rowUpdate2(row, index, done, loading) {
+ console.log(row);
+ update2(row).then(
+ () => {
+ this.onLoad2(this.page2);
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ });
+ done();
+ },
+ (error) => {
+ window.console.log(error);
+ loading();
+ }
+ );
+ },
+ rowDel2(row) {
+ this.$confirm("确定将选择数据删除?", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning",
+ })
+ .then(() => {
+ return remove2(row.id);
+ })
+ .then(() => {
+ this.onLoad2(this.page1);
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ });
+ });
+ },
+ selectionChange2(list) {
+ this.selectionList2 = list;
+ },
+ handleDelete2() {
+ if (this.selectionList2.length === 0) {
+ this.$message.warning("请选择至少一条数据");
+ return;
+ }
+ this.$confirm("确定将选择数据删除?", {
+ confirmButtonText: "确定",
+ cancelButtonText: "取消",
+ type: "warning",
+ })
+ .then(() => {
+ return remove2(this.ids2);
+ })
+ .then(() => {
+ this.onLoad2(this.page2);
+ this.$message({
+ type: "success",
+ message: "操作成功!",
+ });
+ this.$refs.crudrec2.toggleSelection();
+ });
+ },
+ refreshChange2() {
+ this.onLoad2(this.page2, this.query2);
+ },
+
+ //
+ onLoad2(page, params = {}) {
+ this.loading2 = true;
+ // console.log(page);
+ // getdata2(
+ params["creditcode"] = this.creditcode;
+ getdataOnce2(
+ page.currentPage,
+ page.pageSize,
+ Object.assign(params, this.query)
+ ).then((res) => {
+ // console.log(res);
+ const data = res.data.data;
+ this.page2.total = data.total;
+ this.data2 = data.records;
+ console.log(this.data2);
+ this.loading2 = false;
+ });
+ },
+ //派遣记录
+ },
+ mounted() {
+ // this.Ourdata = data;
+ // this.onLoad1(this.page1); //第二个表格不会自动执行
+ // this.onLoad2(this.page2); //第三个表格不会自动执行
+ this.typeTABS = this.optionTABS.column[0];
+ if (this.$route.query.row) {
+ var row = this.$route.query.row;
+ for (var k in row) {
+ this.obj0[k] = row[k];
+ }
+ this.obj0.title = row.enterprisename + "基本信息";
+ this.creditcode = row.creditcode;
+ }
+ },
+ watch: {
+ chuzitime() {
+ console.log(this.chuzitime, "chuzitime");
+ },
+ },
+};
+</script>
+
+<style lang="scss">
+.dispatch {
+ 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;
+}
+</style>
\ No newline at end of file
--
Gitblit v1.9.3