master
xy 2 years ago
parent abc491af29
commit fd994f3b53

@ -151,6 +151,10 @@ export default {
type: Boolean,
default: false
},
moreAuths: {
type: Array,
default: () => ['edit','delete']
},
btnWidth: {
type: Number,
default: 220,
@ -587,7 +591,7 @@ export default {
if (command === 'edit') {
this.editorClick(scope.row)
}
if (command === 'delete') {
else if (command === 'delete') {
let that = this
this.$confirm("确认删除吗?",{
beforeClose(action,instance,done){
@ -605,6 +609,8 @@ export default {
})
this.load()
})
} else {
this.$emit(command, scope.row)
}
}
}}>
@ -620,8 +626,13 @@ export default {
{
(() => {
let dom = [];
this.moreAuths.forEach(i => {
this.$scopedSlots[i] ? dom.push((<el-dropdown-item command={i}>{ this.$scopedSlots[i](scope) }</el-dropdown-item>)) : ''
})
if (this.auths.indexOf('edit') !== -1) {
dom.push(<el-dropdown-item command="edit">编辑</el-dropdown-item>)
dom.push(<el-dropdown-item divided command="edit">编辑</el-dropdown-item>)
}
if (this.auths.indexOf('delete') !== -1) {
dom.push(<el-dropdown-item command="delete">删除</el-dropdown-item>)
@ -731,7 +742,7 @@ export default {
{ (() => {
let dom = [];
_this.auths.forEach((item, index) => {
if (this.btnToMore && ['edit','delete'].find(j => j === item)) return
if (this.btnToMore && _this.moreAuths.find(j => j === item)) return
if (_this.$scopedSlots[item]) {
flag = index;
dom.push(_this.$scopedSlots[item](scope, item, index));

@ -24,7 +24,7 @@
>选取文件</el-button
>
<div slot="tip" class="el-upload__tip">
只能上传jpg/png文件且不超过500kb
只能上传jpg/png/gif文件
<br />单个文件不能超过50M
</div>
</el-upload>
@ -152,7 +152,7 @@ export default {
page_size: 999,
filter: [
{
key: 'asset_id',
key: /\/land/g.test(this.$route.path) ? 'land_id' : 'house_id',
op: 'eq',
value: this.id
}
@ -172,7 +172,7 @@ export default {
save({
table_name: 'assets_atlas_files',
file_id: response.id,
asset_id: this.id,
[/\/land/g.test(this.$route.path) ? 'land_id' : 'house_id']: this.id,
name: response.name,
original_name: response.original_name,
//TODO:

@ -272,10 +272,11 @@
:destroy-req-opt="select"
:table-item="table"
:btn-to-more="true"
:more-auths="['edit','delete','picture']"
@detail="
(row) => {
$router.push({
path: '/assetsDetail',
path: '/houseDetail/' + row.id,
query: {
id: row.id,
},
@ -289,6 +290,10 @@
$refs['dialog'].show();
}
"
@picture="(row) => {
$refs['atlas'].setId(row.id);
$refs['atlas'].show();
}"
>
<template #leave="{ row }">
<Button
@ -305,11 +310,8 @@
</template>
<template #picture="{ row }">
<Button
size="small"
type="primary"
@click="$refs['atlas'].setId(row.id), $refs['atlas'].show()"
>图集</Button
<span
>图集</span
>
</template>
</xy-table>
@ -323,6 +325,7 @@
</add>
<addHistory ref="addHistory"></addHistory>
<lease ref="lease"></lease>
<atlas ref="atlas"></atlas>
<!-- <imports-->
<!-- :table-name="customForm.tableName"-->
<!-- :form-info="form"-->
@ -351,6 +354,7 @@ import LxHeader from "@/components/LxHeader/index.vue";
import headerContent from "@/components/LxHeader/XyContent.vue";
import addHistory from "@/views/assets/component/addHistory.vue";
import lease from '@/views/assets/lease.vue'
import atlas from '@/views/assets/atlas.vue'
// import drawer from "@/views/component/drawer.vue";
// import imports from "./imports.vue";
// import atlas from "@/views/assets/atlas.vue";
@ -358,6 +362,7 @@ import lease from '@/views/assets/lease.vue'
export default {
name: "tableList",
components: {
atlas,
lease,
LxHeader,
add,

@ -248,11 +248,12 @@
:destroy-req-opt="select"
:table-item="table"
:btn-to-more="true"
:more-auths="['edit','delete','picture']"
@detail="
(row) => {
$router.push({
path: '/assetsDetail',
query: {
path: 'landDetail/' + row.id,
params: {
id: row.id
}
})
@ -265,6 +266,10 @@
$refs['dialog'].show();
}
"
@picture="(row) => {
$refs['atlas'].setId(row.id);
$refs['atlas'].show();
}"
>
<template #leave="{ row }">
<Button
@ -285,11 +290,8 @@
</template>
<template #picture="{row}">
<Button
size="small"
type="primary"
@click="$refs['atlas'].setId(row.id),$refs['atlas'].show()"
>图集</Button
<span
>图集</span
>
</template>
</xy-table>
@ -303,6 +305,7 @@
</add>
<history ref="history"></history>
<lease ref="lease"></lease>
<atlas ref="atlas"></atlas>
<!-- <drawer-->
<!-- :table-name="customForm.tableName"-->
<!-- :form-info="form"-->
@ -314,7 +317,6 @@
<!-- ref="imports"-->
<!-- @refresh="$refs['xyTable'].getTableData()"-->
<!-- ></imports>-->
<!-- <atlas ref="atlas"></atlas>-->
<!-- <assetsHistoryList ref="assetsHistoryList"></assetsHistoryList>-->
</div>
</template>
@ -338,7 +340,7 @@ import history from '@/views/assets/history.vue';
import lease from '@/views/assets/lease.vue';
// import drawer from "@/views/component/drawer.vue";
// import imports from "./imports.vue";
// import atlas from "@/views/assets/atlas.vue";
import atlas from "@/views/assets/atlas.vue";
// import assetsHistoryList from '@/views/assets/assetsHistoryList.vue'
export default {
name: 'tableList',
@ -347,11 +349,11 @@ export default {
add,
headerContent,
history,
lease
lease,
atlas,
// drawer,
// imports,
// atlas,
// assetsHistoryList
},
mixins: [authMixin],
@ -803,4 +805,5 @@ a:hover {
color: red;
text-decoration: underline;
}
</style>

@ -1,10 +1,7 @@
<template>
<div>
<el-page-header
:content="
$route.meta.title +
(detail.dikuaimingcheng ? ' - ' + detail.dikuaimingcheng : '')
"
:content="$route.meta.title"
style="
padding: 1em;
font-size: 1em;
@ -17,12 +14,15 @@
>
</el-page-header>
<el-row :gutter="20">
<el-col :span="14">
<el-row :gutter="24">
<el-col :span="21">
<el-card
id="detail-pictures"
v-if="
detail.id_assets_atlas_files_asset_id_relation &&
detail.id_assets_atlas_files_asset_id_relation.length > 0
(detail.id_assets_atlas_files_house_id_relation &&
detail.id_assets_atlas_files_house_id_relation.length > 0) ||
(detail.id_assets_atlas_files_land_id_relation &&
detail.id_assets_atlas_files_land_id_relation.length > 0)
"
>
<div class="el-descriptions__header el-descriptions__title">
@ -30,7 +30,7 @@
</div>
<el-carousel trigger="click" height="150px">
<el-carousel-item
v-for="item in detail.id_assets_atlas_files_asset_id_relation"
v-for="item in (detail.id_assets_atlas_files_house_id_relation || detail.id_assets_atlas_files_land_id_relation)"
>
<el-image
style="width: 100%; height: 100%"
@ -57,7 +57,7 @@
</el-descriptions>
</el-card>
<el-card>
<el-card id="detail-files">
<div class="el-descriptions__header el-descriptions__title">
资产相关附件
</div>
@ -68,11 +68,26 @@
detail.id_assets_file_files_file_id_relation.length > 0
"
>
<div v-for="item in detail.id_assets_file_files_file_id_relation" style="display: flex;justify-content: space-between;">
<div
v-for="item in detail.id_assets_file_files_file_id_relation"
style="display: flex; justify-content: space-between"
>
<a :download="item.url">{{ item.original_name }}</a>
<div>
<el-button type="primary" icon="el-icon-download" circle size="mini" @click="down(item)"></el-button>
<el-button type="primary" icon="el-icon-search" circle size="mini" @click="open(item.url)"></el-button>
<el-button
type="primary"
icon="el-icon-download"
circle
size="mini"
@click="down(item)"
></el-button>
<el-button
type="primary"
icon="el-icon-search"
circle
size="mini"
@click="open(item.url)"
></el-button>
</div>
</div>
</template>
@ -82,7 +97,7 @@
</template>
</el-card>
<el-card>
<el-card id="detail-documents">
<div class="el-descriptions__header el-descriptions__title">
资产证件图片
</div>
@ -99,7 +114,11 @@
<el-image
style="width: 100%; height: 100%"
:src="item.url"
:preview-src-list="detail.id_assets_picture_files_file_id_relation.map(i=>i.url)"
:preview-src-list="
detail.id_assets_picture_files_file_id_relation.map(
(i) => i.url
)
"
fit="contain"
></el-image>
</div>
@ -109,11 +128,9 @@
</template>
</template>
</el-card>
</el-col>
<el-col :span="10">
<el-card>
<el-card id="detail-histories">
<div class="el-descriptions__header el-descriptions__title">
资产历史
历史沿革
</div>
<template>
<template v-if="histories && histories.length > 0">
@ -135,7 +152,7 @@
</template>
</template>
</el-card>
<el-card>
<el-card id="detail-assetsMap">
<div class="el-descriptions__header el-descriptions__title">
资产地图
</div>
@ -147,9 +164,22 @@
></div>
</el-card>
</el-col>
<el-col :span="3">
<Anchor show-ink :offset-top="64">
<AnchorLink href="#detail-pictures" title="资产图集" v-if="
(detail.id_assets_atlas_files_house_id_relation &&
detail.id_assets_atlas_files_house_id_relation.length > 0) ||
(detail.id_assets_atlas_files_land_id_relation &&
detail.id_assets_atlas_files_land_id_relation.length > 0)
" />
<AnchorLink href="#detail-files" title="相关附件" />
<AnchorLink href="#detail-documents" title="证件图片" />
<AnchorLink href="#detail-histories" title="历史沿革" />
<AnchorLink href="#detail-assetsMap" title="资产地图" />
</Anchor>
</el-col>
</el-row>
<Modal
:width="76"
transfer
@ -179,7 +209,7 @@ export default {
name: "detail",
data() {
return {
showModal:false,
showModal: false,
codeUri: "",
center: [120.283692, 31.614211],
marker: {},
@ -332,7 +362,7 @@ export default {
});
const detail = await show({
id: this.$route.query.id,
id: this.$route.params.id,
table_name: this.customForm.tableName,
});
this.detail = detail;
@ -352,10 +382,9 @@ export default {
},
],
});
this.histories = res.data.sort(function(a,b){
return new Date(a.riqi).getTime()-new Date(b.riqi).getTime();
this.histories = res.data.sort(function (a, b) {
return new Date(a.riqi).getTime() - new Date(b.riqi).getTime();
});
},
},
@ -426,6 +455,11 @@ a:hover {
color: red;
text-decoration: underline;
}
::v-deep .ivu-anchor-link-title:hover {
transition: all 0.2s;
color: $primaryColor !important;
}
</style>
<style lang="scss">
.map-marker {

Loading…
Cancel
Save