diff --git a/src/components/XyTable/index.vue b/src/components/XyTable/index.vue index a862340..d0a6726 100644 --- a/src/components/XyTable/index.vue +++ b/src/components/XyTable/index.vue @@ -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(({ this.$scopedSlots[i](scope) })) : '' + }) + if (this.auths.indexOf('edit') !== -1) { - dom.push(编辑) + dom.push(编辑) } if (this.auths.indexOf('delete') !== -1) { dom.push(删除) @@ -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)); diff --git a/src/views/assets/atlas.vue b/src/views/assets/atlas.vue index 6990b7f..6415f32 100644 --- a/src/views/assets/atlas.vue +++ b/src/views/assets/atlas.vue @@ -24,7 +24,7 @@ >选取文件
- 只能上传jpg/png文件,且不超过500kb + 只能上传jpg/png/gif文件,
单个文件不能超过50M
@@ -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: 待修改 diff --git a/src/views/assets/house.vue b/src/views/assets/house.vue index df5d613..3f0a2d2 100644 --- a/src/views/assets/house.vue +++ b/src/views/assets/house.vue @@ -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(); + }" > - +
资产证件图片
@@ -99,7 +114,11 @@ @@ -109,11 +128,9 @@
- - - +
- 资产历史 + 历史沿革
- +
资产地图
@@ -147,9 +164,22 @@ >
+ + + + + + + + + -