|
@@ -38,15 +38,16 @@
|
|
|
</uni-file-picker>
|
|
|
</u-form-item>
|
|
|
<u-form-item label="已上传附件" v-if="bianji&&formData.attId.length" labelWidth="100">
|
|
|
- <u-icon name="close" color="#4CB2B6" size="24" @click="closeImage()">
|
|
|
- </u-icon>
|
|
|
- <!-- #ifdef MP-WEIXIN -->
|
|
|
- <text style="color:#00a3f4;cursor: pointer;margin-left: 50rpx !important;"
|
|
|
- @click.native="viewSee(formData.attId[0])">点击预览文件</text>
|
|
|
- <!-- #endif -->
|
|
|
- <!-- #ifdef H5 -->
|
|
|
- <a style="color:#00a3f4;cursor: pointer;margin-left: 50rpx !important;" @click="viewSee(formData.attId[0])">点击预览文件</a>
|
|
|
- <!-- #endif -->
|
|
|
+ <u-icon name="close" color="#4CB2B6" size="24" @click="closeImage()">
|
|
|
+ </u-icon>
|
|
|
+ <!-- #ifdef MP-WEIXIN -->
|
|
|
+ <text style="color:#00a3f4;cursor: pointer;margin-left: 50rpx !important;"
|
|
|
+ @click.native="viewSee(formData.attId[0])">点击预览文件</text>
|
|
|
+ <!-- #endif -->
|
|
|
+ <!-- #ifdef H5 -->
|
|
|
+ <a style="color:#00a3f4;cursor: pointer;margin-left: 50rpx !important;"
|
|
|
+ @click="viewSee(formData.attId[0])">点击预览文件</a>
|
|
|
+ <!-- #endif -->
|
|
|
</u-form-item>
|
|
|
<uni-row class="zan-cun">
|
|
|
<!-- <uni-col :span="12">
|
|
@@ -67,7 +68,7 @@
|
|
|
</u--form>
|
|
|
<!-- 多选closeable closeOnClickOverlay--点击遮罩层不可关闭所属单位的弹出内容选中 ,选择单位-->
|
|
|
<u-popup :show="checkboxShow2" :round="10" @close="checkboxShow2=false" style="position: relative;">
|
|
|
- <!-- <view class="u-page__tag-item">
|
|
|
+ <!-- <view class="u-page__tag-item">
|
|
|
<u-search placeholder="请输入所属单位" v-model="keyword" bgColor="#edf6f9" borderColor="#4cb2b6"
|
|
|
:show-action="false"></u-search>
|
|
|
</view> -->
|
|
@@ -133,8 +134,8 @@
|
|
|
</uni-col>
|
|
|
</uni-row>
|
|
|
</view>
|
|
|
- <view class="page-body" :style="'height:' +(height-wheight -80) + 'px'">
|
|
|
- <scroll-view class="nav-left" scroll-y :style="'height:' + (height-wheight -80) + 'px'"
|
|
|
+ <view class="page-body" :style="'height:' +(height -80) + 'px'">
|
|
|
+ <scroll-view class="nav-left" scroll-y :style="'height:' + (height -80) + 'px'"
|
|
|
:scroll-top="scrollLeftTop" scroll-with-animation>
|
|
|
<view class="nav-left-item" :class="index == categoryActive ? 'active' : ''"
|
|
|
v-for="(item, index) in list" @click="categoryClickMain(index,item)" :key="index">
|
|
@@ -142,8 +143,8 @@
|
|
|
</view>
|
|
|
</scroll-view>
|
|
|
<scroll-view class="nav-right" scroll-y :scroll-top="scrollTop" @scroll="scroll"
|
|
|
- :style="'height:' +(height-wheight -140) + 'px'" scroll-with-animation>
|
|
|
- <view v-for="(item, index) in list" :key="index" class="box">
|
|
|
+ :style="'height:' +(height -140) + 'px'" scroll-with-animation>
|
|
|
+ <view v-for="(item, index) in list" :key="index" class="box" ref="rightItem">
|
|
|
<view style="height: 60rpx;font-size: 32rpx;color:#000;font-weight: 600;padding: 25rpx;">
|
|
|
{{item.label}}
|
|
|
</view>
|
|
@@ -178,7 +179,7 @@
|
|
|
</uni-row>
|
|
|
</view>
|
|
|
<view class="page-body" :style="'height:' + (height - wheight- 80) + 'px'">
|
|
|
- <scroll-view class="nav-left" scroll-y :style="'height:' + (height-80) + 'px'"
|
|
|
+ <scroll-view class="nav-left" scroll-y :style="'height:' + (height- 80) + 'px'"
|
|
|
:scroll-top="scrollLeftTop" scroll-with-animation>
|
|
|
<view class="nav-left-item" :class="index == categoryActive ? 'active' : ''"
|
|
|
v-for="(item, index) in list3Jia" @click="categoryClickMain(index,item)" :key="index">
|
|
@@ -205,8 +206,6 @@
|
|
|
</scroll-view>
|
|
|
</view>
|
|
|
</u-popup>
|
|
|
-
|
|
|
-
|
|
|
<!-- <image :src="jiezhiTime" mode="heightFix" style="width: 20px;height: 20px;"></image> -->
|
|
|
</view>
|
|
|
</view>
|
|
@@ -325,6 +324,7 @@
|
|
|
// trigger: ['blur', 'change']
|
|
|
// }
|
|
|
},
|
|
|
+ categoryActiveIndex: 0,
|
|
|
bianji: false, //是否编辑进来的
|
|
|
ids: '', //创建成功的id
|
|
|
//侧边栏联动
|
|
@@ -332,14 +332,14 @@
|
|
|
categoryActive: 0,
|
|
|
scrollTop: 0,
|
|
|
scrollLeftTop: 0,
|
|
|
- arr: [0, 584, 1168, 1752, 2336, 2805, 3274, 3858, 4442, 4911, 5380, 5734, 6203, 6672,
|
|
|
- 7017
|
|
|
- ], //初始值,后边计算会根据手机适配覆盖
|
|
|
+ arr: [],
|
|
|
+ // arr: [0, 584, 1168, 1752, 2336, 2805, 3274, 3858, 4442, 4911, 5380, 5734, 6203, 6672,
|
|
|
+ // 7017
|
|
|
+ // ], //初始值,后边计算会根据手机适配覆盖
|
|
|
leftItemHeight: 51, //49行会计算出新值进行覆盖
|
|
|
navLeftHeight: 0, //左边scroll-view 内层nav的总高度
|
|
|
diff: 0, //左边scroll-view 内层nav的总高度与视口之差
|
|
|
- tabBarHeight: 0 //如果此页面为Tab页面,自己改变高度值,,一般tab高度为51
|
|
|
-
|
|
|
+ tabBarHeight: 0, //如果此页面为Tab页面,自己改变高度值,,一般tab高度为51
|
|
|
}
|
|
|
},
|
|
|
computed: {},
|
|
@@ -366,13 +366,13 @@
|
|
|
getCheckActiveTaskXin({
|
|
|
id: ids
|
|
|
}).then(response => { //获取编辑主动检查的数据
|
|
|
- console.log(response,'responseresponse');
|
|
|
+ console.log(response, 'responseresponse');
|
|
|
const res = response.data
|
|
|
this.formData.taskName = res.taskInfo.taskName
|
|
|
this.formData.taskContent = res.taskInfo.taskContent
|
|
|
- this.formData.attId[0]= res.taskInfo.attId?res.taskInfo.attId:''
|
|
|
- this.formDataChuangMu.attId= res.taskInfo.attId?res.taskInfo.attId:''
|
|
|
- if (res.orgList&&res.orgList.length != 0) {
|
|
|
+ this.formData.attId[0] = res.taskInfo.attId ? res.taskInfo.attId : ''
|
|
|
+ this.formDataChuangMu.attId = res.taskInfo.attId ? res.taskInfo.attId : ''
|
|
|
+ if (res.orgList && res.orgList.length != 0) {
|
|
|
let item = []
|
|
|
res.orgList.map(v => { //单位
|
|
|
this.formDataChuangMu.orgId.push(v.id)
|
|
@@ -405,7 +405,7 @@
|
|
|
|
|
|
},
|
|
|
onReady() {
|
|
|
-
|
|
|
+
|
|
|
// this.checkedTotal3(this.pageNo) 部门
|
|
|
this.checkedTotal(this.pageNo)
|
|
|
this.getData(this.pageNo)
|
|
@@ -414,13 +414,13 @@
|
|
|
this.$refs.customForm.setRules(this.customRules)
|
|
|
},
|
|
|
methods: {
|
|
|
- closeImage(){
|
|
|
- this.formData.attId=[]
|
|
|
- this.formDataChuangMu.attId =''
|
|
|
+ closeImage() {
|
|
|
+ this.formData.attId = []
|
|
|
+ this.formDataChuangMu.attId = ''
|
|
|
this.$forceUpdate()
|
|
|
},
|
|
|
//查看已上传附件
|
|
|
- viewSee(val){
|
|
|
+ viewSee(val) {
|
|
|
downSee(val)
|
|
|
},
|
|
|
//上传文件
|
|
@@ -478,7 +478,7 @@
|
|
|
checkboxConfirm2() {
|
|
|
this.checkboxShow2 = false
|
|
|
let arr = []
|
|
|
- console.log(this.checkedList2,'this.checkedList2');
|
|
|
+ console.log(this.checkedList2, 'this.checkedList2');
|
|
|
this.checkedList2.map(v => {
|
|
|
v.map(i => {
|
|
|
arr.push(i)
|
|
@@ -587,12 +587,13 @@
|
|
|
if (i && n.length != 0) {
|
|
|
this.checkedList2.push(n)
|
|
|
} else if (i && n.length == 0) {
|
|
|
- this.checkedList2 = this.checkedList2.filter(item => item != i)
|
|
|
+ this.checkedList2 = this.checkedList2.filter(item => item != i)
|
|
|
}
|
|
|
},
|
|
|
// 展示检查项的弹出层
|
|
|
showCheckboxShow(pageNo, value = '') {
|
|
|
this.checkboxShow = true
|
|
|
+ this.getHeightList()
|
|
|
// this.checkedTotal(this.pageNo)
|
|
|
},
|
|
|
// 展示单位选择的弹出层
|
|
@@ -635,23 +636,25 @@
|
|
|
//侧边栏导航联动
|
|
|
getHeightList() {
|
|
|
let _this = this;
|
|
|
- let selectorQuery = uni.createSelectorQuery();
|
|
|
- selectorQuery.selectAll('.nav-left-item').boundingClientRect(function(rects) {
|
|
|
- _this.leftItemHeight = rects[0].height;
|
|
|
- _this.navLeftHeight = _this.leftItemHeight * this.list.length;
|
|
|
- _this.diff = _this.navLeftHeight - _this.height;
|
|
|
- });
|
|
|
- selectorQuery.selectAll('.box').boundingClientRect(function(rects) {
|
|
|
- let arr = [0];
|
|
|
- let top = 0;
|
|
|
- if (rects) {
|
|
|
- rects.forEach(function(rect) {
|
|
|
- top += rect.height;
|
|
|
- arr.push(top);
|
|
|
- });
|
|
|
- };
|
|
|
- _this.arr = arr;
|
|
|
- }).exec();
|
|
|
+ this.$nextTick(() => {
|
|
|
+ let selectorQuery = uni.createSelectorQuery();
|
|
|
+ selectorQuery.selectAll('.nav-left-item').boundingClientRect(rects => {
|
|
|
+ _this.leftItemHeight = rects[0].height;
|
|
|
+ _this.navLeftHeight = _this.leftItemHeight * this.list.length;
|
|
|
+ _this.diff = _this.navLeftHeight - _this.height;
|
|
|
+ });
|
|
|
+ selectorQuery.selectAll('.box').boundingClientRect(function(rects) {
|
|
|
+ let arr = [0];
|
|
|
+ let top = 0;
|
|
|
+ if (rects) {
|
|
|
+ rects.forEach(function(rect) {
|
|
|
+ top += rect.height;
|
|
|
+ arr.push(top);
|
|
|
+ });
|
|
|
+ };
|
|
|
+ _this.arr = arr;
|
|
|
+ }).exec();
|
|
|
+ })
|
|
|
},
|
|
|
scroll(e) {
|
|
|
let _this = this;
|
|
@@ -660,14 +663,14 @@
|
|
|
}
|
|
|
this.timeoutId = setTimeout(function() {
|
|
|
//节流
|
|
|
- _this.scrollHeight = e.detail.scrollTop + 1 + _this.height / 2;
|
|
|
+ _this.scrollHeight = e.detail.scrollTop + 1 + _this.height/7;
|
|
|
//+1不要删除,解决最后一项某种情况下翻到底部,左边按钮并不会切换至最后一个
|
|
|
//若想使切换参考线为屏幕顶部请删除 _this.height/2
|
|
|
for (let i = 0; i < _this.arr.length; i++) {
|
|
|
let height1 = _this.arr[i];
|
|
|
let height2 = _this.arr[i + 1];
|
|
|
if (!height2 || (_this.scrollHeight >= height1 && _this.scrollHeight < height2)) {
|
|
|
- _this.categoryActive = i;
|
|
|
+ _this.categoryActive =i;
|
|
|
_this.diff > 0 && (_this.scrollLeftTop = Math.round((_this.categoryActive * _this
|
|
|
.diff) / (this.list.length - 1)));
|
|
|
return false;
|
|
@@ -679,8 +682,9 @@
|
|
|
},
|
|
|
categoryClickMain(index, item) {
|
|
|
this.categoryActive = index;
|
|
|
- this.scrollTop == this.arr[index] ? (this.scrollTop = this.scrollTop + 1) : (this.scrollTop = this.arr[
|
|
|
- index]); //防止两次相等造成点击不触发滚动时间
|
|
|
+ this.scrollTop = this.arr[index]
|
|
|
+ // this.scrollTop == this.arr[index] ? (this.scrollTop = this.scrollTop + 1) : (this.scrollTop = this.arr[
|
|
|
+ // index]); //防止两次相等造成点击不触发滚动时间
|
|
|
},
|
|
|
getData(pageNo, value = '') {
|
|
|
// this.loading = true
|
|
@@ -713,16 +717,16 @@
|
|
|
getCheckActiveTaskXin({
|
|
|
id: this.formDataChuangMu["id"]
|
|
|
}).then(response => { //获取编辑主动检查单位的数据
|
|
|
- console.log(response,'ressss');
|
|
|
+ console.log(response, 'ressss');
|
|
|
const res = response.data
|
|
|
for (let g in this.list2) {
|
|
|
// g.map(v => { //进入编辑界面以前勾选的检查项把他放进this.list.orgList中添加一个checkedList
|
|
|
this.list2[g].map(i => {
|
|
|
// i.orgDOList.map(listK => {
|
|
|
if (i.id == this.list2[g].id) {
|
|
|
- console.log(i,'[i.id][i.id][i.id]',this.list2);
|
|
|
+ console.log(i, '[i.id][i.id][i.id]', this.list2);
|
|
|
this.list2[g].checkedList2 = [i.id]
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
// })
|
|
|
})
|
|
@@ -918,12 +922,14 @@
|
|
|
}
|
|
|
|
|
|
/deep/ .u-input[data-v-fdbb9fe6],
|
|
|
- /deep/ .u-input.data-v-fdbb9fe6,/deep/ .u-input {
|
|
|
+ /deep/ .u-input.data-v-fdbb9fe6,
|
|
|
+ /deep/ .u-input {
|
|
|
background-color: #fff;
|
|
|
}
|
|
|
|
|
|
/deep/.u-button[data-v-3bf2dba7],
|
|
|
- /deep/.u-button.data-v-3bf2dba7,/deep/.u-button {
|
|
|
+ /deep/.u-button.data-v-3bf2dba7,
|
|
|
+ /deep/.u-button {
|
|
|
width: 60% !important;
|
|
|
}
|
|
|
|
|
@@ -940,7 +946,8 @@
|
|
|
|
|
|
//*号位置
|
|
|
/deep/.u-form-item__body__left__content__required[data-v-5e7216f1],
|
|
|
- /deep/.u-form-item__body__left__content__required.data-v-5e7216f1,/deep/.u-form-item__body__left__content__required {
|
|
|
+ /deep/.u-form-item__body__left__content__required.data-v-5e7216f1,
|
|
|
+ /deep/.u-form-item__body__left__content__required {
|
|
|
left: 14rpx !important;
|
|
|
|
|
|
}
|
|
@@ -1037,7 +1044,8 @@
|
|
|
font-size: 28upx;
|
|
|
background: #fff;
|
|
|
|
|
|
- /deep/.u-checkbox__icon-wrap[data-v-532d01c7],/deep/.u-checkbox__icon-wrap {
|
|
|
+ /deep/.u-checkbox__icon-wrap[data-v-532d01c7],
|
|
|
+ /deep/.u-checkbox__icon-wrap {
|
|
|
//复选框的样式
|
|
|
margin: 0 20rpx;
|
|
|
}
|
|
@@ -1050,7 +1058,8 @@
|
|
|
// /deep/ .u-checkbox__icon-wrap--square{
|
|
|
// margin: 20rpx;
|
|
|
// }
|
|
|
- .u-checkbox-label--right[data-v-532d01c7],.u-checkbox-label--right{
|
|
|
+ .u-checkbox-label--right[data-v-532d01c7],
|
|
|
+ .u-checkbox-label--right {
|
|
|
margin-right: 40rpx;
|
|
|
|
|
|
}
|
|
@@ -1103,15 +1112,15 @@
|
|
|
width: 75%;
|
|
|
position: absolute;
|
|
|
left: 25%;
|
|
|
- bottom: 40rpx;
|
|
|
+ bottom: 20rpx;
|
|
|
z-index: 9999;
|
|
|
background-color: #fff;
|
|
|
}
|
|
|
|
|
|
-
|
|
|
- .zan-cun{
|
|
|
+
|
|
|
+ .zan-cun {
|
|
|
margin-top: 200rpx;
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
|
|
|
.u-page__tag-item {
|
|
@@ -1119,7 +1128,10 @@
|
|
|
margin: 30rpx 0;
|
|
|
margin-left: 5%;
|
|
|
}
|
|
|
- .box[data-v-524457c8]:last-child,.box.data-v-524457c8:last-child,.box:last-child{
|
|
|
+
|
|
|
+ .box[data-v-524457c8]:last-child,
|
|
|
+ .box.data-v-524457c8:last-child,
|
|
|
+ .box:last-child {
|
|
|
padding-bottom: 354rpx;
|
|
|
}
|
|
|
-</style>
|
|
|
+</style>
|