fix: BUG修改

This commit is contained in:
kun 2024-04-21 09:50:53 +08:00
parent 13ce4f5397
commit 18a7dc4759
2 changed files with 129 additions and 105 deletions

View File

@ -9,7 +9,8 @@
<view class="searchBox"> <view class="searchBox">
<form @submit="formSubmit"> <form @submit="formSubmit">
<view class="uni-form-item"> <view class="uni-form-item">
<input class="uni-input" name="searchName" v-model="searchName" @input="searchFile" placeholder="请输入文件名" /> <input class="uni-input" name="searchName" v-model="searchName" @input="searchFile"
placeholder="请输入文件名" />
<button class="mini-btn" type="primary" size="mini" @click="loadData">搜索</button> <button class="mini-btn" type="primary" size="mini" @click="loadData">搜索</button>
<!-- <uni-icons class="search-icon" type="search" @click="loadData"></uni-icons> --> <!-- <uni-icons class="search-icon" type="search" @click="loadData"></uni-icons> -->
</view> </view>
@ -39,7 +40,9 @@
<script> <script>
import headers from '../../components/headers/headers.vue' import headers from '../../components/headers/headers.vue'
export default { export default {
components:{headers}, components: {
headers
},
data() { data() {
return { return {
searchName: '', searchName: '',
@ -81,11 +84,17 @@
}, },
loadData() { loadData() {
var json = { var json = {
companySn: JSON.parse(uni.getStorageSync('userInfo')).headquartersSn, // companySn: JSON.parse(uni.getStorageSync('userInfo')).headquartersSn,
fileName: this.searchName, fileName: this.searchName,
pageNo: 1, pageNo: 1,
pageSize: 100 pageSize: 100
} }
if ([2, 3, 4, 7].includes(JSON.parse(uni.getStorageSync('userInfo')).accountType)) {
json.companySn = JSON.parse(uni.getStorageSync('userInfo')).sn
}
if ([5, 6, 10].includes(JSON.parse(uni.getStorageSync('userInfo')).accountType)) {
json.projectSn = JSON.parse(uni.getStorageSync('userInfo')).sn
}
var that = this var that = this
this.sendRequest({ this.sendRequest({
url: "xmgl/companyFile/list", url: "xmgl/companyFile/list",
@ -147,9 +156,11 @@
background-color: white; background-color: white;
height: 100%; height: 100%;
} }
.searchBox { .searchBox {
background-color: white; background-color: white;
} }
.uni-input { .uni-input {
border-radius: 15px; border-radius: 15px;
margin: 10px 10px; margin: 10px 10px;
@ -160,6 +171,7 @@
font-size: 14px; font-size: 14px;
width: 65%; width: 65%;
} }
.fileItem { .fileItem {
font-size: 15px; font-size: 15px;
display: flex; display: flex;
@ -169,22 +181,27 @@
margin: 0 10px; margin: 0 10px;
color: $uni-text-color; color: $uni-text-color;
border-bottom: 1px solid rgba(221, 221, 221, 0.8); border-bottom: 1px solid rgba(221, 221, 221, 0.8);
.left { .left {
display: flex; display: flex;
align-items: center; align-items: center;
} }
.fileIcon { .fileIcon {
width: 20px; width: 20px;
height: 22px; height: 22px;
margin-right: 10px; margin-right: 10px;
} }
.ellipsis { .ellipsis {
width: 20px; width: 20px;
height: 5px; height: 5px;
} }
} }
.uni-form-item { .uni-form-item {
position: relative; position: relative;
.search-icon { .search-icon {
position: absolute; position: absolute;
top: 50%; top: 50%;
@ -192,6 +209,7 @@
transform: translateY(-50%); transform: translateY(-50%);
} }
} }
.mini-btn { .mini-btn {
position: absolute; position: absolute;
right: 6px; right: 6px;

View File

@ -81,11 +81,17 @@
}, },
loadData(){ loadData(){
var json={ var json={
companySn: JSON.parse(uni.getStorageSync('userInfo')).headquartersSn, // companySn: JSON.parse(uni.getStorageSync('userInfo')).headquartersSn,
fileName: this.searchName, fileName: this.searchName,
pageNo: 1, pageNo: 1,
pageSize: 100 pageSize: 100
} }
if ([2, 3, 4, 7].includes(JSON.parse(uni.getStorageSync('userInfo')).accountType)) {
json.companySn = JSON.parse(uni.getStorageSync('userInfo')).sn
}
if ([5, 6, 10].includes(JSON.parse(uni.getStorageSync('userInfo')).accountType)) {
json.projectSn = JSON.parse(uni.getStorageSync('userInfo')).sn
}
var that = this var that = this
this.sendRequest({ this.sendRequest({
url: "xmgl/companyFile/list", url: "xmgl/companyFile/list",