Commit 26513a03 by zhangzhen

细节优化

parent d7a9e3e3
......@@ -23,7 +23,7 @@ const setParamsData = (data = {},pageData) => {
count: 0,
limit: pageData && pageData.limit? pageData.limit : 10,
offset: pageData && pageData.offset? pageData.offset*pageData.limit : 0,
orderBy: "",
orderBy: pageData && pageData.orderBy? pageData.orderBy:"",
showCount: pageData && pageData.showCount? pageData.showCount : "true"
},
"meta": {
......@@ -127,6 +127,13 @@ export const addDownLoad = (data) => {
return http.post(url, d)
}
export const getProjTreeData = (data) => {
let url = `/service/S_WD_LL_04`
let d = setParamsData(data)
return http.post(url, d)
}
......
<template>
<view class="class_mulu">
<view class="tree_mulu">
<view v-for="(index,ind) in mulunum" :key="ind">
<view class="mulu_frist" @click="fristZhankai(ind)">
<image v-if="fatherToInfo.firstImg!=''" class="fristImg" :src="fatherToInfo.firstImg" mode=""></image>
<text class="ellipsis-text" :style="[{fontSize:fatherToInfo.firstfontsize+'rpx',color:fatherToInfo.firstcolor}]">{{index.courseTitle}}</text>
<image v-if='index.open==false && index.leaf === "0"' class="fristjiantou" :src="fatherToInfo.defaultIcon" mode=""></image>
<image v-if='index.open' class="fristjiantou" :src="fatherToInfo.currentIcon" mode=""></image>
</view>
<view v-if='index.open'>
<view class="mulu_second" v-for="(index2,ind2) in mulunum[ind].courseChapterList" :key="ind2">
<view class="mulu_second_view" @click="muluSecond(ind,ind2)">
<image v-if="fatherToInfo.secondImg!=''" class="fristImg" :src="fatherToInfo.secondImg" mode=""></image>
<text :style="[{fontSize:fatherToInfo.secondfontsize+'rpx',color:fatherToInfo.secondcolor}]">{{index2.ccName}}</text>
<image v-if="index2.secondOpen==false" class="fristjiantou" :src="fatherToInfo.defaultIcon" mode=""></image>
<image v-if="index2.secondOpen==true" class="fristjiantou" :src="fatherToInfo.currentIcon" mode=""></image>
</view>
<view v-if="index2.secondOpen==true" class="mulu_third" v-for="(index3,ind3) in index2.courseVideosList" :key="ind3" @click="choosedVideofn(ind,ind2,ind3)">
<image v-if="index3.thirdOpen==true" class="playIngImg" :src="fatherToInfo.thirdImg" mode=""></image>
<view class="third_title" v-if="index3.thirdOpen==false" :style="[{fontSize:fatherToInfo.thirdfontsize+'rpx',color:fatherToInfo.thirdcolor}]">{{index3.vTitle}}</view>
<view class="third_title" v-if="index3.thirdOpen==true" :style="[{fontSize:fatherToInfo.thirdfontsize+'rpx',color:fatherToInfo.choosedcolor}]">{{index3.vTitle}}</view>
<text class="third_time" v-if="index3.thirdOpen==false" :style="[{fontSize:fatherToInfo.thirdrightfontsize+'rpx',color:fatherToInfo.thirdrightcolor}]">{{index3.duration}}</text>
<text class="third_time" v-if="index3.thirdOpen==true" :style="[{fontSize:fatherToInfo.thirdrightfontsize+'rpx',color:fatherToInfo.thirdrightchoosed}]">{{index3.duration}}</text>
</view>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
// mulunum:[]
}
},
onLoad() {
},
methods: {
// 下拉
fristZhankai(ind) {
if(this.fatherToInfo.shoufenq){
this.mulunum.forEach((index,xb)=>{
if(ind==xb){
if(index.leaf ==='1') return;
if(index.open){
this.$set(index, 'open', false)
} else{
// this.$set(index, 'open', true)
this.$emit("openItem",{
...index,
level:1
})
}
}else{
this.$set(index, 'open', false)
}
})
}else{
if (this.mulunum[ind].open == true) {
this.$set(this.mulunum[ind], 'open', false)
} else {
this.$set(this.mulunum[ind], 'open', true)
}
}
},
// 二级下拉
muluSecond(ind, ind2) {
if(this.fatherToInfo.twoshoufenq){
this.mulunum[ind].courseChapterList.forEach((index2,xb2)=>{
if(ind2==xb2){
// this.$set(index2, 'secondOpen', true)
this.$emit("openItem2",index2)
}else{
this.$set(index2, 'secondOpen', false)
}
})
}else{
if (this.mulunum[ind].courseChapterList[ind2].secondOpen == true) {
this.mulunum[ind].courseChapterList[ind2].secondOpen = false;
} else {
this.mulunum[ind].courseChapterList[ind2].secondOpen = true;
}
}
},
choosedVideofn(ind, ind2, ind3) {
let that = this;
that.mulunum.forEach((arr, xiab) => {
arr.courseChapterList.forEach((arr2, xiab2) => {
arr2.courseVideosList.forEach((arr3, xiab3) => {
that.$set(arr3, 'thirdOpen', false)
})
})
});
that.$set(that.mulunum[ind].courseChapterList[ind2].courseVideosList[ind3], 'thirdOpen', true);
}
},
props:["mulunum","fatherToInfo"],
}
</script>
<style lang="scss">
.class_mulu {
width: 100%;
.jieshao_class {
width: 100%;
height: 84rpx;
line-height: 84rpx;
padding: 0 20rpx;
box-sizing: border-box;
.jieshao_title {
font-size: 26rpx;
color: #333333;
font-weight: bold;
margin-left: 75rpx;
}
.jieshao_time {
font-size: 24rpx;
color: #333333;
float: right;
}
.choosedcolor {
color: #3c87ca;
}
}
.tree_mulu {
width: 100%;
padding: 20rpx 0;
.mulu_frist {
width: 100%;
padding: 0 20rpx;
box-sizing: border-box;
position: relative;
height: 80rpx;
text {
font-size: 30rpx;
color: #000;
font-weight: bold;
margin-left: 55rpx;
line-height: 80rpx;
}
.ellipsis-text{
display: inline-block;
width: 560upx;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.fristImg {
width: 24rpx;
height: 24rpx;
position: absolute;
top: 0;
bottom: 0;
left: 36rpx;
margin: auto;
}
.fristjiantou {
width: 20rpx;
height: 20rpx;
position: absolute;
top: 0;
bottom: 0;
right: 44rpx;
margin: auto;
}
}
.mulu_second {
width: 100%;
.mulu_second_view {
width: 100%;
padding: 20rpx 20rpx 20rpx 40rpx;
box-sizing: border-box;
position: relative;
}
.fristImg {
width: 24rpx;
height: 24rpx;
position: absolute;
top: 0;
bottom: 0;
left: 50rpx;
margin: auto;
}
text {
font-size: 28rpx;
font-weight: bold;
color: #333333;
margin-left: 55rpx;
}
.fristjiantou {
width: 20rpx;
height: 20rpx;
position: absolute;
top: 0;
bottom: 0;
right: 44rpx;
margin: auto;
}
}
.mulu_third {
width: 100%;
// padding: 0 40rpx;
padding: 0 20rpx 0 84rpx;
box-sizing: border-box;
position: relative;
height: 80rpx;
.playIngImg {
width: 20rpx;
height: 20rpx;
// margin: auto;
margin-right: 20rpx;
}
.third_title {
font-size: 26rpx;
color: #666;
width: 60%;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
display: inline-flex;
margin-left: 0;
line-height: 80rpx;
}
.third_time {
font-size: 24rpx;
color: #666;
line-height: 70rpx;
float: right;
}
.choosedvideo {
color: #3c87ca;
}
}
}
}
</style>
......@@ -11,7 +11,7 @@ const CONFIG = {
baseUrl:'/prod-api',
// #endif
// hostUrl: 'https://www.eis-paas.com', // H5地址(前端运行地址)
hostUrl: 'http://129.211.46.84:8085/hggp', // H5地址(前端运行地址)
hostUrl: 'http://129.211.46.84:8086/file-preview', // H5地址(前端运行地址)
websocketUrl: '', // websocket服务端地址
weixinAppId: '' ,// 微信公众号appid
codeHeadUrl:"",
......@@ -19,11 +19,13 @@ const CONFIG = {
},
// 生产环境配置
production: {
// assetsPath: 'http://129.211.46.84:8085', // 静态资源路径-测试服
assetsPath: 'https://www.eis-paas.com', // 静态资源路径-正式服
assetsPath: 'http://129.211.46.84:8085', // 静态资源路径-测试服
// assetsPath: 'https://www.eis-paas.com', // 静态资源路径-正式服
// assetsPath: 'http://106.15.43.147:8000',
baseUrl: '/hggp', // 后台接口请求地址
// hostUrl: 'http://129.211.46.84:8085', // H5地址(前端运行地址)
hostUrl: 'https://www.eis-paas.com', // H5地址(前端运行地址)
hostUrl: 'http://129.211.46.84:8086/file-preview', // H5地址(前端运行地址)
// hostUrl: 'https://www.eis-paas.com/file-preview', // H5地址(前端运行地址)
// hostUrl: 'http://106.15.43.147:8000/file-preview',
websocketUrl: '', // websocket服务端地址
weixinAppId: '', // 微信公众号appid
codeHeadUrl:"",
......
......@@ -691,6 +691,17 @@
"path" : "pages/document/list",
"style" :
{
"navigationBarTitleText" : "文档项目",
"navigationBarBackgroundColor": "#0072fc",
"navigationBarTextStyle": "white",
"navigationStyle": "custom",
"enablePullDownRefresh" : false
}
},
{
"path" : "pages/document/files",
"style" :
{
"navigationBarTitleText" : "文档浏览",
"navigationBarBackgroundColor": "#0072fc",
"navigationBarTextStyle": "white",
......
<template>
<view :class="show? 'hidden-box':'' ">
<cu-custom :isBack="true">
<block slot="backText">
<view class="list-icon" @tap="onBack">
<text class="cuIcon-back text-white text-bold text-xl"></text>
</view>
</block>
<block slot="content">
<text class="text-white">文档浏览</text>
</block>
<block slot="right">
<view class="margin-right text-xxl" @tap="onPopOpen">
<text class="cuIcon-filter" :class="searchStatus? 'text-green': 'text-white'"></text>
</view>
</block>
</cu-custom>
<view v-if="statusBarHeight>0" class="content-black" :style="{height:statusBarHeight+45+'px'}">
</view>
<view class="title-view">
<view class="flex-1">
<scroll-view scroll-x="true" class="scroll-view">
<view class="folder-list-box">
<view v-for="(item,k) in folderList" :key="k" class="flex-row-center folder-list-item" @tap="onFolderItem(item,k)">
<text class="text-grey">{{item.name}}</text>
<text v-if="k < folderList.length-1" class="cuIcon-right text-grey"></text>
</view>
</view>
</scroll-view>
</view>
<view v-if="projectDataList.length" class="flex-row-center order-box">
<view class="flex-row-center" @tap.stop="onDocNameOrder">
<text class="text-grey sm">名称</text>
<text class="cuIcon-order sm" :class="docNameIndex? 'text-blue':'text-grey'"></text>
</view>
<view class="flex-row-center" @tap.stop="onReleaseDateOrder">
<text class="text-grey sm">时间</text>
<text class="cuIcon-order sm" :class="releaseDateIndex? 'text-blue':'text-grey'"></text>
</view>
</view>
</view>
<view class="flex-col data-content">
<view class="flex-col part-3">
<view class="flex-col folder-list-box">
<view v-for="(item,index) in folders" :key="index" class="flex-between folder-item" @tap="onNextFolder(item)">
<view class="flex-row-center">
<view class="logo-icon">
<image src="../../static/folder.png" mode="widthFix"></image>
</view>
<view class="flex-col margin-left-sm">
<text class="text-black text-title">{{item.text}}</text>
<text class="text-grey">{{item.projName}}</text>
</view>
</view>
<view class="flex-row-center">
<text class="cuIcon-right text-xxl"></text>
</view>
</view>
</view>
<view class="flex-col folder-list-box">
<view v-for="(item,index) in projectDataList" :key="index" class="flex-between folder-item" @tap="onNavToOrderInfo(item)">
<view class="flex-row-center">
<view class="logo-icon">
<image src="../../static/file.png" mode="widthFix"></image>
</view>
<view class="flex-col margin-left-sm">
<text class="text-black text-title">{{item.docName}}</text>
<text class="text-grey">{{item.releaseDate}}</text>
</view>
</view>
<view class="flex-row-center">
<text class="cuIcon-right text-xxl"></text>
</view>
</view>
</view>
<view v-for="(item,k) in []" :key="k" class="content-item" @tap="onNavToOrderInfo(item)">
<view class="header-title">
<image src="../../static/icon5.png" mode="widthFix"></image>
<view class="flex-between">
<text class="text-black text-bold">{{item.docName|| ''}}</text>
<view class="margin-right">
<text class="">详情</text>
<text class="cuIcon-right text-gray"></text>
</view>
</view>
</view>
<view class="flex-col content-box">
<view class="flex-row">
<text class="text-gray part-1">文件名称</text>
<text class="text-gray part-2">:</text>
<text class="text-title">{{item.fileName}}</text>
</view>
<view class="flex-row">
<text class="text-gray part-1">项目名称</text>
<text class="text-gray part-2">:</text>
<text class="text-title">{{item.projName}}</text>
</view>
<view class="flex-row">
<text class="text-gray part-1">公司名称</text>
<text class="text-gray part-2">:</text>
<text class="text-title">{{item.companyName}}</text>
</view>
<view class="flex-row">
<text class="text-gray part-1">文件类型</text>
<text class="text-gray part-2">:</text>
<text class="text-title">{{fileTypeEnum[item.fileType]}}</text>
</view>
<view class="flex-row">
<text class="text-gray part-1">版本</text>
<text class="text-gray part-2">:</text>
<text class="text-title">{{'v'+ item.docVersion}}</text>
</view>
<!-- <view class="flex-row">
<text class="text-gray part-1">附件名称</text>
<text class="text-gray part-2">:</text>
<text class="text-title">{{item.docName}}</text>
</view>
<view class="flex-row">
<text class="text-gray part-1">预览次数</text>
<text class="text-gray part-2">:</text>
<text class="text-title">{{item.previewNum}}</text>
</view>
<view class="flex-row">
<text class="text-gray part-1">下载次数</text>
<text class="text-gray part-2">:</text>
<text class="text-title">{{item.downloadNum}}</text>
</view> -->
<view class="flex-row">
<text class="text-gray part-1">发布时间</text>
<text class="text-gray part-2">:</text>
<text class="text-title">{{item.releaseDate}}</text>
</view>
</view>
</view>
<view v-if="projectDataList.length" style="padding: 12px 6% 0;">
<u-loadmore :status="status" :icon="true" :line='true' :loading-text="loadingText"
:loadmore-text="loadmoreText" :nomore-text="nomoreText" />
</view>
<view v-if="!projectDataList.length && !folders.length" class="empty-box">
<u-empty text="暂无数据" textColor='#C1C1C1' width="120">
</u-empty>
</view>
</view>
</view>
<u-popup :show="show" mode="right" :closeOnClickOverlay="true" :zIndex="455" :safeAreaInsetBottom="true"
:safeAreaInsetTop="true" round="6" @close="onPopClose">
<view class="flex-col filter-box">
<view class="content-black" :style="{height:statusBarHeight+45+'px'}">
</view>
<view class="flex-between text-xxl">
<view class="text-title text-lg text-bold margin-left-sm">查询条件</view>
<text class="cuIcon-roundclose text-gray margin-right" @tap="onPopClose"></text>
</view>
<view class="flex-col query-data">
<view class="flex-col part">
<view class="title">
<text class="text-title">附件类型:</text>
</view>
<view class="selector">
<picker mode="selector" :range="fileTypeList" @change="onChange" range-key="label">
<view class="flex-row">
<text
class="text-grey">{{fileTypeList.length? fileTypeList[index].label:'请选择'}}</text>
<view class="text-xl">
<text class="cuIcon-unfold text-grey"></text>
</view>
</view>
</picker>
</view>
</view>
<view class="flex-col part">
<view class="title">
<text class="text-title">公司名称:</text>
</view>
<view class="input">
<u-input border="surround" placeholder="请输入公司名称" v-model="queryData.companyName" type="text"
:maxlength="99" name="input"></u-input>
</view>
</view>
<view class="flex-col part">
<view class="title">
<text class="text-title">项目名称:</text>
</view>
<view class="input">
<u-input border="surround" placeholder="请输入项目名称" v-model="queryData.projName" type="text"
:maxlength="99" name="input"></u-input>
</view>
</view>
<view class="flex-col part">
<view class="title">
<text class="text-title">文件名称:</text>
</view>
<view class="input">
<u-input border="surround" placeholder="请输入文件名称" v-model="queryData.fileName" type="text"
:maxlength="99" name="input"></u-input>
</view>
</view>
</view>
<view class="list-btn">
<button class="cu-btn bg-gray" @tap="onReset">重 置</button>
<button class="cu-btn bg-blue" @tap="onFilterConfirm">确 定</button>
</view>
</view>
</u-popup>
</view>
</template>
<script>
import {
getDict
} from "@/api/index.js"
import {
toJsonData
} from "@/utils/tools.js";
import moment from "@/common/moment.js";
import {
getList,
getProjTreeData
} from "@/api/document.js";
export default {
data() {
return {
show: false,
statusBarHeight: uni.getStorageSync("statusHeight") || 0,
status: 'nomore ',
loadingText: '努力加载中',
loadmoreText: '上划加载',
nomoreText: '到底啦',
value: 0,
title: '文档浏览',
current: 0,
formData: {},
queryData: {},
pageData:{
offset: 0,
pageSize: 5
},
projectDataList: [],
searchStatus: false,
index: 0,
fileTypeList: [{
value: '',
label: "全部"
}],
folders: [],
fileTypeEnum: {},
folderList: [],
docNameIndex:0,
docNameOrder:{
0:'',
1:"docName asc",
2:"docName desc"
},
releaseDateIndex:0,
releaseDateOrder:{
0:'',
1:"createdTime asc",
2:"createdTime desc"
},
orderBy:''
};
},
onLoad(option) {
if (option && option.level) {
let level = Number(option.level);
for (let i = 0; i < level; i++) {
let num = i + 1;
this.folderList.push({
code: option['code' + num],
name: option['name' + num],
leaf: option['leaf' + num]
})
}
}
this.onLoading();
},
onShow() {
console.log(this.$route.query,"this.$route")
console.log(this.folderList,"2222")
if(this.$route.query && this.folderList.length && Number(this.$route.query.level) != this.folderList.length){
this.folderList = [];
let level = Number(this.$route.query.level);
for (let i = 0; i < level; i++) {
let num = i + 1;
this.folderList.push({
code: this.$route.query['code' + num],
name: this.$route.query['name' + num],
leaf: this.$route.query['leaf' + num]
})
}
}
},
onReachBottom() {
if (this.status == 'loadmore') {
this.pageData.offset += 1;
this.onGetList();
}
},
methods: {
onReset() {
this.index = 0;
this.queryData.companyName = "";
this.queryData.projName = "";
this.queryData.fileName = "";
this.pageData.offset = 0;
this.searchStatus = false;
this.show = false;
this.onGetList();
},
onFilterConfirm() {
if (!this.queryData.companyName && !this.queryData.projName && !this.queryData.fileName && this.index ===0) {
uni.showToast({
icon: "none",
title: "请输入至少一个查询条件"
})
return
}
this.show = false;
this.searchStatus = true;
this.pageData.offset = 0;
this.queryData.fileType = this.fileTypeList[this.index].value
this.onGetList();
},
onPopOpen() {
this.show = true
},
onPopClose() {
this.show = false
},
onChange(e) {
this.index = e.target.value;
},
onBack() {
uni.navigateBack();
},
onLoading() {
getDict({
codeset: 'hggp.hgwd.fileType'
}).then(res => {
let list = res.data.list.map(item => {
this.fileTypeEnum[item.value] = item.label;
return item
})
this.fileTypeList.push(...list)
this.onGetFolder();
})
},
onGetList() {
uni.showLoading({
title: "加载中"
})
let lastObj = this.folderList[this.folderList.length - 1]
getList({
...this.queryData,
parentId: lastObj.code
},{
...this.pageData,
orderBy: this.orderBy
}).then(res => {
uni.hideLoading();
let list = toJsonData(res.data.__blocks__.result.rows, res.data.__blocks__.result.meta.columns)
if (list && list.length) {
list = list.map(item => {
let updatedTime = item.releaseDate ? item.releaseDate.split('') : [];
return {
...item,
releaseDate: updatedTime.length >= 13 ?
`${updatedTime[0]}${updatedTime[1]}${updatedTime[2]}${updatedTime[3]}/${updatedTime[4]}${updatedTime[5]}/${updatedTime[6]}${updatedTime[7]} ${updatedTime[8]}${updatedTime[9]}:${updatedTime[10]}${updatedTime[11]}:${updatedTime[12]}${updatedTime[13]}` :
''
}
})
}
if (this.pageData.offset == 0) {
this.projectDataList = list
} else {
this.projectDataList = [...this.projectDataList, ...list]
}
if (this.projectDataList.length < res.data.__blocks__.result.attr.count) {
this.status = "loadmore"
} else {
this.status = 'nomore'
}
})
},
onNavToOrderInfo(val) {
uni.navigateTo({
url: `/pages/document/edit?id=${val.id}&docId=${val.docId}`
})
},
onGetFolder() {
let lastObj = this.folderList[this.folderList.length - 1]
if(lastObj.leaf == '1'){
this.onGetList();
}else{
getProjTreeData({
node: lastObj.code
}).then(res => {
this.onGetList();
this.folders = toJsonData(res.data.__blocks__[lastObj.code].rows, res.data.__blocks__[lastObj.code].meta.columns);
})
}
},
onNextFolder(val){
this.folderList.push({
code: val.label,
name: val.text,
leaf: val.leaf
})
let str='';
this.folderList.forEach((item,k) => {
str += `&code${k+1}=${item.code}&name${k+1}=${item.name}&leaf${k+1}=${item.leaf}`
})
uni.navigateTo({
url:`/pages/document/files?level=${this.folderList.length}${str}`
})
},
onDocNameOrder(){
if(this.docNameIndex>=2){
this.docNameIndex = 0;
}else{
this.docNameIndex+=1;
}
if(this.docNameIndex && this.releaseDateIndex){
this.orderBy = `${this.releaseDateOrder[this.releaseDateIndex]},${this.docNameOrder[this.docNameIndex]}`
this.onGetList();
} else {
this.onOrderby()
}
},
onReleaseDateOrder(){
if(this.releaseDateIndex>=2){
this.releaseDateIndex = 0;
}else{
this.releaseDateIndex+=1;
}
if(this.docNameIndex && this.releaseDateIndex){
this.orderBy = `${this.docNameOrder[this.docNameIndex]},${this.releaseDateOrder[this.releaseDateIndex]}`
this.onGetList();
}else{
this.onOrderby()
}
},
onOrderby(){
if(!this.projectDataList.length) return;
if(!this.docNameIndex && !this.releaseDateIndex){
this.orderBy = '';
} else if(this.docNameIndex){
this.orderBy = `${this.docNameOrder[this.docNameIndex]}`
}else if(this.releaseDateIndex){
this.orderBy = `${this.releaseDateOrder[this.releaseDateIndex]}`
}
this.onGetList();
},
onFolderItem(val,k){
if(k == this.folderList.length-1) return;
this.folderList = this.folderList.slice(0,k+1);
let str='';
this.folderList.forEach((item,k) => {
str += `&code${k+1}=${item.code}&name${k+1}=${item.name}&leaf${k+1}=${item.leaf}`
})
uni.navigateTo({
url:`/pages/document/files?level=${this.folderList.length}${str}`
})
}
}
}
</script>
<style>
page {
background-color: #ffffff;
}
</style>
<style lang="scss" scoped>
.title-view {
display: flex;
flex-direction: row;
align-items: center;
padding: 20upx 20upx;
background: #ffffff;
.scroll-view{
position: relative;
height: 42upx;
.folder-list-box{
position: absolute;
top: 0;
display: flex;
flex-direction: row;
align-items: center;
height: 100%;
width: auto;
.folder-list-item{
background-color: #e5e5e5;
padding: 0 12upx;
border-radius: 20upx;
height: 100%;
margin-right: 8upx;
text{
white-space: nowrap;
}
}
}
}
.order-box{
.flex-row-center{
margin: 0 8upx;
}
}
}
.hidden-box {
height: 100vh;
overflow: hidden;
}
.cu-form-group {
display: flex;
flex-direction: column;
picker {
padding-right: 0;
}
}
.header-title {
display: flex;
flex-direction: row;
width: 90%;
align-items: center;
margin: 30upx auto 12upx;
.flex-between {
display: flex;
flex: 1;
justify-content: center;
align-items: center;
border-radius: 20upx;
padding: 16upx 20upx;
background-color: rgba(246, 246, 248, 1);
.image {
width: 34upx;
margin-right: 8upx;
max-height: 42upx;
}
.text-blue {
color: #4a93f8;
font-weight: bold;
}
}
}
.u-tabs-box {
width: 100%;
margin: 0 auto;
}
.data-content {
display: flex;
flex-direction: column;
margin: 0 auto 30upx;
width: 96%;
.circle-par {
display: flex;
justify-content: center;
align-items: center;
}
.header {
border-radius: 12upx 12upx 0 0;
background-color: #eef2fe;
color: #101010;
font-size: 30upx;
border: 1px solid #d1dcfd;
padding: 14upx 24upx;
}
.content {
border-radius: 0 0 12upx 12upx;
background-color: #ffffff;
color: #101010;
font-size: 30upx;
border: 1px solid #cecece;
border-top: none;
}
}
.flex-content {
display: flex;
width: 100%;
justify-content: center;
}
.part-3 {
flex-direction: column;
padding-bottom: 40upx;
.content-item {
display: flex;
flex-direction: column;
width: 94%;
margin: 4upx auto 24upx;
padding-bottom: 24upx;
.header-title {
position: relative;
width: 100%;
margin: 0;
image {
width: 100%;
max-height: 100upx;
}
.flex-between {
position: absolute;
top: 0;
left: 12%;
width: 88%;
height: 70%;
padding: 0;
justify-content: space-between;
background-color: transparent;
}
}
.content-box {
position: relative;
z-index: 2;
box-shadow: 0 0 12upx rgba(0, 0, 0, 0.34);
border-radius: 12upx;
margin-top: -20upx;
background-color: #ffffff;
padding: 24upx;
.flex-row {
margin: 6upx 0;
.part-1 {
width: 180upx;
text-align-last: justify;
}
.part-2 {
margin-right: 24upx;
}
}
}
}
.content-item:last-child {
border-bottom: none;
}
}
.flex-center {
display: flex;
align-items: center;
}
.line-progress {
align-items: center;
}
.u-page__item__slot-icon {
width: 24px;
height: 24px;
}
.part-left {
align-items: center;
}
.circle-center {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
.margin-top-sm {
margin-top: 10upx;
}
.flex-row {
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
}
}
.icon {
width: 36upx;
max-height: 50upx;
margin-right: 6upx;
}
.flex-row-center {
display: flex;
flex-direction: row;
align-items: center;
}
.content-part-1 {
display: flex;
flex-direction: column;
align-items: center;
.header {
display: flex;
flex-direction: row;
align-items: center;
width: 92%;
padding: 30upx 0;
image {
width: 20px;
height: 20px;
margin-right: 6upx;
}
}
.form-content-box {
width: 92%;
padding: 12upx 0;
border-radius: 12upx;
box-shadow: 0 0 8upx rgba(0, 0, 0, 0.34);
background-color: #ffffff;
.cu-form-group {
.title {
display: flex;
flex-direction: row;
width: 240upx;
align-items: center;
}
}
}
.footer-content {
display: flex;
justify-content: center;
align-items: center;
width: 100vw;
height: 120upx;
margin-bottom: 100upx;
.btn-box {
width: 80%;
}
}
}
.filter-box {
position: relative;
display: flex;
flex-direction: column;
width: 60vw;
height: 100%;
padding-top: 30upx;
.item {
margin: 20upx;
.input-box {
border: 1px solid #dadbde;
border-radius: 4px;
padding: 6px 9px;
font-size: 30upx;
}
}
.list-btn {
position: absolute;
left: 0;
bottom: 40upx;
width: 100%;
display: flex;
justify-content: space-between;
.cu-btn {
display: flex;
flex: 1;
margin: 20upx;
}
}
}
.query-data {
border-top: 1px solid #e5e5e5;
margin-top: 24upx;
.part {
.input {
margin: 0 24upx;
}
.selector{
margin: 0 24upx;
border: 1px solid #dadbde;
border-radius: 8upx;
padding: 12upx 18upx;
}
}
.title {
padding: 12upx 20upx;
}
}
.folder-list-box{
.folder-item{
border-bottom: 1px solid #e5e5e5;
.flex-col{
}
.logo-icon{
width: 100upx;
}
.text-xxl{
font-size: 52upx;
color: #999999;
}
}
.folder-item:last-child{
border-bottom: none;
}
}
</style>
\ No newline at end of file
<template>
<view :class="show? 'hidden-box':'' ">
<view>
<cu-custom :isBack="true">
<block slot="backText">
<view class="list-icon" @tap="onBack">
......@@ -7,98 +7,21 @@
</view>
</block>
<block slot="content">
<text class="text-white">文档浏览</text>
</block>
<block slot="right">
<view class="margin-right text-xxl" @tap="onPopOpen">
<text class="cuIcon-filter" :class="searchStatus? 'text-green': 'text-white'"></text>
</view>
<text class="text-white">文档项目</text>
</block>
</cu-custom>
<view v-if="statusBarHeight>0" class="content-black" :style="{height:statusBarHeight+45+'px'}">
</view>
<view class="title-view">
<picker mode="selector" :range="fileTypeList" @change="onChange" range-key="label">
<view class="flex-row">
<text class="text-title text-bold text-lg">{{fileTypeList.length? fileTypeList[index].label:'请选择'}}</text>
<view class="text-xl">
<text class="cuIcon-unfold"></text>
</view>
</view>
</picker>
</view>
<view class="flex-col data-content">
<view class="flex-col part-3">
<view v-for="(item,k) in projectDataList" :key="k" class="content-item" @tap="onNavToOrderInfo(item)">
<view class="header-title">
<image src="../../static/icon5.png" mode="widthFix"></image>
<view class="flex-between">
<text class="text-black text-bold">{{item.fileName|| ''}}</text>
<view class="margin-right">
<text class="">详情</text>
<text class="cuIcon-right text-gray"></text>
</view>
</view>
</view>
<view class="flex-col content-box">
<view class="flex-row">
<text class="text-gray part-1">文件名称</text>
<text class="text-gray part-2">:</text>
<text class="text-title">{{item.fileName}}</text>
</view>
<view class="flex-row">
<text class="text-gray part-1">项目名称</text>
<text class="text-gray part-2">:</text>
<text class="text-title">{{item.projName}}</text>
</view>
<view class="flex-row">
<text class="text-gray part-1">公司名称</text>
<text class="text-gray part-2">:</text>
<text class="text-title">{{item.companyName}}</text>
</view>
<view class="flex-row">
<text class="text-gray part-1">文件类型</text>
<text class="text-gray part-2">:</text>
<text class="text-title">{{fileTypeEnum[item.fileType]}}</text>
</view>
<view class="flex-row">
<text class="text-gray part-1">版本</text>
<text class="text-gray part-2">:</text>
<text class="text-title">{{'v'+ item.docVersion}}</text>
</view>
<!-- <view class="flex-row">
<text class="text-gray part-1">附件名称</text>
<text class="text-gray part-2">:</text>
<text class="text-title">{{item.docName}}</text>
</view>
<view class="flex-row">
<text class="text-gray part-1">预览次数</text>
<text class="text-gray part-2">:</text>
<text class="text-title">{{item.previewNum}}</text>
</view>
<view class="flex-row">
<text class="text-gray part-1">下载次数</text>
<text class="text-gray part-2">:</text>
<text class="text-title">{{item.downloadNum}}</text>
</view> -->
<view class="flex-row">
<text class="text-gray part-1">发布时间</text>
<text class="text-gray part-2">:</text>
<text class="text-title">{{item.releaseDate}}</text>
</view>
</view>
<view class="flex-row header-title">
<view class="flex-1">
<u--input placeholder="请输入项目名称或编号" v-model="queryData.ename" suffixIcon="search"
suffixIconStyle="color: #909399" confirmType="search" @blur="onLoading"></u--input>
</view>
</view>
<view class="flex-col part-3">
<threeChoose :mulunum="projectDataList" :fatherToInfo='fatherToInfo' @openItem="onOpenItem" @openItem2="openItem2"></threeChoose>
<view v-if="projectDataList.length" style="padding: 12px 6% 0;">
<u-loadmore :status="status" :icon="true" :line='true' :loading-text="loadingText"
:loadmore-text="loadmoreText" :nomore-text="nomoreText" />
......@@ -109,197 +32,121 @@
</view>
</view>
</view>
<u-popup :show="show" mode="right" :closeOnClickOverlay="true" :zIndex="455" :safeAreaInsetBottom="true"
:safeAreaInsetTop="true" round="6" @close="onPopClose">
<view class="flex-col filter-box">
<view class="content-black" :style="{height:statusBarHeight+45+'px'}">
</view>
<view class="flex-between text-xxl">
<view class="text-title text-lg text-bold margin-left-sm">查询条件</view>
<text class="cuIcon-roundclose text-gray margin-right" @tap="onPopClose"></text>
</view>
<view class="flex-col query-data">
<view class="flex-col part">
<view class="title">
<text class="text-title">公司名称:</text>
</view>
<view class="input">
<u-input border="surround" placeholder="请输入公司名称" v-model="queryData.companyName" type="text" :maxlength="99" name="input"></u-input>
</view>
</view>
<view class="flex-col part">
<view class="title">
<text class="text-title">项目名称:</text>
</view>
<view class="input">
<u-input border="surround" placeholder="请输入项目名称" v-model="queryData.projName" type="text" :maxlength="99" name="input"></u-input>
</view>
</view>
<view class="flex-col part">
<view class="title">
<text class="text-title">文件名称:</text>
</view>
<view class="input">
<u-input border="surround" placeholder="请输入文件名称" v-model="queryData.fileName" type="text" :maxlength="99" name="input"></u-input>
</view>
</view>
</view>
<view class="list-btn">
<button class="cu-btn bg-gray" @tap="onReset">重 置</button>
<button class="cu-btn bg-blue" @tap="onFilterConfirm">确 定</button>
</view>
</view>
</u-popup>
</view>
</template>
<script>
import {getDict} from "@/api/index.js"
import {
toJsonData
} from "@/utils/tools.js";
import moment from "@/common/moment.js";
import {
getList
} from "@/api/document.js";
export default {
data() {
return {
show: false,
import {toJsonData} from "@/utils/tools.js";
import {getProjTreeData} from "@/api/document.js"
import threeChoose from '@/components/three-choose/three-choose';
export default {
components: {
threeChoose
},
data() {
return {
statusBarHeight: uni.getStorageSync("statusHeight") || 0,
status: 'nomore ',
loadingText: '努力加载中',
loadmoreText: '上划加载',
nomoreText: '到底啦',
value: 0,
title: '文档浏览',
current: 0,
formData: {},
queryData: {
offset: 0,
pageSize: 5
},
projectDataList:[],
searchStatus: false,
index:0,
fileTypeList: [{
value:'',
label:"全部"
}],
fileTypeEnum: {},
};
},
onLoad(option) {
this.onLoading();
},
onReachBottom() {
if (this.status == 'loadmore') {
this.queryData.offset += 1;
this.onGetList();
}
},
methods: {
onReset(){
this.queryData.companyName = "";
this.queryData.projName = "";
this.queryData.fileName = "";
this.queryData.offset = 0;
this.searchStatus = false;
this.show = false;
this.onGetList();
},
onFilterConfirm(){
if(!this.queryData.companyName&& !this.queryData.projName && !this.queryData.fileName){
uni.showToast({
icon:"none",
title:"请输入至少一个查询条件"
})
return
fatherToInfo:{
defaultIcon:'../../static/mix-tree/defaultIcon.png',//展开后图标
currentIcon:'../../static/mix-tree/currentIcon.png',//恢复后图标
firstImg:'../../static/mix-tree/ship_muluquan.png',//顶层展示图片
shoufenq:true, //一级下拉是否需要手风琴效果
twoshoufenq:true,//二级下拉是否需要手风琴效果
firstfontsize:26,
firstcolor:'#000',
secondImg:'',
secondfontsize:28,
secondcolor:'#333333',
thirdImg:'../../static/mix-tree/ship_bofanging.png',
thirdfontsize:26,
thirdcolor:'#666',
choosedcolor:'red',
thirdrightfontsize:26,
thirdrightcolor:'#666', //第三项字体颜色
thirdrightchoosed:'red' //右侧被选中后的颜色变化
},
projectDataList: [],
queryData:{
ename:''
}
this.show = false;
this.searchStatus = true;
this.queryData.offset = 0;
this.onGetList();
},
onPopOpen(){
this.show = true
},
onPopClose(){
this.show = false
},
onChange(e) {
this.index = e.target.value;
this.queryData.offset = 0;
this.onGetList();
},
onBack() {
uni.redirectTo({
url: "/pages/home/home"
})
},
onLoading() {
getDict({
codeset: 'hggp.hgwd.fileType'
}).then(res => {
let list = res.data.list.map( item => {
this.fileTypeEnum[item.value] = item.label;
return item
})
this.fileTypeList.push(...list)
this.onGetList();
})
},
onGetList() {
}
},
onLoad() {
this.onLoading()
},
methods: {
onLoading(){
uni.showLoading({
title: "加载中"
title:"加载中..."
})
getList({
getProjTreeData({
...this.queryData,
fileType: this.fileTypeList[this.index].value
node:"$",
expandLevel: 1
}).then(res => {
uni.hideLoading();
let list = toJsonData(res.data.__blocks__.result.rows, res.data.__blocks__.result.meta.columns)
if (list && list.length) {
list = list.map(item => {
let updatedTime =item.releaseDate? item.releaseDate.split(''):[];
let list = toJsonData(res.data.__blocks__.$.rows, res.data.__blocks__.$.meta.columns);
if(list && list.length){
this.projectDataList = list.map(item => {
return {
...item,
releaseDate:updatedTime.length>=13? `${updatedTime[0]}${updatedTime[1]}${updatedTime[2]}${updatedTime[3]}/${updatedTime[4]}${updatedTime[5]}/${updatedTime[6]}${updatedTime[7]} ${updatedTime[8]}${updatedTime[9]}:${updatedTime[10]}${updatedTime[11]}:${updatedTime[12]}${updatedTime[13]}` :''
courseTitle: item.text,
open: false,
courseChapterList:[],
leaf: item.leaf
}
})
}
if (this.queryData.offset == 0) {
this.projectDataList = list
} else {
this.projectDataList = [...this.projectDataList, ...list]
}
if (this.projectDataList.length < res.data.__blocks__.result.attr.count) {
this.status = "loadmore"
} else {
this.status = 'nomore'
})
},
onOpenItem(e){
this.openItem2(e);
return
getProjTreeData({
node: e.projCode
}).then(res => {
let list = toJsonData(res.data.__blocks__[e.projCode].rows, res.data.__blocks__[e.projCode].meta.columns).map(item => {
return {
...item,
ccName: item.text,
secondOpen: false,
}
});
if(list && list.length){
this.projectDataList = this.projectDataList.map(item => {
return {
...item,
open: item.projCode === e.projCode,
courseChapterList: item.projCode === e.projCode? list :[]
}
})
this.$forceUpdate();
}
})
},
onNavToOrderInfo(val) {
openItem2(e){
uni.navigateTo({
url: `/pages/document/edit?id=${val.id}&docId=${val.docId}`
url:`/pages/document/files?level=1&code1=${e.label}&name1=${e.text}&leaf1=${e.leaf}`
})
}
}
}
},
onBack() {
uni.redirectTo({
url: "/pages/home/home"
})
},
}
}
</script>
<style>
page {
background-color: #ffffff;
......@@ -326,35 +173,6 @@
}
}
.header-title {
display: flex;
flex-direction: row;
width: 90%;
align-items: center;
margin: 30upx auto 12upx;
.flex-between {
display: flex;
flex: 1;
justify-content: center;
align-items: center;
border-radius: 20upx;
padding: 16upx 20upx;
background-color: rgba(246, 246, 248, 1);
.image {
width: 34upx;
margin-right: 8upx;
max-height: 42upx;
}
.text-blue {
color: #4a93f8;
font-weight: bold;
}
}
}
.u-tabs-box {
width: 100%;
margin: 0 auto;
......@@ -407,54 +225,6 @@
margin: 4upx auto 24upx;
padding-bottom: 24upx;
.header-title {
position: relative;
width: 100%;
margin: 0;
image {
width: 100%;
max-height: 100upx;
}
.flex-between {
position: absolute;
top: 0;
left: 12%;
width: 88%;
height: 70%;
padding: 0;
justify-content: space-between;
background-color: transparent;
}
}
.content-box {
position: relative;
z-index: 2;
box-shadow: 0 0 12upx rgba(0, 0, 0, 0.34);
border-radius: 12upx;
margin-top: -20upx;
background-color: #ffffff;
padding: 24upx;
.flex-row {
margin: 6upx 0;
.part-1 {
width: 180upx;
text-align-last: justify;
}
.part-2 {
margin-right: 24upx;
}
}
}
}
.content-item:last-child {
border-bottom: none;
}
}
......@@ -463,37 +233,6 @@
align-items: center;
}
.line-progress {
align-items: center;
}
.u-page__item__slot-icon {
width: 24px;
height: 24px;
}
.part-left {
align-items: center;
}
.circle-center {
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
.margin-top-sm {
margin-top: 10upx;
}
.flex-row {
display: flex;
flex-direction: row;
align-items: center;
justify-content: center;
}
}
.icon {
width: 36upx;
max-height: 50upx;
......@@ -505,102 +244,32 @@
flex-direction: row;
align-items: center;
}
.content-part-1 {
.header-title {
display: flex;
flex-direction: column;
flex-direction: row;
width: 96%;
align-items: center;
margin: 30upx auto 12upx;
.header {
display: flex;
flex-direction: row;
align-items: center;
width: 92%;
padding: 30upx 0;
image {
width: 20px;
height: 20px;
margin-right: 6upx;
}
}
.form-content-box {
width: 92%;
padding: 12upx 0;
border-radius: 12upx;
box-shadow: 0 0 8upx rgba(0, 0, 0, 0.34);
background-color: #ffffff;
.cu-form-group {
.title {
display: flex;
flex-direction: row;
width: 240upx;
align-items: center;
}
}
}
.footer-content {
.flex-between {
display: flex;
flex: 1;
justify-content: center;
align-items: center;
width: 100vw;
height: 120upx;
margin-bottom: 100upx;
.btn-box {
width: 80%;
}
}
}
.filter-box {
position: relative;
display: flex;
flex-direction: column;
width: 60vw;
height: 100%;
padding-top: 30upx;
.item {
margin: 20upx;
border-radius: 20upx;
padding: 16upx 20upx;
background-color: rgba(246, 246, 248, 1);
.input-box {
border: 1px solid #dadbde;
border-radius: 4px;
padding: 6px 9px;
font-size: 30upx;
.image {
width: 34upx;
margin-right: 8upx;
max-height: 42upx;
}
}
.list-btn {
position: absolute;
left: 0;
bottom: 40upx;
width: 100%;
display: flex;
justify-content: space-between;
.cu-btn {
display: flex;
flex: 1;
margin: 20upx;
}
}
}
.query-data{
border-top: 1px solid #e5e5e5;
margin-top: 24upx;
.part{
.input{
margin: 0 24upx;
.text-blue {
color: #4a93f8;
font-weight: bold;
}
}
.title{
padding: 12upx 20upx;
}
}
</style>
\ No newline at end of file
......@@ -6,8 +6,9 @@ module.exports = {
proxy: {
'/prod-api': {
// target: `http://10.24.4.66:8082/hggp_war_exploded`,
// target: `http://129.211.46.84:8085/hggp`,
target: `https://www.eis-paas.com/hggp`,
target: `http://129.211.46.84:8085/hggp`,
// target: `https://www.eis-paas.com/hggp`,
// target: `http://106.15.43.147:8000/hggp`, //北湖德诚
changeOrigin: true,
pathRewrite: {
'/prod-api': ''
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment