From f6d115719f5d5c4aff09fd4f06a8c7b1a1647559 Mon Sep 17 00:00:00 2001 From: yuyu <1981343953@qq.com> Date: 星期四, 24 八月 2023 13:42:24 +0800 Subject: [PATCH] Merge branch 'master' of http://192.168.110.209:9001/r/lims-before --- src/api/inspection/commisioninspection.js | 15 +++ src/api/url.js | 1 src/views/login/index.vue | 6 src/layout/components/Navbar.vue | 26 ++++ src/layout/components/Sidebar/index.vue | 1 src/layout/components/Sidebar/Item.vue | 2 src/layout/components/Sidebar/SidebarItem.vue | 1 src/views/inspectionManagement/commissionInspection/index.vue | 189 ++++++++++++++++++++++++++++++++----- 8 files changed, 204 insertions(+), 37 deletions(-) diff --git a/src/api/inspection/commisioninspection.js b/src/api/inspection/commisioninspection.js index ce4a93f..7a1eb1d 100644 --- a/src/api/inspection/commisioninspection.js +++ b/src/api/inspection/commisioninspection.js @@ -40,4 +40,19 @@ method: 'post', data }) +} + +export function getViewUUID(params){ + return request({ + url: '/link-basic/getViewUUID', + method: 'get', + params + }) +} + +export function selectViewUUID(){ + return request({ + url: '/link-basic/selectViewUUID', + method: 'get' + }) } \ No newline at end of file diff --git a/src/api/url.js b/src/api/url.js index 8849e20..fbaa55b 100644 --- a/src/api/url.js +++ b/src/api/url.js @@ -5,6 +5,7 @@ "reported": "/plan/reported",//涓婃姤 "distribution": "/plan/distribution",//鍒嗛厤 "check": "/plan/check",//妫�楠� + "info": "/user/info",//鐧诲綍-->鑾峰彇鐢ㄦ埛淇℃伅 } export default function(Vue) { diff --git a/src/layout/components/Navbar.vue b/src/layout/components/Navbar.vue index 41a57c4..75fb75b 100644 --- a/src/layout/components/Navbar.vue +++ b/src/layout/components/Navbar.vue @@ -12,7 +12,7 @@ </div> <el-dropdown class="avatar-container" trigger="click"> <div class="avatar-wrapper"> - <a class="user-avatar">{{ '涓ぉ'.slice(0,1) }}</a> + <a class="user-avatar">{{ user.name.slice(0,1) }}</a> </div> <el-dropdown-menu slot="dropdown" class="user-dropdown"> <router-link to="/"> @@ -33,6 +33,12 @@ import { mapGetters } from 'vuex' // import Breadcrumb from '@/components/Breadcrumb' // import Hamburger from '@/components/Hamburger' + import { + get, + post, + wpost, + postFile + } from "@/api/util/requestUtil.js" export default { components: { @@ -45,6 +51,17 @@ 'avatar' ]) }, + data() { + return { + user: { + id: null, + name: 'value' + } + } + }, + mounted() { + this.getUser() + }, methods: { toggleSideBar() { this.$store.dispatch('app/toggleSideBar') @@ -52,7 +69,12 @@ async logout() { // await this.$store.dispatch('user/logout') this.$router.push(`/login?redirect=${this.$route.fullPath}`) - } + }, + getUser(){ + get(this.$url.info).then(res=>{ + this.user = res.data + }) + } } } </script> diff --git a/src/layout/components/Sidebar/Item.vue b/src/layout/components/Sidebar/Item.vue index 7785af0..454e81b 100644 --- a/src/layout/components/Sidebar/Item.vue +++ b/src/layout/components/Sidebar/Item.vue @@ -19,9 +19,7 @@ render(h, context) { const { icon, title } = context.props const vnodes = [] - // console.log(show) // if (!show) return - // console.log(icon, title) if (icon) { if (icon.includes('el-icon')) { vnodes.push(<i class={[icon, 'sub-el-icon']} />) diff --git a/src/layout/components/Sidebar/SidebarItem.vue b/src/layout/components/Sidebar/SidebarItem.vue index e5b588f..498db1c 100644 --- a/src/layout/components/Sidebar/SidebarItem.vue +++ b/src/layout/components/Sidebar/SidebarItem.vue @@ -63,7 +63,6 @@ return {} }, created() { - // console.log(this.item) }, methods: { hasOneShowingChild(children = [], parent) { diff --git a/src/layout/components/Sidebar/index.vue b/src/layout/components/Sidebar/index.vue index e093b2b..1187cbb 100644 --- a/src/layout/components/Sidebar/index.vue +++ b/src/layout/components/Sidebar/index.vue @@ -31,7 +31,6 @@ 'sidebar' ]), routes() { - console.log(this.$router.options.routes); return this.$router.options.routes }, activeMenu() { diff --git a/src/views/inspectionManagement/commissionInspection/index.vue b/src/views/inspectionManagement/commissionInspection/index.vue index 9de7d5f..8f14387 100644 --- a/src/views/inspectionManagement/commissionInspection/index.vue +++ b/src/views/inspectionManagement/commissionInspection/index.vue @@ -244,34 +244,35 @@ // 灏哸llDepartmentNames杞崲涓簅ptions闇�瑕佺殑鏍煎紡 this.options = allDepartmentNames.map(name => ({ value: name, label: name })) - }, - // 鏌ヨ鏂规硶 - async search() { - // 灏嗘悳绱㈡潯浠朵綔涓哄弬鏁颁紶閫掔粰getCommisionList鏂规硶 - let res - if(this.radioValue === 0){ - res = await getCommisionList({ - pageNo: this.currentPage, - pageSize: this.pageSize, - entrustCoding: this.searchData.code, - sampleName: this.searchData.name, - entrusted: this.searchData.department, - }) - }else{ - res = await getCommisionList({ - pageNo: this.currentPage, - pageSize: this.pageSize, - entrustCoding: this.searchData.code, - sampleName: this.searchData.name, - entrusted: this.searchData.department, - inspectionStatus: this.radioValue - }) - } - // console.log(res) - this.commisionTable = res.data.row - this.total = res.data.total - }, + }, + // 鏌ヨ鏂规硶 + async search() { + // 灏嗘悳绱㈡潯浠朵綔涓哄弬鏁颁紶閫掔粰getCommisionList鏂规硶 + let res + if (this.radioValue === 0) { + res = await getCommisionList({ + pageNo: this.currentPage, + pageSize: this.pageSize, + entrustCoding: this.searchData.code, + sampleName: this.searchData.name, + entrusted: this.searchData.department, + }) + } else { + res = await getCommisionList({ + pageNo: this.currentPage, + pageSize: this.pageSize, + entrustCoding: this.searchData.code, + sampleName: this.searchData.name, + entrusted: this.searchData.department, + inspectionStatus: this.radioValue + }) + } + // console.log(res) + this.commisionTable = res.data.row + this.total = res.data.total + }, +<<<<<<< HEAD // 閲嶇疆鏂规硶 reset() { // 閲嶇疆鎼滅储鏉′欢 @@ -325,10 +326,90 @@ } } } +======= + // 閲嶇疆鏂规硶 + reset() { + // 閲嶇疆鎼滅储鏉′欢 + this.searchData.code = '' + this.searchData.name = '' + this.searchData.department = '' + this.radioValue = 0 + // 閲嶆柊鑾峰彇鏁版嵁 + this.getCommisionList() + }, + async radioclick() { + // 澶勭悊鐐瑰嚮radio鐨勬椂闂� + console.log('radioValue', this.radioValue) + if (this.radioValue === 0) { + this.getCommisionList() + } else { + const res = await getCommisionList({ + pageNo: this.currentPage, + pageSize: this.pageSize, + inspectionStatus: this.radioValue + }) + // console.log(res) + this.commisionTable = res.data.row + this.total = res.data.total + } + + }, + // 姣忛〉鏉℃暟鏀瑰彉鏃惰Е鍙� 閫夋嫨涓�椤垫樉绀哄灏戣 + async handleSizeChange(val) { + // console.log(`姣忛〉 ${val} 鏉) + this.currentPage = 1 + this.pageSize = val + if (this.radioValue === 0) { + this.getCommisionList() + } else { + const res = await getCommisionList({ + pageNo: this.currentPage, + pageSize: this.pageSize, + inspectionStatus: this.radioValue + }) + this.commisionTable = res.data.row + this.total = res.data.total + } + }, + // 褰撳墠椤垫敼鍙樻椂瑙﹀彂 璺宠浆鍏朵粬椤� + async handleCurrentChange(val) { + // console.log(`褰撳墠椤�: ${val}`) + this.currentPage = val + if (this.radioValue === 0) { + this.getCommisionList() + } else { + const res = await getCommisionList({ + pageNo: this.currentPage, + pageSize: this.pageSize, + inspectionStatus: this.radioValue + }) + this.commisionTable = res.data.row + this.total = res.data.total + } + }, + goToaddCommision() { + // this.$router.push('/inspectionManagement/commissionInspection/addCommision') + // this.showDetail = true + selectViewUUID({ + day: this.day + }).then(res => { + this.viewId = res.data + }) + } + } + } +>>>>>>> d94af68ec3f6317124df81296b08c7c110641fca </script> <style scoped> + .top-bar { + margin: -25px -15px; + background: #fff; + display: flex; + justify-content: space-between; + padding: 5px 24px 0px 24px; +<<<<<<< HEAD .top-bar{ margin: -25px -15px; background: #fff; @@ -391,5 +472,57 @@ } } } +======= + .sermargin { + margin-right: 60px; + } + } +>>>>>>> d94af68ec3f6317124df81296b08c7c110641fca -</style> + .rightBtn { + background-color: rgb(1, 102, 226); + } + + .library-table { + background-color: #fff; + flex: 1; + margin: 0px -15px; + margin-top: 40px; + display: flex; + flex-direction: column; + + .table-header { + padding: 20px; + display: flex; + justify-content: space-between; + + .el-form-item { + margin-bottom: 30px !important; + } + } + + .table-box { + padding: 0px 20px; + margin-top: 0px; + flex: 1; + background: #fff; + /* padding: 20px 20px 10px 20px; */ + display: flex; + flex-direction: column; + + .el-table { + flex: 1; + } + + >div:nth-child(2) { + display: flex; + justify-content: end; + margin: 10px 0; + } + } + } + + .vue_qr_div{ + text-align: center; + } +</style> \ No newline at end of file diff --git a/src/views/login/index.vue b/src/views/login/index.vue index 567f922..d753b3b 100644 --- a/src/views/login/index.vue +++ b/src/views/login/index.vue @@ -43,10 +43,10 @@ </el-form-item> <el-button :loading="loading" type="primary" style="width:100%;margin-bottom:30px;" @click.native.prevent="handleLogin">Login</el-button> - <div class="tips"> + <!-- <div class="tips"> <span style="margin-right:20px;">username: admin</span> <span> password: any</span> - </div> + </div> --> </el-form> </div> </template> @@ -115,7 +115,7 @@ this.loading = false }) } else { - console.log('error submit!!') + console.log('鐧诲綍澶辫触!') return false } }) -- Gitblit v1.9.3