1d9c504b by renchao@pashanhoo.com

style:材料上传

1 parent 0a835006
/*
* @Description: 企业银行接口
* @Autor: renchao
* @LastEditTime: 2023-09-08 09:18:45
* @LastEditTime: 2023-09-11 10:19:36
*/
import request from '@/utils/request'
let SERVER = window.config ? window.config : JSON.parse(localStorage.getItem('ApiUrl'))
......@@ -63,4 +63,21 @@ export function uploadBatch (data) {
},
data
})
}
/**
* @description: 删除上传材料目录
* @param {*} bsmFile
* @author: renchao
*/
export function deleteFile (bsmFile) {
return request({
url: SERVER.SERVERAPI + '/rest/sys/company/deleteFile',
method: 'get',
params: {
bsmFile: bsmFile
}
})
}
\ No newline at end of file
......
/*
* @Description: 信息备案
* @Autor:
* @LastEditTime: 2023-09-08 09:27:58
* @LastEditTime: 2023-09-11 11:25:22
*/
import request from '@/utils/request'
......@@ -19,6 +19,19 @@ export function addYh (data) {
data
})
}
/**
* @description: 编辑银行
* @param {*} data
* @author:
*/
export function update (data) {
return request({
url: SERVER.SERVERAPI + '/rest/sys/company/update',
method: 'post',
data
})
}
/**
* @description: 添加企业
* @param {*} data
......
<!--
* @Description:
* @Autor: renchao
* @LastEditTime: 2023-07-25 16:08:48
* @LastEditTime: 2023-09-11 10:01:32
-->
<template>
<el-image-viewer :on-close="closeViewer" :url-list="urlList">
......
<!--
* @Description:
* @Autor: renchao
* @LastEditTime: 2023-08-15 10:01:26
* @LastEditTime: 2023-09-11 10:18:11
-->
<template>
<transition name="msgbox-fade">
......@@ -158,7 +158,7 @@
}
.mask-content {
padding: 5px 20px 50px 20px;
padding: 5px 20px 30px 20px;
width: 100%;
min-height: 20%;
max-height: 90vh;
......
/*
* @Description: 弹框组件的封装
* @Autor: renchao
* @LastEditTime: 2023-07-12 09:58:13
* @LastEditTime: 2023-09-11 10:38:44
*/
import ywPopup from '@/components/ywPopup/index'
import Popup1 from '@/components/Popup1/index'
......@@ -49,7 +49,7 @@ export function popupDialog (title, url, params, width = '75%', isMain, height,
* @param {*} cancel
* @author: renchao
*/
export function ywPopupDialog (title, url, params, width = '75%', isMain, height, btnShow = true, callback, cancel) {
export function ywPopupDialog (title, url, params, width = '75%', isMain, btnShow = true, height, callback, cancel) {
// Popup.install
ywPopup(title, url, {
height: height,
......@@ -63,7 +63,7 @@ export function ywPopupDialog (title, url, params, width = '75%', isMain, height
confirm: () => {
callback()
},
popupDialog: popupDialog // 将 popupDialog 方法传递给弹框组件
popupDialog: ywPopupDialog // 将 popupDialog 方法传递给弹框组件
})
}
......@@ -80,5 +80,5 @@ export function popupCacel () {
* @author: renchao
*/
export function ywPopupCacel () {
ywPopupDialog().close()
ywPopup().close()
}
......
......@@ -78,7 +78,7 @@
<script>
import store from '@/store/index.js'
import { addQy } from "@/api/xxba.js"
import { addQy, update } from "@/api/xxba.js"
import clxx from './clxx/index.vue'
export default {
props: {
......@@ -100,7 +100,6 @@
ruleForm: {
batchno: '',
djjg: '',
operator: '超级管理员',
operationtime: '',
bz: '',
zsstarno: '',
......@@ -143,16 +142,20 @@
],
rksj: [
{ required: true, message: '请选择入库时间', trigger: 'change' }
],
},
]
}
}
},
mounted () {
if (this.formData.bsmBatch) {
this.tableForm[0].bs = null;
this.tableForm[1].bs = null;
this.getDetailInfo(this.formData.bsmBatch);
} else { }
this.getDetailInfo(this.formData.bsmBatch)
}
let list = Object.keys(this.formData).length
if (list > 0) {
this.ruleForm = this.formData
}
},
methods: {
handleClick () { },
......@@ -161,24 +164,41 @@
* @author: renchao
*/
submitForm () {
let list = Object.keys(this.formData).length
this.tableForm.forEach((item, index) => {
if (item.bs < 0) {
return;
}
})
addQy(this.ruleForm).then(res => {
if (res.code == 200) {
this.$message.success('保存成功')
this.$emit("input", false);
this.$refs['ruleForm'].resetFields();
this.resetTableFields();
this.closeDialog();
//刷新列表
store.dispatch('user/reWorkFresh', true)
} else {
this.$message.error(res.message);
}
})
if (list > 0) {
update(this.ruleForm).then(res => {
if (res.code == 200) {
this.$message.success('保存成功')
this.$emit("input", false);
this.$refs['ruleForm'].resetFields();
this.resetTableFields();
this.closeDialog();
//刷新列表
store.dispatch('user/reWorkFresh', true)
} else {
this.$message.error(res.message);
}
})
} else {
addQy(this.ruleForm).then(res => {
if (res.code == 200) {
this.$message.success('保存成功')
this.$emit("input", false);
this.$refs['ruleForm'].resetFields();
this.resetTableFields();
this.closeDialog();
//刷新列表
store.dispatch('user/reWorkFresh', true)
} else {
this.$message.error(res.message);
}
})
}
},
/**
* @description: 获取详情信息
......
<!--
* @Description:
* @Autor: renchao
* @LastEditTime: 2023-09-07 16:13:07
* @LastEditTime: 2023-09-11 13:35:33
-->
<template>
<div class="clmlmx-box">
<lb-table :column="column" :key="key" :heightNumSetting="true" :calcHeight="600" :pagination="false" :data="tableData">
</lb-table>
<div class="text-center">
<el-button @click="$popupCacel">取消</el-button>
<el-button @click="handleCancel">取消</el-button>
<el-button type="primary" @click="handleSubmit" :loading="loading" v-if="formData.ableOperation && tableData.length>0">保存</el-button>
</div>
</div>
......@@ -16,6 +16,7 @@
<script>
import Vue from 'vue'
import store from '@/store/index.js'
import { ywPopupCacel } from "@/utils/popup.js";
import { InitClml, updateClml, deleteSjClml, moveClml } from "@/api/clxx.js";
export default {
props: {
......@@ -123,10 +124,10 @@
label: "扫描页数",
width: "80",
render: (h, scope) => {
if (scope.row.children && scope.row.children.length > 0) {
if (scope.row.count && scope.row.count > 0) {
return (
<div>
<span>{scope.row.children.length}</span>
<span>{scope.row.count}</span>
</div>
);
} else {
......@@ -184,6 +185,9 @@
}
},
methods: {
handleCancel () {
ywPopupCacel()
},
handleSubmit () {
this.loading = true
updateClml(this.tableData).then(res => {
......
<!--
* @Description:
* @Autor: renchao
* @LastEditTime: 2023-09-08 14:49:24
* @LastEditTime: 2023-09-11 14:01:06
-->
<template>
<div class="rlPopup">
......@@ -14,7 +14,7 @@
<div class="img-list-wrap">
<img src="http://127.0.0.1:38088/video=stream&camidx=0" v-if="isScan" alt="高拍仪">
<div v-for="(img, i) in previewImg.imgList" :key="i" v-else>
<photo-zoom :url="img.fjurl" :bigWidth="165" v-if="i === previewImg.index" :scale="2"
<photo-zoom :url="img.fileurl" :bigWidth="165" v-if="i === previewImg.index" :scale="2"
overlayStyle="width: 100%;height:100%">
</photo-zoom>
</div>
......@@ -53,7 +53,7 @@
<script>
import PhotoZoom from '@/components/PhotoZoom'
import { getAltimeterInfo, getUuid } from '@/utils/operation.js'
import { uploadBatch, deleteClmx } from "@/api/company.js"
import { uploadBatch, deleteFile } from "@/api/company.js"
import publicPicture from '@/components/publicPicture/index.vue'
export default {
name: 'PreviewImage',
......@@ -93,11 +93,8 @@
previewImg: {
handler (newValue, oldValue) {
if (newValue.imgList && newValue.imgList.length > 0) {
this.allLi = _.cloneDeep(newValue.imgList).map(item => item.fjurl)
this.allLi = _.cloneDeep(newValue.imgList).map(item => item.fileurl)
this.thumbnailImages = newValue.imgList
this.thumbnailImages.forEach(item => {
item.fjurl = item.fileurl
})
} else {
this.allLi = []
this.thumbnailImages = []
......@@ -111,9 +108,6 @@
this.maxLength = 0;
this.allLi = _.cloneDeep(this.previewImg.imgList).map(item => item.fjurl)
this.thumbnailImages = this.previewImg.imgList
this.thumbnailImages.forEach(item => {
item.fjurl = item.fileurl
})
},
computed: {
isFirst () {
......@@ -275,9 +269,12 @@
return;
}
formData.append("bsmMaterial", this.previewImg.bsmMaterial);
if (this.previewImg.imgList.length > 0) {
formData.append("index", this.previewImg.index + 1);
}
uploadBatch(formData).then((res) => {
if (res.code == 200) {
this.$emit('updateList', res.result)
this.$emit('updateList', { children: res.result, bsmMaterial: this.previewImg.bsmMaterial })
this.$message({
message: '上传成功!',
type: 'success'
......@@ -299,10 +296,10 @@
cancelButtonText: '取消',
type: 'warning'
}).then(async () => {
let bsmClmx = this.previewImg.imgList[this.previewImg.index].bsmClmx
let bsmFile = this.previewImg.imgList[this.previewImg.index].bsmFile
let bsmMaterial = this.previewImg.imgList[this.previewImg.index].bsmMaterial
this.previewImg.imgList = this.previewImg.imgList.filter(item => item.bsmClmx != bsmClmx)
deleteClmx(bsmClmx).then(res => {
this.previewImg.imgList = this.previewImg.imgList.filter(item => item.bsmFile != bsmFile)
deleteFile(bsmFile).then(res => {
if (res.code == 200) {
that.$emit('updateList', { children: this.previewImg.imgList, bsmMaterial: bsmMaterial })
that.$message({
......
<!--
* @Description:
* @Autor: renchao
* @LastEditTime: 2023-09-08 15:02:18
* @LastEditTime: 2023-09-11 13:52:42
-->
<template>
<div class="clxx">
......@@ -33,7 +33,8 @@
:class="['child', treeCheckId == item.bsmMaterial ? 'checked' : '']"
@click="treeClick(item, index)">
{{ item.clmc }}
<span class="cl_number" :key="key">({{ item.sxh }})</span>
<span class="cl_number" :key="key" v-if="item.count">({{ item.count }})</span>
<span class="cl_number" :key="key" v-else>(0)</span>
</div>
</div>
</div>
......@@ -57,6 +58,7 @@
</template>
<script>
import store from '@/store/index.js'
import { ywPopupDialog, ywPopupCacel } from "@/utils/popup.js";
import clxxAddDialog from "./dialog/clxxAddDialog.vue";
import clxxDetailDialog from "./dialog/clxxDetailDialog.vue";
import imagePreview from "./dialog/imagePreview.vue";
......@@ -84,9 +86,9 @@
bsmMaterial: "",
index: 0,
selectedIndex: 0,
imgList: [],
},
};
imgList: []
}
}
},
created () {
this.clmlInitList();
......@@ -181,7 +183,7 @@
this.title = item.sjmc;
this.titleYs = 1;
this.titleNum = item.children.length;
// this.previewImg.imgList = item.children;
this.previewImg.imgList = item.children;
this.previewImg.bsmMaterial = item.bsmMaterial;
},
/**
......@@ -191,14 +193,14 @@
*/
updateList (val) {
let that = this;
if (val.length != 0) {
if (val.children.length != 0) {
//删除最后一张图片时 val=null
this.tableData.forEach((item) => {
if (item.bsmMaterial === val.bsmMaterial) {
item.ys = val.length
if (item.bsmMaterial == val.bsmMaterial) {
item.count = val.children.length
}
});
this.previewImg.imgList = _.cloneDeep(val);
this.previewImg.imgList = _.cloneDeep(val.children);
if (this.previewImg.index == this.previewImg.imgList.length) {
this.previewImg.index = this.previewImg.index - 1;
}
......@@ -207,7 +209,7 @@
this.previewImg.imgList = [];
this.tableData.forEach((item, index) => {
if (this.treeCheckId == item.bsmMaterial) {
item.ys = 0;
item.count = 0;
that.treeCheckIndex = index;
}
})
......@@ -270,15 +272,9 @@
//查看明细
viewDetail () {
store.dispatch("user/reWorkFresh", false);
this.$popupDialog(
"申请材料目录",
"workflow/components/dialog/clxxDetailDialog",
{
data: this.tableData,
},
"60%",
true
);
ywPopupDialog("申请材料目录", "xxba/components/clxx/dialog/clxxDetailDialog", {
data: this.tableData,
}, "60%", true, false)
},
//设置tableData
setTableData (tableData) {
......
<!--
* @Description:
* @Autor: renchao
* @LastEditTime: 2023-09-08 09:30:08
* @LastEditTime: 2023-09-11 11:23:49
-->
<template>
<div class="from-clues">
......
<!--
* @Description:
* @Autor: renchao
* @LastEditTime: 2023-09-11 09:54:24
* @LastEditTime: 2023-09-11 09:55:52
-->
<template>
<div class="from-clues">
......@@ -134,9 +134,15 @@
</el-table-column>
<el-table-column
property="fwjgmc"
width="100"
label="房屋结构">
<template slot-scope="scope">
<el-tooltip effect="dark" :content="scope.row.fwjgmc" placement="top" popper-class="tooltip-width">
<span class="ellipsis-table"> {{scope.row.fwjgmc}}</span>
</el-tooltip>
</template>
</el-table-column>
<el-table-column
property="jzmj"
label="房屋面积(㎡)">
......