master
xy 2 years ago
parent 5d776df829
commit 42a4da5d61

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

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

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

@ -13,29 +13,37 @@
:on-success="successHandle" :on-success="successHandle"
:before-upload="uploadBefore" :before-upload="uploadBefore"
:before-remove="beforeRemove" :before-remove="beforeRemove"
accept=".jpg,.png,.gif" accept=".jpg,.jpeg,.png,.gif,.PDF,.pdf, .doc, .docx, .xls, .xlsx"
:action="action" :action="action"
:file-list="fileList" :file-list="fileList"
:on-remove="removeHande" :on-remove="removeHande"
:limit="100" :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 slot="trigger" size="small" type="primary"
>选取文件 >选取文件
</el-button </el-button
> >
<div slot="tip" class="el-upload__tip"> <div slot="tip" class="el-upload__tip">
只能上传jpg/png/gif文件
<br/>单个文件不能超过50M <br/>单个文件不能超过50M
</div> </div>
</el-upload> </el-upload>
</Modal> </Modal>
</div> </div>
</template> </template>
<script> <script>
import { save, index, destroy } from '@/api/system/baseForm' import { save, index, destroy } from '@/api/system/baseForm'
import { getToken } from '@/utils/auth'
export default { export default {
props: {}, props: {},
@ -69,10 +77,11 @@ export default {
message: '请上传文件' message: '请上传文件'
} }
] ]
} },
} }
}, },
methods: { methods: {
getToken,
show() { show() {
this.isShow = true this.isShow = true
}, },
@ -127,7 +136,7 @@ export default {
}, },
uploadBefore(file) { uploadBefore(file) {
console.log(file) console.log(file)
if (file.size / 1000 > 50 * 1024) { if ((file.size / 1000) > (50 * 1024)) {
this.$message({ this.$message({
type: 'warning', type: 'warning',
message: '上传图片大小超过50M' message: '上传图片大小超过50M'
@ -165,6 +174,7 @@ export default {
} }
}) })
this.$integrateData(this.form, res) this.$integrateData(this.form, res)
console.log(this.fileList)
}, },
submit(response) { submit(response) {
@ -182,6 +192,30 @@ export default {
message: '附件上传成功' 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: { watch: {

@ -76,7 +76,7 @@
> >
<div <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" 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> <a :download="item.url">{{ item.original_name }}</a>
<div> <div>
@ -529,7 +529,21 @@ export default {
}, },
contentFormat() { contentFormat() {
return function (i) { 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 && _relations.link_table_name) {
if ( if (
_relations.link_relation === "hasOne" || _relations.link_relation === "hasOne" ||

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

Loading…
Cancel
Save