master
xy 2 years ago
parent abc491af29
commit fd994f3b53

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

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

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

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

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

Loading…
Cancel
Save