dabdac6e by tianhaohao@pashanhoo.com

Merge branch 'dev' of http://yun.pashanhoo.com:9090/bdc/bdcdj-web into dev

2 parents fc0fbee7 f21c2458
<!--
* @Description:
* @Autor: renchao
* @LastEditTime: 2023-05-17 10:40:38
-->
<template>
<div class="clxx">
<div class="right">
<!-- 材料预览 -->
<div class="clyl-box">
<div class="menu-tree">
<el-button type="primary" native-type="submit" @click="viewDetail" style="width:100%;margin-top:10px;">查看明细</el-button>
<div class="item">
材料目录({{tableData.length}})
<div style="margin-top:10px">
<div style="text-align: center;line-height:20px;color:black;font-size:14px" v-if="tableData.length == 0">暂无数据</div>
<div v-for="(item,index) in tableData" :key="item.bsmSj"
:class="['child', treeCheckId == item.bsmSj ? 'checked' : '']" @click="treeClick(item,index)">
<span v-if="item.isrequired==1" class="required">必选</span>
{{ item.sjmc }}
<span class="cl_number">({{item.children ? item.children.length : 0}})</span>
</div>
</div>
</div>
<el-button type="primary" native-type="submit" style="width:100%" @click="handleAdd()" v-if="!this.$route.query.viewtype">新增</el-button>
</div>
<image-preview ref='imageRef' v-if="tableData.length>0" :previewImg="previewImg" @updateList="updateList" @nextPriview="nextPriview"
@prevPriview="prevPriview" />
</div>
</div>
<clxxAddDialog v-model="isDialog" />
<!-- <clxxDetailDialog v-model="detailDialog" :data="tableData" /> -->
</div>
</template>
<script>
import { mapGetters } from "vuex";
import clxxAddDialog from "./components/clxxAddDialog.vue";
import imagePreview from '@/views/components/imagePreview.vue'
import { InitClml, saveClml, deleteSjClml, moveClml } from "@/api/clxx.js";
import { popupDialog } from "@/utils/popup.js";
export default {
components: { clxxAddDialog, imagePreview },
data () {
return {
isDialog: false,
iclass: "",
// 材料目录选中
treeCheckIndex: 0,
treeCheckId: "",
key: 0,
tableData: [],
previewImg: {
// 收件标识码
bsmSj: '',
bsmSlsq: this.$parent.bsmSlsq,
index: 0,
selectedIndex: 0,
imgList: []
}
}
},
computed: {
...mapGetters(["dictData"])
},
created () {
this.clmlInitList(1)
},
methods: {
// 自动预览
nextPriview () {
if (this.treeCheckIndex < this.tableData.length) {
this.treeCheckIndex++
this.treeCheckId = this.tableData[this.treeCheckIndex].bsmSj
this.previewImg.index = 0
this.previewImg.imgList = this.tableData[this.treeCheckIndex].children
this.previewImg.bsmSj = this.tableData[this.treeCheckIndex].bsmSj
}
},
prevPriview () {
if (this.treeCheckIndex >= 1) {
this.treeCheckIndex--
this.treeCheckId = this.tableData[this.treeCheckIndex].bsmSj
this.previewImg.index = this.previewImg.imgList.length
this.previewImg.imgList = this.tableData[this.treeCheckIndex].children
this.previewImg.bsmSj = this.tableData[this.treeCheckIndex].bsmSj
}
},
// 材料目录明细初始化
clmlInitList (type) {
//type 1:列表初始化 2:新增材料
return new Promise(resolve => {
this.unitData = this.$parent.unitData;
var formdata = new FormData();
formdata.append("bsmSldy", this.unitData[0]?.bsmSldy);
formdata.append("bsmSlsq", this.$parent.bsmSlsq);
InitClml(formdata).then((res) => {
if (res.code == 200) {
resolve(res.code)
if (res.result && res.result.length > 0) {
this.tableData = res.result;
if (type == 1) {
this.treeClick(this.tableData[0], 0);
} else {
//新增材料后刷新列表焦点置于新增的对象上
this.treeClick(this.tableData[this.tableData.length - 1], this.tableData.length - 1);
}
}
} else {
this.$message.error(res.message)
}
})
})
},
setChecked (item) {
this.treeCheckId = item.bsmSj;
this.title = item.sjmc;
this.titleYs = 1;
this.titleNum = item.children.length;
this.previewImg.imgList = item.children;
this.previewImg.bsmSj = item.bsmSj;
},
updateList (val) {
let that = this
if (val != null) { //删除最后一张图片时 val=null
this.tableData.forEach(item => {
if (item.bsmSj === val.bsmSj) {
item.children = val.children
}
})
this.previewImg.imgList = _.cloneDeep(val.children)
if (this.previewImg.index == this.previewImg.imgList.length) {
this.previewImg.index = this.previewImg.index - 1
}
} else {
this.previewImg.imgList = []
this.tableData.forEach((item, index) => {
if (this.treeCheckId == item.bsmSj) {
item.children = []
that.treeCheckIndex = index
}
})
}
},
// 添加材料目录
handleAdd () {
this.isDialog = true;
},
// 新增弹窗保存
addSave (data) {
let obj = {
bsmSlsq: this.$parent.bsmSlsq,
isrequired: "1",
sjmc: data.clmc,
sjsl: 0,
smzt: '',
ys: 0,
sjlx: data.cllx,
sfxjcl: "1", // 是否必选
};
saveClml(obj).then(async (res) => {
if (res.code == 200) {
let res = await this.clmlInitList(2)
if (res == 200) this.$message({
message: "新增成功",
type: "success",
})
}
});
},
// 材料目录点击选中
treeClick (item, index) {
this.previewImg.index = 0
this.treeCheckId = item?.bsmSj
this.treeCheckIndex = index
this.previewImg.imgList = item?.children
this.previewImg.bsmSj = item?.bsmSj
},
// 小图片点击
imgClick (item, index) {
this.showImg = item;
this.titleYs = index + 1;
},
// 字典
dicStatus (val, code) {
let data = this.$store.getters.dictData[code],
name = "暂无";
if (data) {
data.map((item) => {
if (item.dcode == val) {
name = item.dname
}
});
return name
}
},
//查看明细
viewDetail () {
this.$popupDialog("查看明细", "djbworkflow/components/dialog/clxxDetailDialog", {
data: this.tableData
}, "60%")
},
//设置tableData
setTableData (tableData) {
this.$nextTick(res => {
this.tableData = tableData;
})
},
},
};
</script>
<style scoped lang='scss'>
@import "~@/styles/mixin.scss";
.active {
background: $light-blue !important;
color: #fff;
}
.required {
font-size: 12px;
color: $pink;
float: left;
}
.cl_number {
float: right;
}
.clxx {
width: 100%;
display: flex;
padding-left: 5px;
height: calc(100vh - 125px);
.left {
display: flex;
flex-direction: column;
justify-content: space-between;
.item {
width: 28px;
height: 49%;
@include flex-center;
background-color: #e4e7ed;
border-bottom-right-radius: 10px;
padding: 5px;
cursor: pointer;
transition: all 0.3s;
&:hover {
@extend .active;
}
}
}
.right {
width: 100%;
height: 100%;
.clmlmx-box {
margin: 0 auto;
.title {
text-align: center;
height: 60px;
line-height: 60px;
border: 1px solid #dfe6ec;
font-size: 20px;
background: #81d3f81a;
margin-bottom: -1px;
}
}
.clyl-box {
width: 100%;
height: 100%;
display: flex;
.menu-tree {
width: 20%;
min-width: 160px;
height: 100%;
margin-right: 10px;
border-right: 1px dotted #d9d9d9;
padding: 0 15px;
.item {
line-height: 30px;
padding-top: 5px;
border-bottom: 1px solid #e8e8e8;
font-size: 16px;
text-align: center;
color: $light-blue;
.itemIcon {
float: right;
line-height: 60px;
cursor: pointer;
}
.child {
line-height: 32px;
border-bottom: 1px solid #e8e8e8;
padding-left: 10px;
color: #6b6b6b;
cursor: pointer;
box-sizing: border-box;
border-radius: 6px;
line-height: 20px;
transition: all 0.3s;
padding: 8px 0;
}
.child:hover {
color: $light-blue;
transform: scale(1.1);
}
.checked {
border: 1px solid $light-blue;
color: $light-blue;
}
}
}
.clyl-img {
width: 75%;
height: 100%;
background: #f3f4f7;
margin: 0 auto;
position: relative;
}
}
}
}
</style>
<!--
* @Description:
* @Autor: renchao
* @LastEditTime: 2023-05-09 09:20:10
-->
<template>
<dialogBox title="新建材料信息" width="20%" isMain v-model="myValue" @closeDialog="closeDialog" @submitForm="handleSubmit"
:isFullscreen="false">
<el-form :model="ruleForm" ref="ruleForm" label-width="70px">
<el-row>
<el-col :span="24">
<el-form-item label="材料类型">
<el-select v-model="ruleForm.cllx" class="width100" placeholder="请选择">
<el-option v-for="item in dictData['A40']" :key="item.dcode" :label="item.dname" :value="item.dcode">
</el-option>
</el-select>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="24">
<el-form-item label="材料名称">
<el-input v-model="ruleForm.clmc"></el-input>
</el-form-item>
</el-col>
</el-row>
</el-form>
</dialogBox>
</template>
<script>
import { mapGetters } from "vuex";
export default {
props: {
value: { type: Boolean, default: false },
},
data () {
return {
myValue: this.value,
ruleForm: {
cllx: "",
clmc: "",
},
};
},
computed: {
...mapGetters(["dictData"]),
},
watch: {
value (val) {
console.log("进去新增材料弹框");
this.myValue = val;
},
},
methods: {
closeDialog () {
this.$emit("input", false);
this.ruleForm = {
cllx: "",
clmc: "",
}
},
handleSubmit () {
this.$parent.addSave(this.ruleForm);
this.ruleForm = {
cllx: "",
clmc: "",
}
this.$emit("input", false);
},
},
};
</script>
<style scoped lang="scss">
.submit-button {
text-align: center;
height: 52px;
padding-top: 10px;
background-color: #fff;
}
</style>
......@@ -242,18 +242,19 @@ export default {
type: "warning",
})
.then(() => {
deleteFlow(formdata).then((res) => {
if (res.code === 200) {
this.$message({
type: "success",
message: "删除成功!",
});
window.close();
window.opener.getBpageList();
} else {
this.$message.error(res.message);
}
});
console.log('删除流程');
// deleteFlow(formdata).then((res) => {
// if (res.code === 200) {
// this.$message({
// type: "success",
// message: "删除成功!",
// });
// window.close();
// window.opener.getBpageList();
// } else {
// this.$message.error(res.message);
// }
// });
})
.catch(() => {
this.$message({
......
......@@ -119,6 +119,7 @@
import { getIdCardInfo } from '@/utils/operation.js'
import { getPrintTemplateByCode } from "@/api/system";
import { addJtfcCxjgXx, getJtfcInfo, printJtcfInfo } from "@/api/sqcx";
import { log } from 'bpmn-js-token-simulation';
export default {
props: {
formData: {
......@@ -297,7 +298,8 @@
}
},
watch: {
"form.djSqcxDO.ycqrgx" (val) {
"form.djSqcxDO.ycqrgx": {
handler: function (val) {
if (val == "1") {
this.form.qlrList = _.cloneDeep(this.form.sqrList);
} else {
......@@ -305,10 +307,15 @@
this.add("qlr");
}
},
"form.sqrList" (val) {
immediate: true
},
"form.sqrList": {
handler: function (val) {
if (this.form.djSqcxDO.ycqrgx == '1') {
this.form.qlrList = _.cloneDeep(val)
}
},
deep: true
}
},
methods: {
......
......@@ -25,7 +25,7 @@
</el-col>
</el-row>
<object id="LODOP_OB" classid="clsid:2105C259-1E0C-4534-8141-A753534CB4CA" v-show="false">
<embed id="LODOP_EM" type="application/x-print-lodop" width=820 height=450 pluginspage="install_lodop32.exe" />
<embed id="LODOP_EM" type="application/x-print-lodop" width=800 height=600 pluginspage="install_lodop32.exe" />
</object>
<textarea rows="0" id="S1" cols="0" v-show="false"></textarea>
......@@ -37,11 +37,11 @@
</template>
<script>
import { getLodop } from "@/utils/LodopFuncs"
import { mapGetters } from 'vuex'
import store from '@/store/index.js'
import { addPrintTemplate, editPrintTemplate } from "@/api/system.js"
export default {
import { getLodop } from "@/utils/LodopFuncs"
import { mapGetters } from 'vuex'
import store from '@/store/index.js'
import { addPrintTemplate, editPrintTemplate } from "@/api/system.js"
export default {
computed: {
...mapGetters(['dictData']),
},
......@@ -160,17 +160,17 @@ export default {
LODOP.PRINT_DESIGN(); //打印设计或者打印维护需要放到最后
}
}
}
}
</script>
<style scoped lang="scss">
@import "~@/styles/mixin.scss";
@import "~@/styles/dialogBoxheader.scss";
@import "~@/styles/mixin.scss";
@import "~@/styles/dialogBoxheader.scss";
.font-red {
color: red
}
.font-red {
color: red;
}
.middle-margin-bottom {
margin-top: 20px
}
.middle-margin-bottom {
margin-top: 20px;
}
</style>
......
......@@ -57,8 +57,9 @@
watch: {
isRefresh: {
handler (newVal, oldVal) {
if (newVal) this.fetchData
}
if (newVal) this.fetchData()
},
immediate: true
}
},
methods: {
......@@ -101,72 +102,9 @@
message: "已取消删除",
});
});
},
//设计打印模板
DesignByPRGData (item) {
let LODOP = getLodop(document.getElementById('LODOP_OB'), document.getElementById('LODOP_EM'));
LODOP.ADD_PRINT_DATA("ProgramData", item.tmpcontent); //装载模板
//窗口关闭后,回调函数中保存的设计代码
if (LODOP.CVERSION)
CLODOP.On_Return = function (TaskID, printList) {
if (LODOP.CVERSION)
LODOP.On_Return = function (TaskID, Value) {
document.getElementById("S1").value = Value;
};
document.getElementById("S1").value = LODOP.GET_VALUE(
"ProgramData",
0
);
setTimeout(() => {
item.tmpcontent = document.getElementById("S1").value;
}, 1000);
};
LODOP.PRINT_DESIGN(); //打印设计或者打印维护需要放到最后
},
editClick () {
let LODOP = getLodop();
LODOP.SET_PRINT_MODE("PRINT_SETUP_PROGRAM", true);
LODOP.PRINT_INITA(0, 0, 850, 560, "不动产证明");
LODOP.ADD_PRINT_SETUP_BKIMG("<img border='1' src=" + this.images + ">");
LODOP.ADD_PRINT_TEXT(403, 220, 39, 25, this.printList.year); //year
LODOP.ADD_PRINT_TEXT(403, 278, 25, 25, this.printList.month); //month
LODOP.ADD_PRINT_TEXT(403, 309, 25, 25, this.printList.day); //day
LODOP.ADD_PRINT_TEXT(493, 205, 160, 25, this.printList.bh); //编号
// 头部信息
LODOP.ADD_PRINT_TEXT(78, 419, 39, 25, this.printList.xzq); //陕
LODOP.ADD_PRINT_TEXT(78, 466, 39, 25, this.printList.xh); //
LODOP.ADD_PRINT_TEXT(78, 520, 60, 25, this.printList.d); //
LODOP.ADD_PRINT_TEXT(78, 670, 60, 25, this.printList.h); //
LODOP.ADD_PRINT_TEXT(119, 555, 190, 25, this.printList.zmsx); //然后多个ADD语句及SET语句
LODOP.ADD_PRINT_TEXT(152, 557, 190, 25, this.printList.qlr); //权利人
LODOP.ADD_PRINT_TEXT(186, 557, 190, 25, this.printList.ywr); //义务人
LODOP.ADD_PRINT_TEXT(219, 557, 190, 25, this.printList.zl); //坐落
LODOP.ADD_PRINT_TEXT(254, 557, 190, 25, this.printList.bdcdyh); //不动产单元号
LODOP.ADD_PRINT_TEXT(318, 557, 190, 67, this.printList.qt); //其他
LODOP.ADD_PRINT_TEXT(426, 557, 190, 67, this.printList.fj); //附记
LODOP.SET_SHOW_MODE("BKIMG_PRINT", 1);
LODOP.SET_SHOW_MODE("BKIMG_IN_PREVIEW", 1);
//窗口关闭后,回调函数中保存的设计代码
if (LODOP.CVERSION)
CLODOP.On_Return = function (TaskID, printList) {
if (LODOP.CVERSION)
LODOP.On_Return = function (TaskID, Value) {
document.getElementById("S1").value = Value;
};
document.getElementById("S1").value = LODOP.GET_VALUE(
"ProgramData",
0
);
setTimeout(() => {
let printValue = document.getElementById("S1").value;
console.log("value", printValue);
}, 1000);
};
LODOP.PRINT_DESIGN(); //打印设计或者打印维护需要放到最后
},
},
};
}
}
}
</script>
<style scoped lang="scss">
@import "~@/styles/public.scss";
......
/*
* @Description:
* @Autor: renchao
* @LastEditTime: 2023-06-20 11:28:09
* @LastEditTime: 2023-06-26 17:03:07
*/
import { getWorkFlowImage } from "@/api/workflow/jsydsyqFlow.js";
import { getPrintTemplateByCode } from "@/api/system";
......@@ -113,6 +113,7 @@ export default {
getPrintTemplateByCode({ tmpno: 'dysqs' }).then(res => {
if (res.code == 200) {
getPrintApplicationInfo(this.currentSelectProps).then(infoRes => {
console.log(infoRes, 'infoRes');
if (infoRes.code == 200) {
//打开模板设计
let LODOP = getLodop(document.getElementById('LODOP_OB'), document.getElementById('LODOP_EM'));
......