Browse Source

fix: 修改角色栏骨架屏

develop
song 4 years ago
parent
commit
c18efb33c3
  1. 2
      .env.development
  2. 2
      .env.production
  3. 1
      CHANGELOG.md
  4. 4
      rest/http-client.env.json
  5. 1
      src/App.vue
  6. 45
      src/components/Upload/Upload.vue
  7. 2
      src/pages.json
  8. 11
      src/pages/index/index.vue
  9. 2
      src/pagesProject/project/components/NotEvaluated/NotEvaluated.vue
  10. 12
      src/pagesProject/project/components/Roles/Roles.vue
  11. 1
      src/pagesUser/git-phone-power/git-phone-power.vue
  12. 9
      src/pagesYanyuan/assess/assess.vue

2
.env.development

@ -3,5 +3,5 @@ VUE_APP_BASE_URL=https://test.tall.wiki
VUE_APP_API_URL=https://test.tall.wiki/gateway
VUE_APP_MSG_URL=wss://test.tall.wiki/websocket/message/v4.0/ws
VUE_APP_PROJECT_PATH=https://test.tall.wiki/tall-project
VUE_APP_YY_API_URL=http://192.168.0.99/gateway
VUE_APP_YY_API_URL=https://test.tall.wiki/gateway
VUE_APP_VERSION=v3.2.0

2
.env.production

@ -3,5 +3,5 @@ VUE_APP_BASE_URL=https://www.tall.wiki
VUE_APP_API_URL=https://www.tall.wiki/gateway
VUE_APP_MSG_URL=wss://www.tall.wiki/websocket/message/v4.0/ws
VUE_APP_PROJECT_PATH=https://www.tall.wiki/tall-project
VUE_APP_YY_API_URL=http://192.168.0.99/gateway
VUE_APP_YY_API_URL=https://test.tall.wiki/gateway
VUE_APP_VERSION=v3.2.0

1
CHANGELOG.md

@ -133,6 +133,7 @@
- | 1.任务 角色切换显示加载中... 2.题目图片大小等比例修改 | [22f8cc8](https://dd.tall.wiki/gitea/binbin0314/yanyuan_js/commits/22f8cc8)
- | 1.时间轴上下滑动页面有更新感bug修复 2.没有定位在当天的任务上bug修复 | [b423ce7](https://dd.tall.wiki/gitea/binbin0314/yanyuan_js/commits/b423ce7)
- | 1.时间轴数据渲染 2.时间基准线 | [d643af2](https://dd.tall.wiki/gitea/binbin0314/yanyuan_js/commits/d643af2)
- | 1.添加血脂小数点 2.修改当前题号缓存机制 | [ce35b31](https://dd.tall.wiki/gitea/binbin0314/yanyuan_js/commits/ce35b31)
- | api 存storage | [81032ba](https://dd.tall.wiki/gitea/binbin0314/yanyuan_js/commits/81032ba)
ID1000343 | 解决向下预加载查询参数时间没+1颗粒度;以及滚动加载颗粒度写死的问题 | [940603a](https://dd.tall.wiki/gitea/binbin0314/yanyuan_js/commits/940603a), closes [#ID1000343](https://dd.tall.wiki/gitea/binbin0314/yanyuan_js/issues/ID1000343)
plugin | 插件解析机制完善 | [0f5a27d](https://dd.tall.wiki/gitea/binbin0314/yanyuan_js/commits/0f5a27d)

4
rest/http-client.env.json

@ -6,10 +6,10 @@
},
"dev": {
"name": "dev",
"url": "http://192.168.0.99/gateway"
"url": "https://test.tall.wiki/gateway"
},
"local": {
"version": "v2",
"url": "http://192.168.0.99/gateway"
"url": "https://test.tall.wiki/gateway"
}
}

1
src/App.vue

@ -12,6 +12,7 @@ export default {
//
if (options.query && options.query.scene) {
const scene = options.query.scene;
console.log('scene: ', scene);
const toolCode = scene.substring(scene.length - 10);
this.setEnterByCode(true);
this.setToolCode(toolCode);

45
src/components/Upload/Upload.vue

@ -37,32 +37,13 @@
></u-icon>
</view>
<!-- 选择老人 -->
<!-- :async-close="true" -->
<u-modal v-model="showElder" title="选择老人" @confirm="confirmModel" @cancel="cancelModel" ref="uModal" :show-cancel-button="true">
<ChooseElder></ChooseElder>
</u-modal>
<!-- 设置使用者 -->
<!-- :async-close="true" -->
<u-modal
v-model="showUser"
title="设置使用者"
@confirm="confirmSetUserModel"
@cancel="cancelSetUserModel"
ref="uModal"
:show-cancel-button="true"
>
<ChooseUser></ChooseUser>
</u-modal>
<!-- 全局提示框 -->
<u-top-tips ref="uTips"></u-top-tips>
</view>
</template>
<script>
import { mapState, mapGetters, mapActions } from 'vuex';
import { mapState, mapGetters, mapMutations } from 'vuex';
import toolMixin from '@/mixins/tool';
export default {
@ -78,7 +59,7 @@ export default {
},
methods: {
...mapActions('yanyuan', ['getBindTool']),
...mapMutations('yanyuan', ['setToolCode']),
// wbs
async handleUpload() {
@ -122,9 +103,8 @@ export default {
success(res) {
const arr = res.path.split('=');
const toolCode = arr && arr.length ? arr[arr.length - 1] : '';
if (toolCode) {
that.submit(toolCode);
}
that.setToolCode(toolCode.substring(toolCode.length - 10));
that.$emit('bindTool');
},
fail() {
that.failMsg('扫码失败');
@ -145,23 +125,6 @@ export default {
},
});
},
/**
* 绑定工具箱
*/
async submit(toolCode) {
try {
const code = toolCode.substring(toolCode.length - 10);
const params = { toolCode: code };
await this.getBindTool(params);
setTimeout(() => {
this.$t.ui.showToast('工具箱绑定成功');
this.initTool();
}, 2000);
} catch (error) {
console.error('error: ', error.msg || '工具箱绑定失败');
}
},
},
};
</script>

2
src/pages.json

@ -102,7 +102,7 @@
"path": "git-phone-power/git-phone-power",
"style": {
"navigationBarTitleText": "授权信息",
"navigationStyle": "custom"
"navigationStyle": "default"
}
}
]

11
src/pages/index/index.vue

@ -4,7 +4,12 @@
<!-- 日历 -->
<Calendar @selected-change="onDateChange" :show-back="true" ref="calendar" @handleFindPoint="handleFindPoint" />
<!-- 上传 导入wbs -->
<Upload @success="onUploadSuccess" @error="onUploadError" style="z-index: 9999; position: absolute; right: 0; bottom: 0" />
<Upload
@success="onUploadSuccess"
@error="onUploadError"
@bindTool="bindTool"
style="z-index: 9999; position: absolute; right: 0; bottom: 0"
/>
<!-- #ifdef H5 -->
<!-- #endif -->
</view>
@ -68,6 +73,7 @@ export default {
user(value) {
if (value.wxInfo && value.wxInfo.nickname && value.phone) {
if (this.options && this.options.scene && !this.options.code) {
console.log('watch user:', this.toolCode);
//
this.homeIdentity();
}
@ -77,6 +83,7 @@ export default {
onShow() {
if (!this.token) return;
console.log('onShow');
this.getProjects();
this.handleFindPoint();
this.setProject();
@ -85,6 +92,7 @@ export default {
async onLoad(options) {
this.options = options;
if (options.code === 'true') {
console.log('onLoad options: ', options);
//
await this.homeIdentity();
}
@ -187,6 +195,7 @@ export default {
async bindTool() {
try {
const params = { toolCode: this.toolCode };
console.log('params: ', params);
await this.getBindTool(params);
this.initTool();
} catch (error) {

2
src/pagesProject/project/components/NotEvaluated/NotEvaluated.vue

@ -39,6 +39,7 @@ export default {
this.setTask(task);
this.setCode('NLCP');
const arr = this.$t.storage.getStorageSync('NLCPNum').split('+');
console.log('arr: ', arr);
const pid = arr[0];
const num = pid === this.projectId ? arr[1] : 0;
@ -47,6 +48,7 @@ export default {
reportId: task.id,
num: num ? num - 0 + 1 : 1,
};
console.log('params: ', params);
await this.handleQuestion(params);
uni.navigateTo({ url: '/pagesYanyuan/assess/assess' });
} catch (error) {

12
src/pagesProject/project/components/Roles/Roles.vue

@ -1,6 +1,6 @@
<template>
<view class="px-2 bg-white wrap">
<view class="home-box u-skeleton">
<view class="home-box u-skeleton" v-if="!loading">
<scroll-view :enable-flex="true" :scroll-left="scrollLeft" :throttle="false" scroll-with-animation scroll-x @scroll="scroll">
<view class="tab-box flex justify-between">
<!-- 角色项
@ -53,15 +53,17 @@
</scroll-view>
</view>
<!-- 骨架屏 -->
<u-skeleton :animation="true" :loading="loading" bg-color="#fff"></u-skeleton>
<skeleton :banner="false" :loading="loading" :row="1" animate class="skeleton"></skeleton>
</view>
</template>
<script>
import { mapState, mapMutations, mapActions } from 'vuex';
import Skeleton from '../Skeleton/Skeleton';
export default {
name: 'Roles',
components: { Skeleton },
data() {
return {
tabIndex: 0, // 访 index 0
@ -69,9 +71,9 @@ export default {
scrollLeft: 0, // scrollview
loading: false, //
roles: [
{ id: 1, name: '项目经理', mine: 1, pm: 1, sequence: 1, type: 0 },
{ id: 2, name: '运维', mine: 0, pm: 0, sequence: 2, type: 0 },
{ id: 3, name: '设置', mine: 0, pm: 0, sequence: 2, type: 1 },
{ id: 1, name: ' ', mine: 1, pm: 1, sequence: 1, type: 0 },
{ id: 2, name: ' ', mine: 0, pm: 0, sequence: 2, type: 0 },
{ id: 3, name: ' ', mine: 0, pm: 0, sequence: 2, type: 1 },
],
roleLeft: 0,

1
src/pagesUser/git-phone-power/git-phone-power.vue

@ -167,6 +167,7 @@ export default {
//
back() {
let url = '';
console.log('this.enterByCode: ', this.enterByCode);
if (this.enterByCode) {
url = `/pages/index/index?u=${this.userId}&code=true`;
} else {

9
src/pagesYanyuan/assess/assess.vue

@ -1,6 +1,5 @@
<template>
<view class="flex flex-col p-3">
<u-button @click="aaa">清缓存</u-button>
<!-- 全局提示框 -->
<u-top-tips ref="uTips"></u-top-tips>
@ -50,14 +49,6 @@ export default {
...mapMutations('task', ['setIsEvaluated', 'setTimeNode']),
...mapMutations('yanyuan', ['setQuestionInfo', 'setAssessResult', 'setOptionId', 'setIsTest']),
...mapActions('yanyuan', ['handleQuestion']),
aaa() {
if (this.code === 'NLCP') {
this.$t.storage.setStorageSync('NLCPNum', this.projectId + '+' + 0);
}
if (this.code === 'ZARIT') {
this.$t.storage.setStorageSync('ZARITNum', this.projectId + '+' + 0);
}
},
//
openAnswerPage() {

Loading…
Cancel
Save