|
|
@@ -1,7 +1,7 @@
|
|
|
<template>
|
|
|
<div class="rule-type">
|
|
|
<el-dialog
|
|
|
- :title="id ? '编辑离行式自助银行' : '新增离行式自助银行'"
|
|
|
+ :title="id ? '编辑' : '新增离行式自助银行'"
|
|
|
:visible.sync="isShow"
|
|
|
width="800px"
|
|
|
>
|
|
|
@@ -70,10 +70,35 @@
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
<el-row>
|
|
|
+ <el-col :span="12" >
|
|
|
+ <el-form-item label="机构类型" prop="type">
|
|
|
+ <el-select
|
|
|
+ prop="type"
|
|
|
+ label="机构类型"
|
|
|
+ v-model="form.type"
|
|
|
+ placeholder="请选择机构类型"
|
|
|
+ clearable
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="dict in dict.type.sys_org_type"
|
|
|
+ :key="dict.value"
|
|
|
+ :label="dict.label"
|
|
|
+ :value="dict.value"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+
|
|
|
+ </el-row>
|
|
|
+ <el-row>
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="是否可用" prop="isLock">
|
|
|
- <el-switch v-model="form.isLock" :active-value="0"
|
|
|
- :inactive-value="1"> </el-switch>
|
|
|
+ <el-switch
|
|
|
+ v-model="form.isLock"
|
|
|
+ :active-value="1"
|
|
|
+ :inactive-value="0"
|
|
|
+ >
|
|
|
+ </el-switch>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
|
@@ -81,8 +106,11 @@
|
|
|
label="加钞间出入口远程控制"
|
|
|
prop="cashAddingRoomRemoteControl"
|
|
|
>
|
|
|
- <el-switch v-model="form.cashAddingRoomRemoteControl" :active-value="1"
|
|
|
- :inactive-value="0">
|
|
|
+ <el-switch
|
|
|
+ v-model="form.cashAddingRoomRemoteControl"
|
|
|
+ :active-value="1"
|
|
|
+ :inactive-value="0"
|
|
|
+ >
|
|
|
</el-switch>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
@@ -124,7 +152,7 @@
|
|
|
@selection-change="handleOrgSelectionChange"
|
|
|
>
|
|
|
<el-table-column type="selection" width="55" align="center" />
|
|
|
- <el-table-column label="序号" align="center" prop="id" />
|
|
|
+ <el-table-column v-if="false" label="序号" align="center" prop="id" />
|
|
|
<el-table-column label="标准" align="center" prop="standard" />
|
|
|
<el-table-column
|
|
|
label="达标日期"
|
|
|
@@ -169,7 +197,7 @@
|
|
|
size="mini"
|
|
|
type="text"
|
|
|
icon="el-icon-delete"
|
|
|
- @click="handleOrgDelete(scope.row)"
|
|
|
+ @click="handleOrgDelete(scope.$index)"
|
|
|
v-hasPermi="['system:construction:remove']"
|
|
|
>删除</el-button
|
|
|
>
|
|
|
@@ -267,6 +295,7 @@ export default {
|
|
|
dicts: ["sys_normal_disable", "sys_org_type"],
|
|
|
data() {
|
|
|
return {
|
|
|
+ tempRow:null,
|
|
|
// 查询参数
|
|
|
queryParams: {
|
|
|
pageNum: 1,
|
|
|
@@ -284,6 +313,7 @@ export default {
|
|
|
orgform: {},
|
|
|
//默认选中节点
|
|
|
defaultKeys: [],
|
|
|
+
|
|
|
rules: {
|
|
|
parentId: [
|
|
|
{ required: true, message: "上级机构不能为空", trigger: "blur" },
|
|
|
@@ -322,9 +352,10 @@ export default {
|
|
|
methods: {
|
|
|
getOrgPhysicalDefenseConstructionInfo() {
|
|
|
this.orgloading = true;
|
|
|
- let dat = { orgId: this.orgid, type: 4 };
|
|
|
+ let dat = { orgId: this.id, type: 4 };
|
|
|
+ // console.log(dat,2222222222)
|
|
|
listOrgPhysicalDefenseConstruction(dat).then((data) => {
|
|
|
- console.log("机构信息获取成功");
|
|
|
+ // console.log("机构信息获取成功");
|
|
|
this.constructionList = data.rows;
|
|
|
this.orgloading = false;
|
|
|
});
|
|
|
@@ -339,55 +370,69 @@ export default {
|
|
|
orgcancel() {
|
|
|
this.orgopen = false;
|
|
|
this.orgreset();
|
|
|
+ this.tempRow="";
|
|
|
},
|
|
|
/** 提交按钮 */
|
|
|
submitOrgForm() {
|
|
|
- this.orgform.orgId = this.orgid;
|
|
|
- this.$refs["orgform"].validate((valid) => {
|
|
|
- if (valid) {
|
|
|
- this.orgform.type = 4;
|
|
|
- if (this.orgform.id != null) {
|
|
|
- updateOrgPhysicalDefenseConstruction(this.orgform).then(
|
|
|
- (response) => {
|
|
|
- this.$modal.msgSuccess("修改成功");
|
|
|
- this.orgopen = false;
|
|
|
- this.getOrgPhysicalDefenseConstructionInfo();
|
|
|
- }
|
|
|
- );
|
|
|
- } else {
|
|
|
- addOrgPhysicalDefenseConstruction(this.orgform).then((response) => {
|
|
|
- this.$modal.msgSuccess("新增成功");
|
|
|
- this.orgopen = false;
|
|
|
- this.getOrgPhysicalDefenseConstructionInfo();
|
|
|
- });
|
|
|
- }
|
|
|
- }
|
|
|
- });
|
|
|
+ let dat = { standard: this.orgform.standard,
|
|
|
+ dateOfCompliance:this.orgform.dateOfCompliance,
|
|
|
+ certificateEvidence:this.orgform.certificateEvidence,
|
|
|
+ certificate:this.orgform.certificate,
|
|
|
+ evidence:this.orgform.evidence
|
|
|
+ };
|
|
|
+ this.constructionList.splice(this.tempRow, 1)
|
|
|
+ this.constructionList.push(dat);
|
|
|
+ this.orgopen = false;
|
|
|
+ // this.orgform.orgId = this.orgid;
|
|
|
+ // this.$refs["orgform"].validate((valid) => {
|
|
|
+ // if (valid) {
|
|
|
+ // this.orgform.type = 4;
|
|
|
+ // if (this.orgform.id != null) {
|
|
|
+ // updateOrgPhysicalDefenseConstruction(this.orgform).then(
|
|
|
+ // (response) => {
|
|
|
+ // this.$modal.msgSuccess("修改成功");
|
|
|
+ // this.orgopen = false;
|
|
|
+ // this.getOrgPhysicalDefenseConstructionInfo();
|
|
|
+ // }
|
|
|
+ // );
|
|
|
+ // } else {
|
|
|
+ // addOrgPhysicalDefenseConstruction(this.orgform).then((response) => {
|
|
|
+ // this.$modal.msgSuccess("新增成功");
|
|
|
+ // this.orgopen = false;
|
|
|
+ // this.getOrgPhysicalDefenseConstructionInfo();
|
|
|
+ // });
|
|
|
+ // }
|
|
|
+ // }
|
|
|
+ // });
|
|
|
},
|
|
|
/** 删除按钮操作 */
|
|
|
handleOrgDelete(row) {
|
|
|
- const orgids = row.id || this.orgids;
|
|
|
- this.$modal
|
|
|
- .confirm('是否确认删除机构物防建设编号为"' + orgids + '"的数据项?')
|
|
|
- .then(function () {
|
|
|
- return delOrgPhysicalDefenseConstruction(orgids);
|
|
|
- })
|
|
|
- .then(() => {
|
|
|
- this.getOrgPhysicalDefenseConstructionInfo();
|
|
|
- this.$modal.msgSuccess("删除成功");
|
|
|
- })
|
|
|
- .catch(() => {});
|
|
|
+ this.constructionList.splice(row, 1)
|
|
|
+ // this.$modal
|
|
|
+ // .confirm('是否确认删除机构物防建设编号为"' + orgids + '"的数据项?')
|
|
|
+ // .then(function () {
|
|
|
+ // return delOrgPhysicalDefenseConstruction(orgids);
|
|
|
+ // })
|
|
|
+ // .then(() => {
|
|
|
+ // this.getOrgPhysicalDefenseConstructionInfo();
|
|
|
+ // this.$modal.msgSuccess("删除成功");
|
|
|
+ // })
|
|
|
+ // .catch(() => {});
|
|
|
},
|
|
|
/** 修改按钮操作 */
|
|
|
handleOrgUpdate(row) {
|
|
|
this.orgreset();
|
|
|
- const id = row.id || this.orgids;
|
|
|
- getOrgPhysicalDefenseConstruction(id).then((response) => {
|
|
|
- // console.log(response)
|
|
|
- this.orgform = response.data;
|
|
|
+ this.tempRow=row;
|
|
|
+ this.orgform = row;
|
|
|
this.orgopen = true;
|
|
|
this.orgtitle = "修改机构物防建设";
|
|
|
- });
|
|
|
+ // const id = row.id || this.orgids;
|
|
|
+ // getOrgPhysicalDefenseConstruction(id).then((response) => {
|
|
|
+ // // console.log(response)
|
|
|
+ // this.orgform = response.data;
|
|
|
+ // this.orgopen = true;
|
|
|
+ // this.orgtitle = "修改机构物防建设";
|
|
|
+ // });
|
|
|
},
|
|
|
/** 新增按钮操作 */
|
|
|
handleOrgAdd() {
|
|
|
@@ -438,14 +483,17 @@ export default {
|
|
|
this.id = 0;
|
|
|
this.constructionList = [];
|
|
|
if (row != 0) {
|
|
|
- // console.log(row)
|
|
|
+ // console.log(row,111111111111)
|
|
|
+
|
|
|
this.orgid = row.orgid;
|
|
|
this.form = row;
|
|
|
+ // this.form.isLock2=row.isLock;
|
|
|
this.id = row.id;
|
|
|
if (row.id != null) {
|
|
|
getExtendByOrgId(row.id).then((data) => {
|
|
|
console.log(data.data);
|
|
|
if (data.data != null) {
|
|
|
+ this.form.orgExtendId=data.data.id,
|
|
|
this.form.cashAddingRoomRemoteControl =
|
|
|
data.data.cashAddingRoomRemoteControl;
|
|
|
this.form.detachedLobbyEquipment =
|
|
|
@@ -472,9 +520,10 @@ export default {
|
|
|
.cashAddingRoomRemoteControl
|
|
|
? 1
|
|
|
: 0;
|
|
|
- console.log(this.form);
|
|
|
+ this.form.constructionList=this.constructionList;
|
|
|
+ // console.log(this.form);
|
|
|
addOrUpdate(this.form).then((data) => {
|
|
|
- this.$modal.msgSuccess("添加成功");
|
|
|
+ this.$modal.msgSuccess("成功");
|
|
|
this.onHide();
|
|
|
});
|
|
|
// this.$emit("success");
|