123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466 |
- <template>
- <view>
- <!-- 资料管理弹窗 -->
- <view style="height: 100%;">
- <view class="status_bar"></view>
- <view class="top_b">
- <!-- 切换卡 -->
- <view class="top_b_1">
- <view style="width: 100%;text-align: center;font-size: 34rpx;font-weight: bold;position: relative;" :class="TabCur == 0?'text-blue':'text-blues'"
- @tap="tabSelect(0)">
- {{modelList[0].name}}
- <view :class="TabCur==0?'text-blue_one':''"></view>
- </view>
- <view style="width: 100%;text-align: center;font-size: 34rpx;font-weight: bold;position: relative;" :class="TabCur == 1?'text-blue1':'text-blues'" @tap="tabSelect(1)">
- {{modelList[1].name}}
- <view :class="TabCur == 1?'text-blue_ones':''"></view>
- </view>
- </view>
- <!-- 按钮-->
- <view class="tot_button">
- <view class="tot_button_1">
- <view>
- <button class="button_divisionName">{{divisionName}}</button>
- </view>
- <view>
- <button class="button_stake">{{stake}}</button>
- </view>
- </view>
- </view>
- <view style="position: fixed;right: 0;top: calc(var(--status-bar-height) + 20rpx);" v-if="childrenContracts.length >1">
- <view class="bg-blue text-center" style="border-radius:50rpx 0 0 50rpx ;width: 120rpx;height: 70rpx;line-height: 70rpx;" @click="showNoList">
- <text>{{curContractNumber}} ></text>
- </view>
- </view>
- <view class="bg-white" style="position: fixed;right: 6rpx;top: calc(var(--status-bar-height) + 96rpx);;width: 180rpx;border-radius: 20rpx;box-shadow: 0 2px 12px 0 rgba(0,0,0,.2);" v-show="noShow">
- <view v-for="(contract,index) in childrenContracts" :key="contract.id" @click="changNo(index)" class="text-blue padding-tb-sm padding-left-sm solid-bottom">{{contract.contractNumber}}</view>
- </view>
- </view>
- <!-- 内容 -->
- <view style="height: var(--status-bar-height)"></view>
- <view style="padding:125px 22rpx 200rpx;">
- <scroll-view scroll-y="" style="height: 100%;">
- <!-- 分类 -->
- <view v-if="TabCur==0">
- <view v-for="(item,index) in divideClientList" :key="item.id">
- <view style="font-size: 30rpx;color: #101010;padding-top: 28rpx;font-weight: bold;">{{item.name}}</view>
- <view style="display: flex;flex-wrap: wrap;">
- <view v-for="(children,indexs) in item.children " :key="indexs">
- <button @click="chooseDivision(children)" style="margin: 26rpx 20rpx 0 0;font-size: 26rpx;height: 72rpx;line-height: 72rpx;">
- {{children.divisionName==null ? children.name:children.divisionName}}
- </button>
- </view>
- </view>
- </view>
- </view>
- <!-- 桩号 -->
- <view v-if="TabCur==1">
- <view>
- <view style="display: flex;flex-wrap: wrap;">
- <view v-for="(item,index) in stakeList" :key="index">
- <button @click="chooseStake(item)" style="margin: 26rpx 20rpx 0 0;font-size: 26rpx;height: 72rpx;line-height: 72rpx;">
- {{item.stake}}
- </button>
- </view>
- </view>
- </view>
- </view>
- </scroll-view>
- </view>
- <!-- 底部-->
- <view class="cu-bar tabbar bg-white shadow foot solid-type-top" style="height: 120rpx;margin-top: 20rpx;">
- <!-- <view class="btn-group text-xxl " style="padding: 0 60rpx;">
- <button class="cu-btn lg bg-yellow text-white round " @click="back" style="width: 270rpx;height: 88rpx;font-size: 30rpx;">取消</button>
- <button class="cu-btn lg bg-blue round " @click="certain()" style="width: 270rpx;height: 88rpx;font-size: 30rpx">确定</button>
- </view> -->
- <button class="cu-btn lg round margin-lr-xl" @click="back" style="width: 100%;font-size: 30rpx;">取消</button>
- </view>
- </view>
- <view class="cu-modal" :class="modalShow ? 'show':''">
- <view class="cu-dialog" style="width: 60%;">
- <view class="cu-bar bg-white justify-end">
- <view class="content">提示</view>
- <view class="action" @tap="modalShow=false">
- <text class="cuIcon-close text-red"></text>
- </view>
- </view>
- <view class="padding-xl">
- 请选择分类和桩号
- </view>
- </view>
- </view>
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- loadModal: false,
- TabCur: 0,
- modalName: "",
- modalShow: false,
- modelList: [{
- name: '选择分类'
- }, {
- name: '选择桩号'
- }],
- menuList: [{
- url: "",
- imageurl: "/static/index/fill-Information.png",
- name: '资料填报',
- type: 1
- },
- {
- url: "/pages/informationProgress/informationProgress",
- imageurl: "/static/index/dataAccuracy.png",
- name: '资料进度',
- type: ""
- },
- {
- url: "/pages/conSchedule/conSchedule",
- imageurl: "/static/index/shigong.png",
- name: '施工进度',
- type: ""
- },
- {
- url: "/pages/constructionLog/constructionLog",
- imageurl: "/static/index/sglog.png",
- name: '施工日志',
- type: ""
- },
- {
- url: "/pages/conLedger/conLedger",
- imageurl: "/static/index/constructionLedger.png",
- name: '施工台账',
- type: ""
- },
- {
- url: "/pages/task/task",
- imageurl: "/static/index/myTask.png",
- name: '我的任务',
- type: ""
- },
- {
- url: "/pages/smartSearch/smartSearch",
- imageurl: "/static/index/smartQuery.png",
- name: '智能查阅',
- type: ""
- },
- {
- url: "",
- imageurl: "/static/index/graphic.png",
- name: '图文识别',
- type: ""
- },
- ],
- taskList: [],
- gridCol: 4,
- gridBorder: false,
- menuBorder: false,
- menuArrow: false,
- menuCard: false,
- projectId: 0,
- contractId: 0,
- userInfo: "",
- projectList: "",
- divideClientList: "",
- stakeList: [], //桩号
- divisionName: "请选择",
- stake: "请选择",
- chooseDate: null,
-
- noShow:false,
- childrenContracts:[],
- curContractNumber:'',
-
- engineeringType:'',//6为隐蔽工程
- }
- },
- onLoad(e) {
- this.engineeringType = e.type
-
- this.onLoadData();
- //console.log(this.projectList)
- if(this.projectList.contract_type == 1 || this.projectList.contract_type == 2 ){
- //监理抽检
- this.getChildrenContractName();
- }else{
- this.findDivideClient();
- }
- },
- onShow() {
- // this.onLoadData();
- // this.findDivideClient();
- },
- methods: {
- back(){
- uni.navigateBack({
- delta:1
- })
- },
- tabSelect(e) {
- if(this.divisionName=='请选择'){
- this.$prompt.none("请选择分类")
- return;
- }
- this.TabCur = e
- },
- /* 刷新方法 */
- onLoadData() {
- var userInfo = uni.getStorageSync("userInfo")
- if (userInfo) {
- this.userInfo = userInfo;
- }
- var project = uni.getStorageSync("porject"+"_"+uni.getStorageSync("userInfo").id);
- if (project) {
- this.projectList = project; //获取选中的当前项目
- //this.findTask(userInfo.id, this.projectList.contractId);
- } else {
- //this.findProject();
- }
- },
- navTo(value) {
- if (1 != value.type) {
- if (value.url) {
- uni.navigateTo({
- url: value.url
- })
- } else {
- this.$prompt.none("开发中")
- }
- } else { //显示弹窗
- this.$prompt.none("请选择分类和桩号")
- }
- },
- certain() {
- if (this.stake == '请选择' || this.divisionName == '请选择') {
- this.$prompt.none("请选择分类和桩号")
- return;
- }
-
- let text = "?id=" + this.chooseDate.id + "&name=" + this.chooseDate.name;
- if(this.engineeringType){
- text += "&type="+this.engineeringType;
- }
- uni.navigateTo({
- url: "/pages/personBase/personBase"+text
- })
- },
- navToTaskDetails(item) {
- var type;
- if (item.task_category == 2) {
- type = 2
- } else if (item.task_category == 3) {
- type = 3
- } else {
- type = 1
- }
- uni.navigateTo({
- url: "/pages/task/details/details?type=" + type + "&value=0" + "&contractid=" +item.contract_info_id
- })
- },
- search() {
- uni.setStorageSync("pageType", 0);
- uni.navigateTo({
- url: "/pages/search/search"
- })
- },
- /* 获取单位工程、分部工程*/
- findDivideClient() {
- var that = this;
- let obj = {
- contractId:this.projectList.contractId,
- }
- if(this.engineeringType){
- obj.type = this.engineeringType;
- }
-
- that.http.request('/app/divideClient/findDivideClientByType', obj).then((result)=>{
- if(result.datas!=null){
- that.divideClientList = result.datas;
- //console.log(that.divideClientList);
- }else{
- that.$prompt.none("暂无数据")
- }
- });
- },
- /* 选择分部工程*/
- chooseDivision(data) {
- var that =this;
- that.stakeList = [];
- that.divisionName = data.divisionName==null ? data.name:data.divisionName;
- let obj = {
- parentId:data.parentId,
- divisionName:data.divisionName,
- };
- if(this.engineeringType){
- obj.type = this.engineeringType
- }
- that.http.request("/app/divideClient/findBystake",obj).then(res=>{
- if(res.result!="-1"){
- that.stakeList=res.datas;
- this.stake = '请选择'
- //有桩号才跳转
- this.TabCur = 1; //跳转分类
- }else{
- //无桩号直接自动选择
- data.stake = "不限"
- this.stakeList.push(data);
- this.chooseStake(data);
- }
- })
-
-
- },
- /* 选择桩号*/
- chooseStake(data) {
- this.stake = data.stake;
- this.chooseDate = data;
-
- //选择桩号后直接跳转
- this.certain()
- },
-
- //显示切换合同段
- showNoList(){
- this.noShow = !this.noShow;
- },
- changNo(index){
- this.curContractNumber = this.childrenContracts[index].contractNumber;
- this.findDivideClientByTypenew(this.childrenContracts[index].id);
- //设置监理抽检资料合同段id的缓存
- uni.setStorageSync("curContractId", this.childrenContracts[index].id);
- this.noShow = false;
- this.TabCur = 0
- },
-
- //获取字合同段名称
- getChildrenContractName(){
- this.http.request("/app/divideClient/selectcontracttype",{id:this.projectList.children_contract_ids}).then(res=>{
- //console.log(res)
- if(res.datas!=null){
- this.childrenContracts = res.datas;
- this.curContractNumber = res.datas[0].contractNumber;
- this.findDivideClientByTypenew(this.childrenContracts[0].id)
- //设置监理抽检资料合同段id的缓存
- uni.setStorageSync("curContractId", this.childrenContracts[0].id);
- }else{
- this.$prompt.none("暂无数据")
- }
- })
- },
-
- //获取监理抽检树
- findDivideClientByTypenew(id){
- this.http.request('/app/divideClient/findDivideClientByTypenew', {
- contractId:id,
- report_type :'s',
- foldersType :'4',
- supervisor_type : '1'
- }).then((result)=>{
- if(result.datas!=null){
- this.divideClientList = result.datas;
- //console.log(that.divideClientList);
- }else{
- this.$prompt.none("暂无数据")
- }
- });
- }
- },
-
- }
- </script>
- <style lang="scss">
- page{background-color: #fff;}
- .status_bar{height: var(--status-bar-height);width:100%;background:#fff;z-index: 5;position: fixed;left: 0;right: 0;}
- .top_b{z-index: 5;background: #fff;position: fixed;left: 0;top:var(--status-bar-height);width: 750rpx;}
- .top_b_1{display: flex;justify-content: space-around;height: 90rpx;align-items: center;padding: 0 100rpx;}
- .text-blues{color: #AEAEAE;}
- .text-blue_one{position: absolute;bottom: -20rpx;left: 70rpx;width: 134rpx;height: 8rpx;border-radius: 30rpx;background-color: #0A8CD5;}
- .text-blue_ones{position: absolute;bottom: -20rpx;left: 70rpx;width: 134rpx;height: 8rpx;border-radius: 30rpx;background-color: #EF9D1E;}
- .text-blue1{color: #EF9D1E;}
- .tot_button{padding:0rpx 22rpx;}
- .tot_button_1{display: flex;justify-content: space-between;border-bottom: 2rpx solid #E3E1E1;padding: 28rpx 0rpx 20rpx;}
- .tot_button_1 button{width: 342rpx;height: 88rpx;font-size: 32rpx;border-radius: 10rpx;}
- .button_divisionName{color: #0A8CD5;background-color: #C6E6FF;}
- .button_stake{color: #EF9D1E;background-color: #FCF1E2;}
- uni-button:after {border: none;}
- .cu-list.grid {
- background-color: #F7F7F7;
- text-align: center;
- }
- .solid-type {
- border-bottom: 2upx solid black;
- }
- .solid-type-top {
- border-top: 2upx solid rgba(0, 0, 0, 0.1);
- }
- .dashed-type {
- border-bottom: 2upx dashed black;
- }
- .box {
- margin-top: -20rpx;
- }
- .box view.cu-bar {
- margin-top: 20upx;
- }
- .page {
- width: 100vw;
- }
- .page.show {
- overflow: hidden;
- }
- .menuImage {
- height: 110rpx;
- width: 110rpx;
- }
- .shadowType {
- -moz-box-shadow: 2px 2px 6px #D0D0D0;
- -webkit-box-shadow: 2px 2px 6px #D0D0D0;
- box-shadow: 2px 2px 6px #D0D0D0;
- }
- .cu-list.grid>.cu-item uni-text {
- display: block;
- margin-top: 4px;
- color: black;
- font-size: 14px;
- line-height: 17px;
- }
- .cu-dialog {
- position: relative;
- display: inline-block;
- vertical-align: middle;
- margin-left: auto;
- margin-right: auto;
- width: 100%;
- max-width: 100%;
- /* height: 100%; */
- background-color: #f8f8f8;
- border-radius: 4px;
- overflow: hidden;
- }
- .bg-diy-yellow {
- background-color: #FDF1DF;
- }
- .bg-diy-blue {
- background-color: #D7ECF8;
- }
- .menuImageNoTask{width:162rpx;height: 105rpx;margin-top: 60rpx;}
- </style>
|