master
xy 2 years ago
parent 5d776df829
commit 42a4da5d61

@ -27,8 +27,8 @@ export default {
if(!newVal) return
let info = {
...newVal,
latitude: newVal.location.lat,
longitude: newVal.location.lng,
latitude: newVal.latitude,
longitude: newVal.longitude,
}
let res = ''
if(typeof this.resultFormat === 'string') {
@ -44,6 +44,7 @@ export default {
}
res = obj;
}
console.log(res)
this.$emit('input', res)
},
value(newVal) {

@ -38,10 +38,10 @@ export class CreateDialog {
if (info.edit_input === "file" || info.edit_input === "files") {
props.fileList = that.file[info.field];
props.beforeUpload = (file) => {
if (file.size / 1000 > 500) {
if (file.size / 1000 > (50 * 1024)) {
that.$message({
type: "warning",
message: "上传图片大小超过500kb",
message: "上传图片大小超过50M",
});
return false;
}

@ -10,6 +10,9 @@
style="width: 400px"
ref="upload"
multiple
:headers="{
Authorization: `Bearer ${getToken()}`,
}"
:on-success="successHandle"
:before-upload="uploadBefore"
:before-remove="beforeRemove"
@ -35,6 +38,7 @@
<script>
import { save, index, destroy } from "@/api/system/baseForm";
import { getToken } from '@/utils/auth'
export default {
props: {},
data() {
@ -71,6 +75,7 @@ export default {
};
},
methods: {
getToken,
show() {
this.isShow = true;
},

@ -13,29 +13,37 @@
:on-success="successHandle"
:before-upload="uploadBefore"
:before-remove="beforeRemove"
accept=".jpg,.png,.gif"
accept=".jpg,.jpeg,.png,.gif,.PDF,.pdf, .doc, .docx, .xls, .xlsx"
:action="action"
:file-list="fileList"
:on-remove="removeHande"
:limit="100"
list-type="picture"
:headers="{
Authorization: `Bearer ${getToken()}`,
}"
>
<template #file="{ file }">
<div style="display: flex;align-items: center;">
<i :style="{ 'color': file.status === 'success' ? 'green' : '' }" :class="{ 'el-icon-circle-check': file.status === 'success','el-icon-loading': file.status === 'uploading' }"></i>
<a href="javascript:" style="flex: 1;margin-left: 6px;" @click="openDownload(file)">{{ file.name }}</a>
<i class="el-icon-close" @click="deleteFile(file)"></i>
</div>
</template>
<el-button slot="trigger" size="small" type="primary"
>选取文件
</el-button
>
<div slot="tip" class="el-upload__tip">
只能上传jpg/png/gif文件
<br/>单个文件不能超过50M
</div>
</el-upload>
</Modal>
</div>
</template>
<script>
import { save, index, destroy } from '@/api/system/baseForm'
import { getToken } from '@/utils/auth'
export default {
props: {},
@ -69,10 +77,11 @@ export default {
message: '请上传文件'
}
]
}
},
}
},
methods: {
getToken,
show() {
this.isShow = true
},
@ -127,7 +136,7 @@ export default {
},
uploadBefore(file) {
console.log(file)
if (file.size / 1000 > 50 * 1024) {
if ((file.size / 1000) > (50 * 1024)) {
this.$message({
type: 'warning',
message: '上传图片大小超过50M'
@ -165,6 +174,7 @@ export default {
}
})
this.$integrateData(this.form, res)
console.log(this.fileList)
},
submit(response) {
@ -182,6 +192,30 @@ export default {
message: '附件上传成功'
})
})
},
openDownload (file) {
window.open(file.url)
},
deleteFile (file) {
this.$confirm('此操作将永久删除该文件, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(res => {
if (file.response?.id) {
destroy({
table_name: "asset_file_files",
id: file.response.id
}).then(res => {
this.$message({
type: 'success',
message: '删除成功'
})
this.getDetail()
})
}
})
}
},
watch: {

@ -76,7 +76,7 @@
>
<div
v-for="item in /\/land/g.test($route.path) ? detail.id_asset_file_files_land_id_relation : detail.id_asset_file_files_house_id_relation"
style="display: flex; justify-content: space-between"
style="display: flex; justify-content: space-between;margin-bottom: 4px;"
>
<a :download="item.url">{{ item.original_name }}</a>
<div>
@ -529,7 +529,21 @@ export default {
},
contentFormat() {
return function (i) {
let { _relations } = i;
let { field, _relations } = i;
if (field === 'bufuqingkuang') {
if ((this.detail.tudiquanshuren !== this.detail.quanliren) ||
(this.detail.dengjimianji !== this.detail.shijimianji)) {
let text = ""
text += this.detail.tudiquanshuren !== this.detail.quanliren
? " 权利人名称不符 "
: ""
text += this.detail.dengjimianji !== this.detail.shijimianji
? " 登记面积不符 "
: ""
return text;
}
return "无"
}
if (_relations && _relations.link_table_name) {
if (
_relations.link_relation === "hasOne" ||

@ -673,14 +673,17 @@
&-item {
cursor: pointer;
display: flex;
align-items: center;
align-items: flex-start;
justify-content: space-between;
padding-left: 16px;
position: relative;
& > span + span {
text-align: right;
color: #999;
zoom: .9;
flex-basis: 90px;
flex-shrink: 0;
}
&::before {
content: '';

Loading…
Cancel
Save