88e5492d by 蔡俊立
2 parents 3144bb02 8a93be0b
......@@ -213,38 +213,6 @@ import InformationTable from "./InformationTable";
import { Init, fristReg } from "@/api/cfdjFlow.js";
import { mapGetters } from "vuex";
export default {
created() {
console.log(1111111111111111);
var bsmSldy = this.$parent._data.unitData[0].bsmSldy;
var formdata = new FormData();
formdata.append("bsmSldy", bsmSldy);
Init(formdata).then((res) => {
if (res.code === 200 && res.result) {
this.ruleForm = {
...res.result,
...res.result.qlxxdatas,
...res.result.djQlxxCfdjDo,
};
}
});
},
watch: {
},
components: { InformationTable },
props: {
flag: {
type: Boolean,
default: false,
},
fetch: {
type: Boolean,
default: false,
},
},
computed: {
...mapGetters(["dictData"]),
},
data() {
return {
disabled: true,
......@@ -279,8 +247,43 @@ export default {
czr: "",
},
rules: {},
//传递参数
propsParam: {},
};
},
created() {
// console.log(1111111111111111);
this.propsParam = this.$attrs;
var formdata = new FormData();
formdata.append("bsmSldy", this.propsParam.bsmSldy);
Init(formdata).then((res) => {
if (res.code === 200 && res.result) {
this.ruleForm = {
...res.result,
...res.result.qlxxdatas,
...res.result.djQlxxCfdjDo,
};
}
});
},
watch: {
},
components: { InformationTable },
props: {
flag: {
type: Boolean,
default: false,
},
fetch: {
type: Boolean,
default: false,
},
},
computed: {
...mapGetters(["dictData"]),
},
methods: {
list(bsmSldy) {
var formdata = new FormData();
......
//流程环节操作按钮
export function getForm(tabName) {
let form;
switch (tabName) {
case "slxx":
form = require("@/views/ywbl/fqsq/components/slxx.vue");
break;
case "slxxCfdj":
form = require("@/views/ywbl/fqsq/components/slxxCfdj.vue");
break;
case "clxx":
form = require("@/views/ywbl/fqsq/components/clxx.vue");
break;
case "spyj":
form = require("@/views/ywbl/fqsq/components/spyj.vue");
break;
case "zdjbxx":
form = require("@/views/zhcx/djbcx/components/zdxx.vue");
break;
case "qlxx":
form = require("@/views/zhcx/djbcx/components/jsydsyq.vue");
break;
case "szxx":
form = require("@/views/ywbl/fqsq/components/szxx.vue");
break;
case "fzxx":
form = require("@/views/ywbl/fqsq/components/fzxx.vue");
break;
}
return (r) => require.ensure([], () => r(form));
}
\ No newline at end of file
// 时间戳转化
// export default {
// timestampToTime(timestamp) {
// let strDate;
// var date = new Date(timestamp); //时间戳为10位需*1000,时间戳为13位的话不需乘1000
// var Y = date.getFullYear() + '-';
// var M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-';
// var D = (date.getDate() < 10 ? '0' + date.getDate() : date.getDate()) + ' ';
// var h = (date.getHours() < 10 ? '0' + date.getHours() : date.getHours()) + ':';
// var m = (date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes());
// strDate = Y + M + D + h + m;
// return strDate;
// },
// }
//流程环节操作按钮
export function operation(index, item) {
let that = this;
switch (item.value) {
case "zsyl":
this.zsylFlag = true;
break;
case "clfp":
this.key++;
this.issplitScreen = !this.issplitScreen;
this.flag = !this.flag;
if (this.issplitScreen) {
this.tabList.splice(1, 1);
} else {
this.tabList = [...this.tabList1];
}
break;
case "th":
this.thflag = true;
this.$nextTick(() => {
this.$refs.thdialogRef.tablelistFn();
});
break;
case "zc":
this.zcDialog = true;
this.$refs.zcDialogRef.tablelistFn();
break;
case "tc":
window.close();
break;
case "db":
var formdata = new FormData();
formdata.append("bsmSlsq", this.bsmSlsq);
formdata.append("bestepid", this.bestepid);
// comMsg;
this.$confirm("请确认是否登簿", "提示", {
iconClass: "el-icon-question", //自定义图标样式
confirmButtonText: "确认", //确认按钮文字更换
cancelButtonText: "取消", //取消按钮文字更换
showClose: true, //是否显示右上角关闭按钮
type: "warning", //提示类型 success/info/warning/error
}).then(function () {
record(formdata).then((res) => {
if (res.code === 200 || res.code === 2002) {
that.$alert(res.message);
}
});
});
break;
}
}
export function loadBdcdylist(that) {
var formdata = new FormData();
formdata.append("bsmSlsq", that.bsmSlsq);
formdata.append("bestepid", that.bestepid);
leftMenu(formdata).then((res) => {
if (res.code === 200) {
that.unitData = res.result;
that.currentSelectProps = res.result[0];
//debugger;
//this.$alert(res.result[0].bsmSldy);
// setTimeout(() => {
// that.$refs.slxx?.[0].list(that.unitData?.[0]?.bsmSldy);
// this.bsmBusiness = that.unitData?.[0]?.bsmBusiness;
// }, 300);
}
});
}
\ No newline at end of file
......@@ -30,15 +30,7 @@
<!-- 左侧菜单栏 -->
<div id="leftmenu">
<div class="title">申请单元列表({{ unitData.length }})</div>
<!-- <ul>
<div v-for="(item, index) in unitData" :key="index">
<li @click="unitClick(item)">
<p>{{ item.bdcdyh }}</p>
<p>{{ item.zl }}</p>
</li>
</div>
</ul> -->
<el-menu default-active="0" @select="selectItems">
<el-menu default-active="0" @select="unitClick">
<el-menu-item
v-for="(item, index) in unitData"
:index="index.toString()"
......@@ -50,7 +42,9 @@
</i>
</el-menu-item>
</el-menu>
</div>
<div v-if="splitScreen" class="splitScreen-con">
<component :is="clxxForm" v-bind="currentSelectProps" :key="fresh" />
</div>
<!-- 表单内容区域 -->
<div id="rightContainer">
......@@ -70,9 +64,6 @@
v-bind="currentSelectProps"
/>
</div>
<!-- <div style="width: 100%">
</div> -->
</div>
</div>
</div>
......@@ -85,58 +76,53 @@
<script>
import { leftMenu, stepExpandInfo, record } from "@/api/fqsq.js";
import { getForm } from "./flowform.js";
export default {
components: {
//注册表单组件,后期改为路由模式
slxx: () => import("./components/slxx.vue"),
clxx: () => import("./components/clxx.vue"),
spyj: () => import("./components/spyj.vue"),
zdjbxx: () => import("../../zhcx/djbcx/components/zdxx.vue"),
qlxx: () => import("../../zhcx/djbcx/components/jsydsyq.vue"),
// slxx: () => import("@/views/ywbl/fqsq/components/slxx.vue"),
// clxx: () => import("./components/clxx.vue"),
// spyj: () => import("./components/spyj.vue"),
// zdjbxx: () => import("../../zhcx/djbcx/components/zdxx.vue"),
// qlxx: () => import("../../zhcx/djbcx/components/jsydsyq.vue"),
},
data() {
return {
//受理申请标识码
bsmSlsq: "",
//当前流程所在环节
bestepid: "",
//顶部左侧按钮集合
return {
//受理申请标识码
bsmSlsq: this.$route.query.bsmSlsq,
//当前流程所在环节
bestepid: this.$route.query.bestepid,
//顶部左侧按钮集合
leftButtonList: [],
//顶部右侧按钮集合
//顶部右侧按钮集合
rightButtonList: [],
//左侧菜单数据集合
//左侧菜单数据集合
unitData: [],
//设置那个表单选中
tabName: "",
//表单集合
//设置那个表单选中
tabName: "",
//表单集合
tabList: [],
//选择加载哪一个组件
//选择加载哪一个组件
componentTag: "",
//设置表单组件是否刷选值
fresh: 0,
//设置表单传递数据
currentSelectProps: {},
//是否开启材料分屏
splitScreen: false,
//材料分屏表单
clxxForm: "",
//材料信息选择卡索引
clxxIndex: "",
//材料信息选项卡对象
clxxTab: {},
};
},
mounted() {
this.bsmSlsq = this.$route.query.bsmSlsq;
this.bestepid = this.$route.query.bestepid;
this.loadBdcdylist();
this.flowInitParam();
},
methods: {
selectItems(index) {
//this.$alert(this.unitData[index].bsmSldy);
//this.$store.state.adminleftnavnum = index;
if (this.currentSelectProps.bsmSldy != this.unitData[index].bsmSldy) {
this.currentSelectProps = this.unitData[index];
this.fresh += 1;
}
//按钮选中之后设置当前的index为store里的值。
},
//加载流程初始参数
flowInitParam() {
var formdata = new FormData();
......@@ -149,8 +135,16 @@ export default {
this.tabList = res.result.form;
//默认选择第一个选项卡内容
this.tabName = res.result.form[0].value;
let that = this;
this.tabList.forEach(function (item, index) {
if (item.value == "clxx") {
that.clxxIndex = index;
that.clxxForm = getForm(item.value);
that.clxxTab = item;
}
});
//默认加载第一个选项卡的组件内容
this.componentTag = res.result.form[0].value;
this.getFromRouter(res.result.form[0].value);
}
});
},
......@@ -162,13 +156,17 @@ export default {
this.zsylFlag = true;
break;
case "clfp":
this.key++;
this.issplitScreen = !this.issplitScreen;
this.flag = !this.flag;
if (this.issplitScreen) {
this.tabList.splice(1, 1);
this.splitScreen = this.splitScreen ? false : true;
//this.$alert(this.tabName);
if (this.splitScreen) {
//如果当前选项卡为材料信息内容,递减到上一个选项卡内容
if (this.tabName == this.clxxTab.value) {
this.tabName = this.tabList[this.clxxIndex - 1].value;
this.getFromRouter(this.tabList[this.clxxIndex - 1].value);
}
this.tabList.splice(this.clxxIndex, 1);
} else {
this.tabList = [...this.tabList1];
this.tabList.splice(this.clxxIndex, 1, this.clxxTab);
}
break;
case "th":
......@@ -205,6 +203,7 @@ export default {
break;
}
},
//读取申请单元信息
loadBdcdylist() {
var formdata = new FormData();
formdata.append("bsmSlsq", this.bsmSlsq);
......@@ -212,65 +211,25 @@ export default {
leftMenu(formdata).then((res) => {
if (res.code === 200) {
this.unitData = res.result;
// this.unitData.push({
// bsmSldy: "edd5ffc12c8dcc237ad06447618dcddc",
// bsmBusiness: "ee5187fa978c9002c3a2991ae5d70482",
// bsmSsql: null,
// ybdcqzsh: null,
// bdcdyid: "dded1d6615be4fbf02de75c93bb5084e",
// bdcdyh: "610102123666GB10165W00000000",
// bdcdylx: null,
// xmmc: null,
// jzwmc: null,
// fh: null,
// zl: "陕西省新城区大庆路1号村",
// bglx: "0",
// wqhtid: null,
// wqhtbh: null,
// htlx: null,
// wqsj: null,
// ydybh: null,
// djyy: "GYJSY2222D",
// qllx: "A03",
// djlx: "200",
// sqzsbs: null,
// gyfs: null,
// sqfbcz: null,
// sfxysczs: null,
// sfxyffzs: null,
// issave: null,
// taskId: null,
// });
// this.unitData.push(res.result[0]);
// this.unitData.push(res.result[0]);
this.currentSelectProps = res.result[0];
//debugger;
//this.$alert(res.result[0].bsmSldy);
// setTimeout(() => {
// that.$refs.slxx?.[0].list(that.unitData?.[0]?.bsmSldy);
// this.bsmBusiness = that.unitData?.[0]?.bsmBusiness;
// }, 300);
}
});
},
// 左侧列表点击调用接口
unitClick(item) {
// this.bsmBusiness = item.bsmBusiness
// var activeTabName = this.activeName
// if(activeTabName == 'slxx'){
// //受理信息页面接口调取
// this.$nextTick(() => {
// this.$refs.slxx[0].list(item.bsmSldy)
// })
// }else if(activeTabName == 'spyj'){
// //审批页面接口调取
// this.$nextTick(() => {
// this.$refs.spyj[0].list(this.bsmBusiness,this.queryForm.bestepid)
// })
// }
//申请单元点击事件
unitClick(index) {
if (this.currentSelectProps.bsmSldy != this.unitData[index].bsmSldy) {
this.currentSelectProps = this.unitData[index];
this.fresh += 1;
}
},
//表单选项卡事件
tabClick(tab, event) {
this.componentTag = tab.name;
//this.$alert(tab.name);
this.getFromRouter(tab.name);
},
//切换选项卡内容组件
getFromRouter(tabname) {
this.componentTag = getForm(tabname);
},
},
};
......
......@@ -16,7 +16,7 @@
</div>
<div class="xxTableBox">
<table class="xxTable">
<tr v-for="item in columns" :key="item">
<tr v-for="(item, colindex) in columns" :key="colindex">
<td>
{{ item.label }}
</td>
......@@ -38,7 +38,7 @@
<span v-else> {{ row[item.prop] }}</span>
</td>
<td v-for="count in emptycolNum" :key="count"></td>
<td v-for="count in emptycolNum" :key="~count"></td>
</tr>
</table>
</div>
......@@ -80,9 +80,9 @@ export default {
},
created() {
this.propsParam = this.$attrs;
//debugger;
this.columns = datas.columns();
this.loadData();
// this.$alert(datas.columns());
},
methods: {
loadData() {
......
......@@ -32,6 +32,7 @@
.xxTableBox {
overflow-x: scroll;
width: 100%;
padding-bottom: 120px;
}
.xxTable > tr:first-child th {
......