Commit 8080d959 authored by 王启林's avatar 王启林

perf: 优化业务关联事项详情

parent 0ce85d1e
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
"homepage": "https://iczer.github.io/vue-antd-admin", "homepage": "https://iczer.github.io/vue-antd-admin",
"private": true, "private": true,
"scripts": { "scripts": {
"serve": "vue-cli-service serve", "serve": "SET NODE_OPTIONS=--openssl-legacy-provider && vue-cli-service serve",
"build": "vue-cli-service build --mode production", "build": "vue-cli-service build --mode production",
"beta": "vue-cli-service build --mode beta", "beta": "vue-cli-service build --mode beta",
"test": "vue-cli-service build --mode test", "test": "vue-cli-service build --mode test",
......
...@@ -47,15 +47,19 @@ ...@@ -47,15 +47,19 @@
</span> </span>
</template> </template>
<template slot="action" slot-scope="text"> <template slot="action" slot-scope="text">
<a-tooltip> <a-space>
<template slot="title"> 解除查看 </template>
<span
class="primary pointer"
@click="handleisUnbound(true,text)"
>关联详情</span
>
<span <span
href="javascript:;"
class="delete pointer" class="delete pointer"
@click="handleisUnbound(text)" @click="handleisUnbound(false,text)"
>解除</span >解除</span
> >
</a-tooltip> </a-space>
</template> </template>
</a-table> </a-table>
</div> </div>
...@@ -214,11 +218,12 @@ ...@@ -214,11 +218,12 @@
<a-modal <a-modal
:maskClosable="false" :maskClosable="false"
v-model="isUnbound" v-model="isUnbound"
title="解除确认" :title="checkFlag ? '关联详情':'解除确认'"
@ok="handleUnbound" @ok="handleUnbound"
@cancel="handleCloseUnbound" @cancel="handleCloseUnbound"
> >
<p>此操作将解除</p> <p v-if="checkFlag">已关联 <span class="primary">{{ unboundMatterData.length }}</span> 件事项</p>
<p v-else>此操作将解除</p>
<a-form-model :wrapper-col="{ span: 24 }"> <a-form-model :wrapper-col="{ span: 24 }">
<a-form-model-item> <a-form-model-item>
<div class="business"> <div class="business">
...@@ -241,7 +246,7 @@ ...@@ -241,7 +246,7 @@
> >
<a-tag color="#108ee9"> 事项 </a-tag> <a-tag color="#108ee9"> 事项 </a-tag>
<span class="matter-name">{{ v.matterName }}</span> <span class="matter-name">{{ v.matterName }}</span>
<a-tooltip> <a-tooltip v-if="!checkFlag">
<template slot="title"> 解除此项 </template> <template slot="title"> 解除此项 </template>
<a-icon <a-icon
class="delete-icon" class="delete-icon"
...@@ -385,6 +390,7 @@ export default { ...@@ -385,6 +390,7 @@ export default {
siteBusinessName: "", siteBusinessName: "",
}, },
allCorrelationData: [], // 关联业务事项数据 allCorrelationData: [], // 关联业务事项数据
checkFlag:true, // 查看标杆
rules: { rules: {
siteBusinessId: [ siteBusinessId: [
{ required: true, message: "业务不能为空", trigger: "change" }, { required: true, message: "业务不能为空", trigger: "change" },
...@@ -496,8 +502,10 @@ export default { ...@@ -496,8 +502,10 @@ export default {
this.leftCurrent = 1; this.leftCurrent = 1;
this.getBusinessMatterData(); this.getBusinessMatterData();
}, },
// 左边解除按钮 // 左边解除按钮
handleisUnbound(data) { handleisUnbound(isCheck,data) {
this.checkFlag = isCheck
this.unboundBusinessData = data; this.unboundBusinessData = data;
this.isUnbound = true; this.isUnbound = true;
this.getMatterlistData({ this.getMatterlistData({
...@@ -515,6 +523,11 @@ export default { ...@@ -515,6 +523,11 @@ export default {
// 解除确认 // 解除确认
async handleUnbound(val = {}) { async handleUnbound(val = {}) {
if(this.checkFlag){
this.handleCloseUnbound()
this.isUnbound = false;
return
}
let str; let str;
if (this.unboundMatterItem.length > 0) { if (this.unboundMatterItem.length > 0) {
str = this.unboundMatterItem.join(","); str = this.unboundMatterItem.join(",");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment