| | |
| | | <template> |
| | | <basic-container |
| | | :class="[$store.state.control.windowWidth >= 1024 ? 'oneRowSearch' : '']" |
| | | :class="[ |
| | | $store.state.control.screenSize == 1366 ? 'smallSize' : 'normalSize', |
| | | $store.state.control.windowWidth >= 1024 ? 'tooRowSearch1' : '' |
| | | ]" |
| | | > |
| | | <avue-crud |
| | | class="tablesss" |
| | | v-if="visible" |
| | | :option="option" |
| | | :table-loading="loading" |
| | |
| | | getDetail1, |
| | | adddata1, |
| | | update1, |
| | | remove1, |
| | | remove1 |
| | | } from "@/api/securityUnit/securityUnit"; |
| | | import { mapGetters } from "vuex"; |
| | | import { getToken } from "@/util/auth"; |
| | |
| | | pageSize: 10, |
| | | currentPage: 1, |
| | | total: 0, |
| | | ...this.$store.state.control.changePageSize, |
| | | ...this.$store.state.control.changePageSize |
| | | }, |
| | | selectionList: [], |
| | | option: { |
| | |
| | | prop: "shareholder", |
| | | searchLabelWidth: 55, |
| | | search: true, |
| | | labelWidth:130, |
| | | labelWidth: 130 |
| | | }, |
| | | { |
| | | label: "持股比例(%)", |
| | |
| | | { |
| | | required: true, |
| | | validator: validatePassNumber, |
| | | trigger: "blur", |
| | | }, |
| | | trigger: "blur" |
| | | } |
| | | ], |
| | | labelWidth:130, |
| | | labelWidth: 130 |
| | | }, |
| | | { |
| | | label: "出资金额(万元)", |
| | |
| | | { |
| | | required: true, |
| | | validator: validatePassNumber, |
| | | trigger: "blur", |
| | | }, |
| | | trigger: "blur" |
| | | } |
| | | ], |
| | | labelWidth:130, |
| | | labelWidth: 130 |
| | | }, |
| | | { |
| | | label: "出资时间", |
| | |
| | | type: "date", |
| | | format: "yyyy-MM-dd", |
| | | valueFormat: "yyyy-MM-dd", |
| | | labelWidth:130, |
| | | labelWidth: 130 |
| | | }, |
| | | { |
| | | label: "身份证", |
| | | prop: "cardid", |
| | | search: true, |
| | | labelWidth:130, |
| | | labelWidth: 130 |
| | | }, |
| | | { |
| | | label: "联系电话", |
| | | prop: "cell", |
| | | labelWidth:130, |
| | | labelWidth: 130 |
| | | }, |
| | | { |
| | | label: "统一社会信用代码", |
| | |
| | | hide: true, |
| | | addDisplay: false, |
| | | editDisplay: false, |
| | | labelWidth:130, |
| | | }, |
| | | ], |
| | | labelWidth: 130 |
| | | } |
| | | ] |
| | | }, |
| | | data: [], |
| | | excelForm: {}, |
| | |
| | | loadText: "模板上传中,请稍等", |
| | | span: 24, |
| | | propsHttp: { |
| | | res: "data", |
| | | res: "data" |
| | | }, |
| | | tip: "请上传 .xls,.xlsx 标准格式文件", |
| | | action: "/api/shareholder/import-share", |
| | | action: "/api/shareholder/import-share" |
| | | }, |
| | | { |
| | | label: "模板下载", |
| | | prop: "excelTemplate", |
| | | formslot: true, |
| | | span: 24, |
| | | }, |
| | | ], |
| | | }, |
| | | span: 24 |
| | | } |
| | | ] |
| | | } |
| | | }; |
| | | }, |
| | | watch: { |
| | | windowHeight() { |
| | | console.log(this.windowHeight); |
| | | this.option.height = this.windowHeight - 320; |
| | | this.visible = false; |
| | | this.$nextTick(() => { |
| | | this.visible = true; |
| | | this.refreshChange(); |
| | | }); |
| | | }, |
| | | }, |
| | | created() { |
| | | this.option.height = this.windowHeight - 320; |
| | |
| | | // }, |
| | | ids() { |
| | | let ids = []; |
| | | this.selectionList.forEach((ele) => { |
| | | this.selectionList.forEach(ele => { |
| | | ids.push(ele.id); |
| | | }); |
| | | return ids.join(","); |
| | | }, |
| | | } |
| | | }, |
| | | mounted() { |
| | | this.$store.commit("setWindowSizeHeightAdd"); |
| | | }, |
| | | methods: { |
| | | rowSave(row, done, loading) { |
| | | row['deptId'] = this.deptid; |
| | | row["deptId"] = this.deptid; |
| | | adddata1(row).then( |
| | | () => { |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | message: "操作成功!" |
| | | }); |
| | | done(); |
| | | }, |
| | | (error) => { |
| | | error => { |
| | | loading(); |
| | | window.console.log(error); |
| | | } |
| | | ); |
| | | }, |
| | | rowUpdate(row, index, done, loading) { |
| | | row['deptId'] = this.deptid; |
| | | row["deptId"] = this.deptid; |
| | | update1(row).then( |
| | | () => { |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | message: "操作成功!" |
| | | }); |
| | | done(); |
| | | }, |
| | | (error) => { |
| | | error => { |
| | | loading(); |
| | | console.log(error); |
| | | } |
| | |
| | | this.$confirm("确定将选择数据删除?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | type: "warning" |
| | | }) |
| | | .then(() => { |
| | | return remove1(row.id); |
| | |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | message: "操作成功!" |
| | | }); |
| | | }); |
| | | }, |
| | | handleTemplate() { |
| | | window.open( |
| | | `/api/shareholder/export-template?${this.website.tokenHeader}=${getToken()}` |
| | | `/api/shareholder/export-template?${ |
| | | this.website.tokenHeader |
| | | }=${getToken()}` |
| | | ); |
| | | }, |
| | | uploadAfter(res, done, loading, column) { |
| | |
| | | this.$confirm("确定将选择数据删除?", { |
| | | confirmButtonText: "确定", |
| | | cancelButtonText: "取消", |
| | | type: "warning", |
| | | type: "warning" |
| | | }) |
| | | .then(() => { |
| | | return remove1(this.ids); |
| | |
| | | this.onLoad(this.page); |
| | | this.$message({ |
| | | type: "success", |
| | | message: "操作成功!", |
| | | message: "操作成功!" |
| | | }); |
| | | this.$refs.crud.toggleSelection(); |
| | | }); |
| | | }, |
| | | beforeOpen(done, type) { |
| | | if (["edit", "view"].includes(type)) { |
| | | getDetail1(this.form.id).then((res) => { |
| | | getDetail1(this.form.id).then(res => { |
| | | this.form = res.data.data; |
| | | }); |
| | | } |
| | |
| | | page.currentPage, |
| | | page.pageSize, |
| | | Object.assign(params, this.query) |
| | | ).then((res) => { |
| | | ).then(res => { |
| | | const data = res.data.data; |
| | | this.page.total = data.total; |
| | | this.data = data.records; |
| | | this.loading = false; |
| | | this.$store.commit("setWindowSizeHeightAdd"); |
| | | this.selectionClear(); |
| | | }); |
| | | }, |
| | | }, |
| | | } |
| | | } |
| | | }; |
| | | </script> |
| | | |
| | | <style> |
| | | </style> |
| | | <style></style> |