From 79d9fc857559982b00b68b2d709807bdc4cd286f Mon Sep 17 00:00:00 2001
From: Administrator <admin>
Date: Mon, 11 Apr 2022 10:58:17 +0800
Subject: [PATCH] minio 地址修改
---
src/views/securityUnitChild/index.vue | 552 ++++++++++++++++++++++++++++++------------------------
1 files changed, 308 insertions(+), 244 deletions(-)
diff --git a/src/views/securityUnitChild/index.vue b/src/views/securityUnitChild/index.vue
index 265a313..bb3669b 100644
--- a/src/views/securityUnitChild/index.vue
+++ b/src/views/securityUnitChild/index.vue
@@ -37,19 +37,23 @@
<!-- 出资人列表信息 -->
<el-tab-pane :label="tab2label" name="tab2" v-if="shareholderVisiable">
<shareholder
- v-if="overshareholder"
+ v-if="seeWhere == 'tab2'"
:deptid="departmentid"
:windowHeight="windowHeight"
></shareholder>
</el-tab-pane>
<!-- 主要管理人信息 -->
<el-tab-pane :label="managerLabel" name="tab3">
- <manager v-if="overmanager" :deptid="departmentid"></manager>
+ <manager
+ v-if="seeWhere == 'tab3'"
+ :deptid="departmentid"
+ :stats="stats"
+ ></manager>
</el-tab-pane>
<!-- 装备管理列表 -->
<el-tab-pane label="装备管理" name="tab4" v-if="equipmentVisiable">
<equipments
- v-if="overzb"
+ v-if="seeWhere == 'tab4'"
:fromDeptId="departmentid"
:windowHeight="windowHeight"
></equipments>
@@ -58,7 +62,7 @@
<el-tab-pane label="车辆管理" name="tab5" v-if="carVisiable">
<car
:fromDeptId="departmentid"
- v-if="overcar"
+ v-if="seeWhere == 'tab5'"
:windowHeight="windowHeight"
></car>
</el-tab-pane>
@@ -67,7 +71,7 @@
<social
:deptid="objBase.departmentid"
:socialRE="social"
- v-if="social"
+ v-if="seeWhere == 'tab9'"
></social>
<!-- </span> -->
</el-tab-pane>
@@ -77,7 +81,24 @@
</el-tab-pane>
<!-- 许可证 -->
<el-tab-pane :label="licenceLabel" name="tab8" v-if="licenceVisiable">
- <licence :row="objBase" v-if="overHtp"></licence>
+ <!-- <licence :row="objBase" v-if="overHtp"></licence> -->
+ <basic-container>
+ <avue-form
+ v-if="true"
+ ref="lincenceForm"
+ v-model="licenceObj"
+ :option="licenceOption"
+ @submit="licenceSubmit"
+ ></avue-form>
+ <avue-form
+ v-if="false"
+ ref="licenceGroupForm"
+ v-model="licenceGroupObj"
+ :option="licenceGroupOption"
+ @submit="licenceGroupSubmit"
+ >
+ </avue-form>
+ </basic-container>
</el-tab-pane>
<!-- 备案证 -->
<el-tab-pane label="备案证" name="tab12" v-if="certificdinedVisiable">
@@ -85,11 +106,29 @@
</el-tab-pane>
</el-tabs>
</div>
-</template>
+</template>
<script>
-import { column11, column } from "./data";
-import { getOncedata, update,getBusinessInfo } from "@/api/securityUnit/securityUnit";
+import {
+ column11,
+ column,
+ filialeColumn,
+ selfColumn,
+ lincenceColumn,
+ businessColumn,
+ lincenceGroupColumn,
+ lincenceGroupColumns,
+ lincenceTrainColumn
+} from "./data";
+import {
+ getOncedata,
+ update,
+ getBusinessInfo,
+ submit,
+ getLicenceDetail,
+ licenceSubmit,
+ submitGroup
+} from "@/api/securityUnit/securityUnit";
import manager from "./manager.vue";
import shareholder from "./shareholder.vue";
import equipments from "../securityEquipment/equipments.vue";
@@ -110,13 +149,13 @@
businessLicense,
social,
manager,
- shareholder,
+ shareholder
},
data() {
return {
tab2label: "出资人信息",
managerLabel: "主要管理人信息",
- licenceLabel: "许可证",
+ licenceLabel: "许可证信息",
baseTitle: "基本信息",
visible: false,
certificdinedVisiable: false,
@@ -125,6 +164,7 @@
shareholderVisiable: true,
equipmentVisiable: true,
carVisiable: true,
+ seeWhere: "tab1",
//结决id传入、信息获取的优先级
overzb: false,
overmanager: false,
@@ -135,6 +175,8 @@
social: false,
overHtp: false,
activeName: "tab1",
+ stats: "",
+ deptId: "",
departmentid: "",
//全局单位统一社会信用代码
creditcode: "",
@@ -143,198 +185,159 @@
// title: "我是头部标题",
},
formData: {},
- businessObj:{},
+ businessObj: {},
businessOption: {
height: "auto",
// calcHeight: 80,
emptyBtn: false,
// submitBtn:false,
- submitText:"保存",
+ submitText: "保存",
+ group: businessColumn
+ },
+ licenceGroupObj: {},
+ licenceGroupOption: {
+ height: "auto",
+ emptyBtn: false,
+ submitText: "保存",
group: [
{
- label: "总公司工商信息",
+ label: "总公司许可证信息",
labelWidth: "110",
prop: "baseInfo",
icon: "el-icon-user-solid",
- column: [
- {
- label: "统一社会信用代码",
- prop: "socialCreditCode",
- span: 12,
- labelWidth: 130,
- disabled: false,
- },
- {
- label: "注册时间",
- prop: "registerTime",
- span: 12,
- labelWidth: 130,
- disabled: false,
- type: "date",
- format: "yyyy-MM-dd",
- valueFormat: "yyyy-MM-dd",
- rules: [
- {
- required: true,
- message: "请选择注册时间",
- trigger: "blur",
- },
- ],
- },
- {
- label: "注册资本",
- prop: "capital",
- span: 12,
- labelWidth: 130,
- disabled: false,
- },
- {
- label: "经营范围",
- prop: "businessScope",
- span: 12,
- labelWidth: 130,
- width: 110,
- // overHidden: true,
- // type: 'textarea',
- showWordLimit: true,
- disabled: false,
- },
- {
- label: "营业执照",
- prop: "trading",
- type: "upload",
- listType: "picture-img",
- span: 12,
- propsHttp: {
- res: "data",
- },
- canvasOption: {
- text: "",
- ratio: 1.0,
- },
- labelWidth: 130,
- tip: "只能上传jpg/png格式图片,且不超过2Mb",
- action: "/api/blade-resource/oss/endpoint/put-files",
- disabled: false,
- },
- ],
+ column: lincenceGroupColumn
},
{
- label: "分公司工商信息",
+ label: "分公司许可证信息",
prop: "detailInfo",
labelWidth: "110",
icon: "el-icon-s-order",
- column: [
- {
- label: "统一社会信用代码",
- prop: "creditcode",
- span: 12,
- labelWidth: 130,
- disabled: false,
- },
- {
- label: "注册时间",
- prop: "establishtime",
- span: 12,
- labelWidth: 130,
- disabled: false,
- type: "date",
- format: "yyyy-MM-dd",
- valueFormat: "yyyy-MM-dd",
- rules: [
- {
- required: true,
- message: "请选择注册时间",
- trigger: "blur",
- },
- ],
- },
-
- {
- label: "注册资本",
- prop: "registeredcapital",
- span: 12,
- labelWidth: 130,
- disabled: false,
- },
- {
- label: "经营范围",
- prop: "business",
- span: 12,
- labelWidth: 130,
- width: 110,
- // overHidden: true,
- // type: 'textarea',
- showWordLimit: true,
- disabled: false,
- },
- {
- label: "营业执照",
- prop: "businessLicense",
- type: "upload",
- listType: "picture-img",
- span: 12,
- propsHttp: {
- res: "data",
- },
- canvasOption: {
- text: "",
- ratio: 1.0,
- },
- labelWidth: 130,
- tip: "只能上传jpg/png格式图片,且不超过2Mb",
- action: "/api/blade-resource/oss/endpoint/put-files",
- disabled: false,
- },
- ],
- },
- ],
+ column: lincenceGroupColumns
+ }
+ ]
+ },
+ licenceObj: {},
+ licenceOption: {
+ emptyBtn: false,
+ // submitBtn: false,
+ submitText: "保存",
+ gutter: 30,
+ column: lincenceColumn
},
optionBase: {
emptyBtn: false,
submitBtn: false,
submitText: "保存",
gutter: 30,
- column: column,
+ column: column
},
option01: {
emptyBtn: false,
submitBtn: false,
submitText: "保存",
gutter: 30,
- column: column11,
- },
+ column: column11
+ }
};
},
computed: {
...mapGetters(["userInfo", "windowHeight"]),
chuzitime() {
return this.data1.capitaltime;
- },
+ }
},
methods: {
//分公司工商信息修改
- businessSubmit(row, done, loading){
- alert(1);
+ businessSubmit(row, done, loading) {
var that = this;
if (
this.userInfo.role_name == "保安公司管理员" ||
this.userInfo.role_name == "培训公司管理员" ||
this.userInfo.role_name == "分公司管理员"
) {
- row["departmentid"] = this.userInfo.dept_id;
- row["id"] = this.formData.id;
+ //分公司
+ var f = {
+ departmentid: this.userInfo.dept_id,
+ id: this.formData.id,
+ businessLicense: row.businessLicense,
+ establishtime: row.establishtime,
+ creditcode: row.creditcode,
+ registeredcapital: row.registeredcapital,
+ business: row.business
+ };
+ //总公司
+ var z = {
+ id: row.id,
+ deptId: this.userInfo.dept_id,
+ registerTime: row.registerTime,
+ socialCreditCode: row.socialCreditCode,
+ capital: row.capital,
+ businessScope: row.businessScope,
+ trading: row.trading
+ };
}
- update(row).then(
+
+ //分公司工商信息修改
+ update(f).then(
() => {
this.$message({
type: "success",
- message: "操作成功!",
+ message: "操作成功!"
});
- that.formData = row;
done();
},
- (error) => {
+ error => {
+ window.console.log(error);
+ loading();
+ }
+ );
+ //总公司工商信息修改
+ submit(z).then(
+ res => {
+ that.businessObj = row;
+ that.businessObj.id = res.data.data.id;
+ done();
+ },
+ error => {
+ window.console.log(error);
+ loading();
+ }
+ );
+ done();
+ },
+ //分公司许可证信息修改
+ licenceSubmit(row, done, loading) {
+ var that = this;
+ if (
+ this.userInfo.role_name == "保安公司管理员" ||
+ this.userInfo.role_name == "培训公司管理员" ||
+ this.userInfo.role_name == "分公司管理员"
+ ) {
+ row["deptId"] = this.userInfo.dept_id;
+ row["id"] = that.licenceObj.id;
+ }
+
+ if (this.stats == "1") {
+ row["type"] = 2;
+ } else {
+ row["type"] = 1;
+ }
+
+ if (row.id) {
+ row["updateUser"] = this.userInfo.Id;
+ } else {
+ row["createUser"] = this.userInfo.Id;
+ }
+ licenceSubmit(row).then(
+ () => {
+ this.$message({
+ type: "success",
+ message: "操作成功!"
+ });
+ that.getLicenceInfo();
+ done();
+ },
+ error => {
window.console.log(error);
loading();
}
@@ -357,17 +360,52 @@
() => {
this.$message({
type: "success",
- message: "操作成功!",
+ message: "操作成功!"
});
that.formData = row;
done();
},
- (error) => {
+ error => {
window.console.log(error);
loading();
}
);
+ done();
+ },
+ //分公司许可信息修改
+ licenceGroupSubmit(row, done, loading) {
+ var that = this;
+ if (
+ this.userInfo.role_name == "保安公司管理员" ||
+ this.userInfo.role_name == "培训公司管理员" ||
+ this.userInfo.role_name == "分公司管理员"
+ ) {
+ row["deptId"] = this.userInfo.dept_id;
+ row["id"] = that.licenceGroupObj.id;
+ row["sid"] = that.licenceGroupObj.sid;
+ }
+ row["type"] = 1;
+ if (row.id) {
+ row["updateUser"] = this.userInfo.Id;
+ } else {
+ row["createUser"] = this.userInfo.Id;
+ }
+ // console.log(row);
+ submitGroup(row).then(
+ () => {
+ this.$message({
+ type: "success",
+ message: "操作成功!"
+ });
+ that.getLicenceInfo();
+ done();
+ },
+ error => {
+ window.console.log(error);
+ loading();
+ }
+ );
done();
},
//从 localStorage 获取数据
@@ -377,18 +415,29 @@
handleClick(tab, event) {
if (tab.name == "tab1") {
this.loading1 = false;
+ this.seeWhere = "tab1";
} else if (tab.name == "tab11") {
+ this.seeWhere = "tab11";
this.obj = this.formData;
} else if (tab.name == "tab5") {
+ this.seeWhere = "tab5";
this.overcar = true;
} else if (tab.name == "tab4") {
+ this.seeWhere = "tab4";
this.overzb = true;
} else if (tab.name == "tab2") {
+ this.seeWhere = "tab2";
this.overshareholder = true;
} else if (tab.name == "tab3") {
+ this.seeWhere = "tab3";
this.overmanager = true;
} else if (tab.name == "tab9") {
+ this.seeWhere = "tab9";
this.social = true;
+ } else if (tab.name == "tab8") {
+ //获取许可证信息
+ this.seeWhere = "tab8";
+ this.getLicenceInfo();
} else {
this.social = false;
this.overcar = false;
@@ -397,6 +446,14 @@
this.overmanager = false;
this.overshareholder = false;
}
+ this.$store.commit("setWindowSizeHeightAdd");
+ },
+ //获取许可证信息
+ getLicenceInfo() {
+ var that = this;
+ getLicenceDetail(this.deptId).then(res => {
+ that.licenceObj = res.data.data;
+ });
},
//tag 防重复处理
tagTraim() {
@@ -420,41 +477,85 @@
//编辑状态控制
editController() {
var that = this;
+ if (this.stats == "1") {
+ //培训学校
+ this.licenceOption.column = lincenceTrainColumn;
+ } else {
+ this.licenceOption.column = lincenceColumn;
+ }
+
+ //基本信息列控制
+ if (this.stats == "4") {
+ //分公司
+ this.optionBase.column = filialeColumn;
+ } else if (this.stats == "0") {
+ //自招保安单位
+ this.optionBase.column = selfColumn;
+ } else {
+ //学校,本市保安公司
+ this.optionBase.column = column;
+ }
+
//获取当前登录人员的角色信息
- var roleIds = this.userInfo.role_id.split(",");
- roleIds.forEach((roleId) => {
- getRoleDetail(roleId).then((res) => {
- var roleAlias = res.data.data.roleAlias;
- var d = that.optionBase.column;
- var e = that.option01.column;
- //控制按钮,编辑状态
- if (
- roleAlias == "保安公司管理员" ||
- roleAlias == "分公司管理员" ||
- roleAlias == "培训公司管理员"
- ) {
- that.optionBase.submitBtn = true;
- that.businessOption.submitBtn = true;
- that.option01.submitBtn = true;
- for (var k in d) {
- d[k].disabled = false;
- }
- for (var n in e) {
- e[n].disabled = false;
- }
- } else {
- that.optionBase.submitBtn = false;
- that.option01.submitBtn = false;
- that.businessOption.submitBtn = false;
- for (var a in d) {
- d[a].disabled = true;
- }
- for (var b in e) {
- e[b].disabled = true;
- }
- }
- });
- });
+ // var roleIds = this.userInfo.role_id.split(",");
+ // roleIds.forEach((roleId) => {
+ // getRoleDetail(roleId).then((res) => {
+ // var roleAlias = res.data.data.roleAlias;
+ var roleAlias = this.userInfo.role_name;
+ var d = that.optionBase.column;
+ var e = that.option01.column;
+ var f = that.businessOption.group;
+ var g = f[0].column;
+ var h = f[1].column;
+ var bb = that.licenceOption.column;
+ //控制按钮,编辑状态
+ if (
+ roleAlias == "保安公司管理员" ||
+ roleAlias == "分公司管理员" ||
+ roleAlias == "培训公司管理员"
+ ) {
+ that.optionBase.submitBtn = true;
+ that.businessOption.submitBtn = true;
+ that.option01.submitBtn = true;
+ that.licenceOption.submitBtn = true;
+ for (var k in d) {
+ d[k].disabled = false;
+ }
+ for (var n in e) {
+ e[n].disabled = false;
+ }
+ for (var l in g) {
+ g[l].disabled = false;
+ }
+ for (var m in h) {
+ h[m].disabled = false;
+ }
+ for (var mm in bb) {
+ bb[mm].disabled = false;
+ }
+ } else {
+ that.optionBase.submitBtn = false;
+ that.option01.submitBtn = false;
+ that.businessOption.submitBtn = false;
+ that.licenceOption.submitBtn = false;
+ for (var a in d) {
+ d[a].disabled = true;
+ }
+ for (var b in e) {
+ e[b].disabled = true;
+ }
+ for (var c in g) {
+ g[c].disabled = true;
+ }
+ for (var z in h) {
+ h[z].disabled = true;
+ }
+ for (var zz in bb) {
+ bb[zz].disabled = true;
+ }
+ }
+ // });
+ // });
},
//获取保安公司数据
getdatas(data) {
@@ -478,48 +579,6 @@
that.creditcode = row.creditcode;
}
that.overHtp = true;
- if (data.stats == "0") {
- //自招保安单位
- const industrycolumn = this.findObject(
- this.optionBase.column,
- "industry"
- );
- const representativecolumn = this.findObject(
- this.optionBase.column,
- "representative"
- );
- const representativecellcolumn = this.findObject(
- this.optionBase.column,
- "representativecell"
- );
- const fregioncolumn = this.findObject(
- this.optionBase.column,
- "fregion"
- );
- const ftimecolumn = this.findObject(this.optionBase.column, "ftime");
-
- //法人及电话,办公地址不可见
- industrycolumn.display = false;
- representativecolumn.display = false;
- representativecellcolumn.display = false;
- //服务区域,时间可见
- fregioncolumn.display = true;
- ftimecolumn.display = true;
- }
- if (data.stats == "4") {
- //分公司
- const representativecolumn = this.findObject(
- this.optionBase.column,
- "representative"
- );
- const representativecellcolumn = this.findObject(
- this.optionBase.column,
- "representativecell"
- );
- //法人及电话不可见
- representativecolumn.label = "分公司负责人";
- representativecellcolumn.label = "分公司负责人电话";
- }
} else {
that.objBase.enterprisename = "未选择查询单位";
}
@@ -537,27 +596,29 @@
var stats = data.stats;
var deptId = data.departmentid;
//初始tab控制
- this.initController(stats,deptId);
+ this.initController(stats, deptId);
//初始数据获取
this.getdatas(data);
} else {
//单位信息进入
var value = {
- departmentid: that.userInfo.dept_id,
+ departmentid: that.userInfo.dept_id
};
- getOncedata(value).then((res) => {
+ getOncedata(value).then(res => {
that.formData = res.data.data;
var stats = res.data.data.stats;
var deptId = res.data.data.departmentid;
//初始tab控制
- this.initController(stats,deptId);
+ this.initController(stats, deptId);
//初始数据获取
this.getdatas(res.data.data);
});
}
},
//tab 初始设置
- initController(stats,deptId) {
+ initController(stats, deptId) {
+ this.stats = stats;
+ this.deptId = deptId;
var that = this;
// 判断按进入的公司类型
if (stats == "2") {
@@ -578,21 +639,24 @@
that.baseTitle = "保安单位基本信息";
that.certificdinedVisiable = true;
that.businessVisiable = false;
+ that.licenceLabel = "总公司许可证信息";
//查询分公司(及总公司)工商信息
- getBusinessInfo(deptId).then((res)=>{
- console.log(res.data.data,1234546);
+ getBusinessInfo(deptId).then(res => {
that.businessObj = res.data.data;
- })
+ if (that.businessObj.id == -1) {
+ that.businessObj.id = null;
+ }
+ });
}
if (stats == "1") {
//培训学校
that.baseTitle = "学校基本信息";
that.managerLabel = "师资力量";
- that.licenceLabel = "培训许可证";
+ that.licenceLabel = "培训许可证信息";
that.carVisiable = false;
that.shareholderVisiable = false;
}
- },
+ }
},
mounted() {
this.tagTraim();
@@ -601,7 +665,7 @@
//初始化信息
this.initData();
},
- watch: {},
+ watch: {}
};
</script>
@@ -630,4 +694,4 @@
.manager {
height: 755px;
}
-</style>
\ No newline at end of file
+</style>
--
Gitblit v1.9.3