From a071b637e89fccbfde01bc9e4acbd9c6f7482194 Mon Sep 17 00:00:00 2001
From: ludc
Date: 星期四, 26 十月 2023 18:27:33 +0800
Subject: [PATCH] 前端代码打包
---
Source/UBCS-WEB/src/views/integration/applicationForm.vue | 231 +++++++++++++++++++++++++++++++++++++--------------------
1 files changed, 149 insertions(+), 82 deletions(-)
diff --git a/Source/UBCS-WEB/src/views/integration/applicationForm.vue b/Source/UBCS-WEB/src/views/integration/applicationForm.vue
index 7a3c48b..4c11990 100644
--- a/Source/UBCS-WEB/src/views/integration/applicationForm.vue
+++ b/Source/UBCS-WEB/src/views/integration/applicationForm.vue
@@ -1,10 +1,11 @@
<template>
<basic-container>
- <avue-crud :table-loading="loading" :data="data" :option="option" :search.sync="searchParam" :page.sync="page"
+ <avue-crud :table-loading="loading" :data="data" :option="option" :search.sync="searchParam" :page.sync="page" :permission="permissionList"
ref="crud" @refresh-change="getDataList" @search-change="handleSearch" @search-reset="handleReset"
- @size-change="handleSizePage" @current-change="handleCurrentPage" @on-load="getDataList">
+ @size-change="handleSizePage" @current-change="handleCurrentPage" @on-load="getDataList"
+ @selection-change="selectionChange" @row-click="handleRowClick">
<template slot="menuLeft">
- <el-button icon="el-icon-document" size="small" type="primary" @click="handleStatus">闆嗗洟鐢宠鐘舵��
+ <el-button icon="el-icon-document" size="small" type="primary" @click="handleStatus" v-if="permissionList.status">闆嗗洟鐢宠鐘舵��
</el-button>
</template>
</avue-crud>
@@ -12,8 +13,9 @@
</template>
<script>
-import { getList } from '@/api/integration/application.js'
+import { getList, queryApplyStat } from '@/api/integration/application.js'
import { dateFormat } from '@/util/date.js'
+import {mapGetters} from 'vuex'
export default {
data() {
return {
@@ -25,89 +27,119 @@
total: 0
},
searchParam: {},
- option: {
- height: "auto",
- index: true,
- border: true,
- addBtn: false,
- columnBtn: false,
- searchMenuSpan: 8,
- highlightCurrentRow: true,
- menu:false,
- column: [
- {
- label: '鐢宠鍗曞彿',
- prop: 'id',
- width: 300,
- fixed: true,
- search: true,
- }, {
- label: '闆嗗洟鐮�',
- width: 200,
- prop: 'groupCode',
- search: true,
- }, {
- label: '鎿嶄綔绫诲瀷',
- width: 200,
- prop: 'operationType',
- type: 'select',
- search: true,
- dicData: [{
- label: '鐢宠',
- value: 1
- }, {
- label: '鏇存敼',
- value: 2
- }]
- }, {
- label: '鐢宠鍗曟暟鎹俊鎭�',
- width: 300,
- prop: 'description'
- },
- {
- label: '鍒涘缓鏃堕棿',
- width: 200,
- prop: 'createTime',
- type: 'datetime',
- search: true,
- },
- {
- label: '鏇存敼鏃堕棿',
- width: 200,
- prop: 'lastModifyTime',
- type: 'datetime',
- search: true,
- formatter: () => {
-
- }
- }, {
- label: '杩斿洖鏍囪瘑',
- width: 100,
- prop: 'code'
- },
- {
- label: '杩斿洖淇℃伅',
- width: 300,
- prop: 'content'
- },
- {
- label: '娑堟伅淇℃伅',
- width: 300,
- prop: 'msg'
- }
- ]
- }
+ stateParam: {},
}
},
+ computed:{
+ ...mapGetters(["permission"]),
+ permissionList(){
+ return{
+ searchBtn:this.vaildData(this.permission.applicationForm.applicationForm_search,false),
+ emptyBtn:this.vaildData(this.permission.applicationForm.applicationForm_search,false),
+ status:this.vaildData(this.permission.applicationForm.applicationForm_status,false)
+ }
+ },
+ option(){
+ return{
+ height: "auto",
+ tip:false,
+ index: true,
+ border: true,
+ addBtn: false,
+ columnBtn: false,
+ searchBtn:this.permissionList.searchBtn,
+ emptyBtn:this.permissionList.emptyBtn,
+ searchMenuSpan: 8,
+ highlightCurrentRow: true,
+ menu: false,
+ selection: true,
+ column: [
+ {
+ label: '鐢宠鍗曞彿',
+ prop: 'id',
+ width: 300,
+ fixed: true,
+ search: true,
+ }, {
+ label: '闆嗗洟鐮�',
+ width: 200,
+ prop: 'groupCode',
+ search: true,
+ }, {
+ label: '鎿嶄綔绫诲瀷',
+ width: 200,
+ prop: 'operationType',
+ type: 'select',
+ search: true,
+ dicData: [{
+ label: '鐢宠',
+ value: 1
+ }, {
+ label: '鏇存敼',
+ value: 2
+ }]
+ }, {
+ label: '鐢宠鍗曟暟鎹俊鎭�',
+ width: 300,
+ prop: 'description'
+ },
+ {
+ label: '鍒涘缓鏃堕棿',
+ width: 200,
+ prop: 'createTime',
+ type: 'datetime',
+ search: true,
+ },
+ {
+ label: '鏇存敼鏃堕棿',
+ width: 200,
+ prop: 'lastModifyTime',
+ type: 'datetime',
+ search: true,
+ }, {
+ label: '杩斿洖鏍囪瘑',
+ width: 100,
+ prop: 'code'
+ },
+ {
+ label: '杩斿洖淇℃伅',
+ width: 300,
+ prop: 'content'
+ },
+ {
+ label: '娑堟伅淇℃伅',
+ width: 300,
+ prop: 'msg'
+ }
+ ]
+ }
+ }
+ },
methods: {
- handleStatus() {
-
+ async handleStatus() {
+ const { oids } = this.stateParam
+ if (this.$utilFunc.isEmpty(oids)) {
+ this.$message({
+ type: "error",
+ message: "璇疯嚦灏戦�夋嫨涓�鏉℃暟鎹�!"
+ })
+ } else {
+ console.log(this.stateParam)
+ const response = await queryApplyStat(this.stateParam)
+ if (response.status === 200) {
+ console.log(response)
+ }
+ }
},
async getDataList() {
this.loading = true
- console.log(this.searchParam)
const { pageSize, currentPage, total } = this.page
let param = { size: pageSize, current: currentPage }
+ console.log(this.searchParam)
+ this.searchParam = Object.keys(this.searchParam)
+ .filter((key) => this.searchParam[key] !== null && this.searchParam[key] !== undefined && this.searchParam[key] !== "")
+ .reduce((acc, key) => ({ ...acc, [key]: this.searchParam[key] }), {});
+ console.log(this.searchParam)
const response = await getList({ ...param, ...this.searchParam })
if (response.status === 200) {
this.loading = false
@@ -125,8 +157,10 @@
},
handleReset() {
this.searchParam = {}
+ this.getDataList()
},
handleSearch(form, done) {
+ console.log(form)
const { id, groupCode, operationType } = form
let dataTime = { id, groupCode, operationType }
if (form.hasOwnProperty('createTime')) {
@@ -135,12 +169,45 @@
if (form.hasOwnProperty('lastModifyTime')) {
dataTime = { lastModifyTime: dateFormat(form.lastModifyTime), ...dataTime }
}
- console.log(dataTime)
this.searchParam = dataTime
this.page.currentPage = 1
this.getDataList()
done()
- }
+ },
+ selectionChange(list) {
+ console.log(list)
+ let newData = list.map(item => {
+ const { dataOid } = item
+ return dataOid
+ })
+ this.stateParam = { oids: newData.toString() }
+ console.log(newData)
+ },
+ handleRowClick(row) {
+ this.$refs.crud.toggleRowSelection(row, true)
+ },
}
}
-</script>
\ No newline at end of file
+</script>
+<style lang="scss" scoped>
+//鍥哄畾鍒楅珮搴�
+/deep/ .el-table__fixed {
+ height: calc(100vh - 345px)!important;
+}
+// 婊氬姩鏉℃牱寮忎慨鏀�
+// 婊氬姩鏉$殑瀹藉害
+/deep/ .el-table__body-wrapper::-webkit-scrollbar {
+ height: 15px; // 绾靛悜婊氬姩鏉� 蹇呭啓
+ background: white;
+ border: white;
+ width: 10px;
+
+}
+// 婊氬姩鏉$殑婊戝潡
+/deep/ .el-table__body-wrapper::-webkit-scrollbar-thumb {
+ background-color: #ececec;
+ border-radius: 20px;
+ border: #ececec;
+}
+
+</style>
--
Gitblit v1.9.3