e9c9b431 by 田浩浩

修改报错

1 parent 8397619d
...@@ -108,5 +108,5 @@ export default { ...@@ -108,5 +108,5 @@ export default {
108 </script> 108 </script>
109 109
110 <style lang="scss" scoped> 110 <style lang="scss" scoped>
111 @import "./qlxxCommon.scss"; 111 // @import "./qlxxCommon.scss";
112 </style> 112 </style>
......
1 <template>
2 <div class="container">
3 <!-- 顶部内容框 -->
4 <div class="topButton">
5 <!-- 左侧业务功能按钮 -->
6 <ul>
7 <li @click="operation(index, item)" v-for="(item, index) in leftButtonList" :key="index">
8 <svg-icon :icon-class="item.icon" />
9 <span class="iconName">{{ item.name }}</span>
10 </li>
11 </ul>
12 <!-- 右侧流程按钮 -->
13 <ul>
14 <li @click="operation(index, item)" v-for="(item, index) in rightButtonList" :key="index">
15 <svg-icon class="icon" :icon-class="item.icon" />
16 <span class="iconName">{{ item.name }}</span>
17 </li>
18 </ul>
19 </div>
20 <!-- 内容框架 -->
21 <div class="containerFrame">
22 <!-- 左侧菜单栏 -->
23 <div class="leftmenu" :class="{ 'animation-map-drawer': isShowdrawer }">
24 <div v-if="this.isShowdrawer">
25 <div class="title">申请单元列表({{ unitData.length }})</div>
26 <el-menu :default-active="activeIndex" @select="unitClick">
27 <el-menu-item v-for="(item, index) in unitData" :index="index.toString()" :key="index">
28 <p>{{ item.bdcdyh }}</p>
29 <p class="title-detail">{{ item.zl }}</p>
30 </el-menu-item>
31 </el-menu>
32 </div>
33 <div class="map-drawer-click map-drawer" v-if="!isShowdrawer" @click="
34 () => {
35 this.isShowdrawer = !this.isShowdrawer;
36 }
37 "></div>
38 <div class="map-drawer-expand map-drawer" v-else @click="
39 () => {
40 this.isShowdrawer = !this.isShowdrawer;
41 }
42 "></div>
43 </div>
44 <div class="leftCon">
45 <!-- 分屏左侧预览 -->
46 <div v-if="splitScreen" class="splitScreen-con">
47 <component :is="clxxForm" v-bind="currentSelectProps" :key="fresh" />
48 </div>
49 <!-- 表单内容区域 -->
50 <div class="rightContainer">
51 <el-tabs v-model="tabName" @tab-click="tabClick">
52 <el-tab-pane :label="item.name" :name="item.value" v-for="(item, index) in tabList" :key="index">
53 </el-tab-pane>
54 </el-tabs>
55 <component :key="fresh" :is="componentTag" v-bind="currentSelectProps" />
56 </div>
57 </div>
58 </div>
59 <dialogBox title="流程图" width="70%" isMain v-model="myValue" :isFullscreen="false" :isButton="false">
60 <img :src="imgSrc" style="margin: 20px 0" />
61 </dialogBox>
62 </div>
63 </template>
64
65 <style scoped lang='scss'>
66 @import "~@/styles/mixin.scss";
67 @import "./workFrame.scss";
68 </style>
69
70 <script>
71 import {
72 leftMenu,
73 stepExpandInfo,
74 record,
75 getNextLinkInfo,
76 completeTask,
77 } from "@/api/fqsq.js";
78 import { getWorkFlowImage } from "@/api/jsydsyqFlow.js"
79 import { getForm } from "./flowform.js";
80 export default {
81 data () {
82 return {
83 // 流程图
84 imgSrc: '',
85 myValue: false,
86 // 折叠
87 isShowdrawer: true,
88 // 默认选中
89 activeIndex: '0',
90 //受理申请标识码
91 bsmSlsq: this.$route.query.bsmSlsq,
92 //当前流程所在环节
93 bestepid: this.$route.query.bestepid,
94 //顶部左侧按钮集合
95 leftButtonList: [],
96 //顶部右侧按钮集合
97 rightButtonList: [],
98 //左侧菜单数据集合
99 unitData: [],
100 //设置那个表单选中
101 tabName: "",
102 //表单集合
103 tabList: [],
104 //选择加载哪一个组件
105 componentTag: "",
106 //设置表单组件是否刷选值
107 fresh: 10,
108 //设置表单传递数据
109 currentSelectProps: {},
110 //是否开启材料分屏
111 splitScreen: false,
112 //材料分屏表单
113 clxxForm: "",
114 //材料信息选择卡索引
115 clxxIndex: "",
116 //材料信息选项卡对象
117 clxxTab: {},
118 };
119 },
120 mounted () {
121 this.loadBdcdylist();
122 this.flowInitParam();
123 },
124 methods: {
125 //加载流程初始参数
126 flowInitParam () {
127 var formdata = new FormData();
128 formdata.append("bsmSlsq", this.bsmSlsq);
129 formdata.append("bestepid", this.bestepid);
130 stepExpandInfo(formdata).then((res) => {
131 if (res.code === 200) {
132 this.leftButtonList = res.result.button;
133 this.rightButtonList = res.result.operation;
134 this.tabList = res.result.form;
135 //默认选择第一个选项卡内容
136 this.tabName = res.result.form[0].value;
137 let that = this;
138 this.tabList.forEach(function (item, index) {
139 if (item.value == "clxx") {
140 that.clxxIndex = index;
141 that.clxxForm = getForm(item.value);
142 that.clxxTab = item;
143 }
144 });
145 //默认加载第一个选项卡的组件内容
146 this.getFromRouter(res.result.form[0].value);
147 }
148 });
149 },
150 //流程环节操作按钮
151 operation (index, item) {
152 let that = this;
153 switch (item.value) {
154 case "B1":
155 getWorkFlowImage(this.bsmSlsq).then(res => {
156 this.imgSrc = URL.createObjectURL(res)
157 this.myValue = true
158 })
159 break;
160 case "zsyl":
161 this.zsylFlag = true;
162 break;
163 case "clfp": //材料分屏按钮
164 this.splitScreen = this.splitScreen ? false : true;
165 this.$store.dispatch('app/settScreen', this.splitScreen)
166 if (this.splitScreen) {
167 //如果当前选项卡为材料信息内容,递减到上一个选项卡内容
168 if (this.tabName == this.clxxTab.value) {
169 this.tabName = this.tabList[this.clxxIndex - 1].value;
170 this.getFromRouter(this.tabList[this.clxxIndex - 1].value);
171 }
172 this.tabList.splice(this.clxxIndex, 1);
173 } else {
174 this.tabList.splice(this.clxxIndex, 1, this.clxxTab);
175 }
176 break;
177 case "th": //退回按钮
178 break;
179 case "zc": //转件按钮
180 getNextLinkInfo({
181 bsmSlsq: this.bsmSlsq,
182 bestepid: this.bestepid,
183 }).then((res) => {
184 if (res.code === 200) {
185 this.send(res.result);
186 }
187 });
188 // this.$alert(res.result);
189 break;
190 case "tc":
191 window.close();
192 break;
193 case "db":
194 var formdata = new FormData();
195 formdata.append("bsmSlsq", this.bsmSlsq);
196 formdata.append("bestepid", this.bestepid);
197 // comMsg;
198 this.$confirm("请确认是否登簿", "提示", {
199 iconClass: "el-icon-question", //自定义图标样式
200 confirmButtonText: "确认", //确认按钮文字更换
201 cancelButtonText: "取消", //取消按钮文字更换
202 showClose: true, //是否显示右上角关闭按钮
203 type: "warning", //提示类型 success/info/warning/error
204 }).then(function () {
205 record(formdata).then((res) => {
206 if (res.code === 200 || res.code === 2002) {
207 that.$alert(res.message);
208 }
209 });
210 });
211 break;
212 }
213 },
214 //读取申请单元信息
215 loadBdcdylist () {
216 var formdata = new FormData();
217 formdata.append("bsmSlsq", this.bsmSlsq);
218 formdata.append("bestepid", this.bestepid);
219 leftMenu(formdata).then((res) => {
220 if (res.code === 200) {
221 this.unitData = res.result;
222 this.currentSelectProps = res.result[0];
223 }
224 })
225 },
226 //申请单元点击事件
227 unitClick (index) {
228 if (this.currentSelectProps.bsmSldy != this.unitData[index].bsmSldy) {
229 this.currentSelectProps = this.unitData[index];
230 this.fresh += 1;
231 }
232 },
233 //表单选项卡事件
234 tabClick (tab, event) {
235 this.getFromRouter(tab.name);
236 },
237 //切换选项卡内容组件
238 getFromRouter (tabname) {
239 this.componentTag = getForm(tabname);
240 },
241 //发送下一个环节
242 send (obj) {
243 const h = this.$createElement;
244 this.$msgbox({
245 title: "您确定转出吗?",
246 message: h("div", { style: "margin: auto" }, [
247 h("span", null, "下个环节名称:"),
248 h("i", { style: "color: teal" }, obj.taskName),
249 h("div", null, ""),
250 h("span", null, "下个环节经办人: "),
251 h("i", { style: "color: teal" }, obj.usernames.join(",")),
252 ]),
253 showCancelButton: true,
254 beforeClose: (action, instance, done) => {
255 if (action === "confirm") {
256 instance.confirmButtonLoading = true;
257 instance.confirmButtonText = "执行中...";
258 completeTask({
259 bsmSlsq: this.bsmSlsq,
260 shyj: "this.bestepid",
261 }).then((res) => {
262 if (res.code === 200) {
263 instance.confirmButtonLoading = false;
264 this.$message.success("转件成功");
265 setTimeout(() => {
266 window.opener = null;
267 window.open("about:blank", "_self");
268 window.close();
269 this.$emit("input", false);
270 }, 1000);
271 }
272 });
273 } else {
274 done();
275 }
276 },
277 }).then((action) => {
278 this.$message({
279 type: "info",
280 message: "action: " + action
281 })
282 })
283 }
284 }
285 }
286 </script>
...\ No newline at end of file ...\ No newline at end of file