|
@@ -0,0 +1,110 @@
|
|
|
+<template>
|
|
|
+ <el-dialog
|
|
|
+ :modal="true"
|
|
|
+ title="登录成功项目"
|
|
|
+ :visible.sync="showDialog"
|
|
|
+ width="70%"
|
|
|
+ :show-close="false"
|
|
|
+ :close-on-click-modal="false"
|
|
|
+ :modal-append-to-body="false"
|
|
|
+ :append-to-body="true"
|
|
|
+ >
|
|
|
+ <div v-if="showDialog">
|
|
|
+ <template-page
|
|
|
+ :pofx="true"
|
|
|
+ ref="pageRefTable"
|
|
|
+ :get-list="getList"
|
|
|
+ :column-parsing="columnParsing"
|
|
|
+ :operation-column-width="200"
|
|
|
+ :table-attributes="tableAttributes"
|
|
|
+ :table-events="tableEvents"
|
|
|
+ :replace-or-not-map="false"
|
|
|
+ ></template-page>
|
|
|
+ </div>
|
|
|
+ <div slot="footer" class="dialog-footer">
|
|
|
+ <el-button size="mini" @click="cancel">取 消</el-button>
|
|
|
+ <el-button size="mini" @click="confirm" type="primary">确 定</el-button>
|
|
|
+ </div>
|
|
|
+ </el-dialog>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+import TemplatePage from '@/components/template/template-page-1.vue'
|
|
|
+import { getLoginHomeDecorationList } from '@/api/homeDecoration'
|
|
|
+export default {
|
|
|
+ mixins: [],
|
|
|
+ components: { TemplatePage },
|
|
|
+ props: {
|
|
|
+ pageType: {
|
|
|
+ type: String,
|
|
|
+ required: true
|
|
|
+ },
|
|
|
+ showDialog: {
|
|
|
+ type: Boolean,
|
|
|
+ required: true
|
|
|
+ },
|
|
|
+ formData: {
|
|
|
+ type: Object,
|
|
|
+ default: () => ({})
|
|
|
+ }
|
|
|
+ },
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ // 表格属性
|
|
|
+ tableAttributes: {
|
|
|
+ // 启用勾选列
|
|
|
+ selectColumn: true,
|
|
|
+ selectable: this.selectable
|
|
|
+ },
|
|
|
+ // 表格事件
|
|
|
+ tableEvents: {
|
|
|
+ 'selection-change': this.selectionChange,
|
|
|
+ select: (selection, row) => {
|
|
|
+ this.$refs.pageRefTable.$refs.zjpage.$refs.tableEl.$refs.tableView.clearSelection()
|
|
|
+ this.$refs.pageRefTable.$refs.zjpage.$refs.tableEl.$refs.tableView.toggleRowSelection(row)
|
|
|
+ }
|
|
|
+ },
|
|
|
+ recordSelected: []
|
|
|
+ }
|
|
|
+ },
|
|
|
+ created() {},
|
|
|
+ watch: {
|
|
|
+ showDialog: {
|
|
|
+ handler(nl, ol) {
|
|
|
+ // console.log(this.pageType, this.formData, 9999)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ computed: {},
|
|
|
+ methods: {
|
|
|
+ selectable(row, index) {
|
|
|
+ if (this.formData.id == row.id) {
|
|
|
+ return false
|
|
|
+ } else {
|
|
|
+ return true
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 表格列解析渲染数据更改
|
|
|
+ columnParsing(item, defaultData) {
|
|
|
+ return defaultData
|
|
|
+ },
|
|
|
+ // 监听勾选变化
|
|
|
+ selectionChange(data) {
|
|
|
+ this.recordSelected = data
|
|
|
+ },
|
|
|
+ getList(...p) {
|
|
|
+ this.recordSelected = []
|
|
|
+ return getLoginHomeDecorationList(...p)
|
|
|
+ },
|
|
|
+ cancel() {
|
|
|
+ this.$emit('cancel')
|
|
|
+ },
|
|
|
+ confirm() {
|
|
|
+ this.$emit('success', this.recordSelected)
|
|
|
+ this.cancel()
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+</script>
|
|
|
+
|
|
|
+<style scoped></style>
|