Browse Source

refactor: 细节调整;

删除多余的console;修复text嵌套标签的问题;修复圆环得分prop type不匹配的问题;修复交付物url正则不能验证#等格式的问题
test2
wally 4 years ago
parent
commit
d11b35af38
  1. 3
      CHANGELOG.md
  2. 7
      hooks/project/useInit.js
  3. 2
      pages/checkLog/checkLog.vue
  4. 2
      pages/project/project.vue
  5. 2
      pages/submitLog/submitLog.vue
  6. 2
      plugins/p-deliver-check/p-deliver-check.vue
  7. 16
      plugins/p-deliver-upload/p-deliver-upload.vue
  8. 4
      plugins/p-deliver/p-deliver.vue

3
CHANGELOG.md

@ -1,4 +1,4 @@
# 1.0.0 (2022-01-28)
# 1.0.0 (2022-01-29)
### 🌟 新功能
范围|描述|commitId
@ -175,6 +175,7 @@
- | 为了演示所有人都能看到交付物插件 | [0e14ba9](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/0e14ba9)
- | 细节调整 | [7f9cf1f](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/7f9cf1f)
- | 细节调整 | [3d1c463](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/3d1c463)
- | 细节调整;交付物记录没有数据显示empty | [79c3051](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/79c3051)
- | 项目列表 | [0486e98](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/0486e98)
- | 修改插件名的输入框和查看历史记录 | [99fb88e](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/99fb88e)
- | 修改错误单词‘confirmDeleDte’ | [ddbb04c](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/ddbb04c)

7
hooks/project/useInit.js

@ -25,13 +25,13 @@ export default function useInit() {
const data = await uni.$u.api.findProjectById(params);
store.commit('project/setProject', data);
} catch (error) {
console.log('error: ', error || '获取项目信息失败');
console.error('error: ', error || '获取项目信息失败');
}
}
// 获取到角色列表,设置所有任务对应的角色
function setAllTasksByRoles(roles) {
let arr = allTasks.value;
const arr = allTasks.value;
if (roles && roles.length) {
roles.forEach(role => {
const item = { role };
@ -84,8 +84,7 @@ export default function useInit() {
uni.$ui.showToast('缺少项目信息参数'); // 没有项目id参数
} else {
if (options.p !== uni.$storage.getStorageSync('projectId')) {
console.log('切项目了');
store.commit('role/setRoleId', '')
store.commit('role/setRoleId', '');
uni.$storage.setStorageSync('roleId', '');
store.commit('task/setAllTasks', []);
}

2
pages/checkLog/checkLog.vue

@ -17,7 +17,7 @@
<view class="mb-1 text-green-600" v-if="item.status === 1"> 已通过 </view>
<view class="mb-1 text-red-600" v-if="item.status === 2"> 已驳回 </view>
<view v-if="+item.score > 0">
<zwp-ring-timing mode="chart" :value="item.score" active-color="#F59E0B" :radius="30" bar-width="4">
<zwp-ring-timing mode="chart" :value="item.score" active-color="#F59E0B" :radius="30" :bar-width="4">
<text class="text-yellow-500 font-medium">{{ item.score }}</text>
</zwp-ring-timing>
</view>

2
pages/project/project.vue

@ -83,7 +83,6 @@ watch(roleId, newValue => {
&& allTasks.value[roleIndex.value].task
) return;
console.log('当角色发生变化时', newValue);
store.commit('task/setTimeNode', Date.now());
}
});
@ -95,7 +94,6 @@ watch(roleId, newValue => {
*/
watch(timeNode, newValue => {
if (newValue && roleId.value) {
console.log('当时间基准点发生变化时');
clearTasksData();
//
getGlobalData(); //

2
pages/submitLog/submitLog.vue

@ -29,7 +29,7 @@
<view v-else-if="checkItem.status === 1">
<view class="text-green-600 mb-1">已通过</view>
<zwp-ring-timing mode="chart" :value="checkItem.score" active-color="#F59E0B" :radius="30" bar-width="4">
<zwp-ring-timing mode="chart" :value="checkItem.score" active-color="#F59E0B" :radius="30" :bar-width="4">
<text class="text-yellow-500 font-medium">{{ checkItem.score }}</text>
</zwp-ring-timing>
</view>

2
plugins/p-deliver-check/p-deliver-check.vue

@ -73,7 +73,7 @@
<text v-if="item.status === 1" class="text-green-600"> 已通过 </text>
<text v-else-if="item.status === 2" class="text-red-600"> 已驳回 </text>
</view>
<zwp-ring-timing mode="chart" :value="item.score" active-color="#F59E0B" radius="30" bar-width="4" v-if="item.score">
<zwp-ring-timing mode="chart" :value="item.score" active-color="#F59E0B" :radius="30" :bar-width="4" v-if="item.score">
<text class="text-yellow-500 font-medium">{{ item.score }}</text>
</zwp-ring-timing>
</view>

16
plugins/p-deliver-upload/p-deliver-upload.vue

@ -4,7 +4,7 @@
<!-- 插件名称输入和提交 -->
<view class="flex item-center justify-between py-2">
<view class="flex-1">
<text v-if="deliver.deliverName" class="relative">
<view v-if="deliver.deliverName" class="relative inline-block">
{{ deliver.deliverName }}
<u-badge
size="mini"
@ -12,7 +12,7 @@
style="transform: translate3d(2em, -1em, 0)"
v-show="!deliver.details || !deliver.details.length"
></u-badge>
</text>
</view>
</view>
<!-- 提交 -->
@ -103,7 +103,7 @@ const projectId = computed(() => store.getters['project/projectId']);
//
function validateDeliverForm(checkedCheckers) {
const reg = /^http(s)?:\/\/([\w-]+\.)+[\w-]+(\/[\w- ./?%&=]*)?$/;
const reg = /[a-zA-z]+:\/\/[^\s]*/;
if (!reg.test(linkValue.value)) {
// toast
uni.$ui.showToast('请输入正确的链接');
@ -192,9 +192,9 @@ function uploadPhoto() {
let timer = null;
clearTimeout(timer);
uni.chooseImage({
count: 1, //9
sizeType: ['original', 'compressed'], //
sourceType: ['album', 'camera'], //
count: 1, // 9
sizeType: ['original', 'compressed'], //
sourceType: ['album', 'camera'], //
success: res => {
if (!timer) {
timer = setTimeout(() => {
@ -202,9 +202,9 @@ function uploadPhoto() {
timer = null;
}, 800);
}
const tempFilePaths = res.tempFilePaths;
const { tempFilePaths } = res;
uni.uploadFile({
url: UPLOAD_URL, //
url: UPLOAD_URL, //
filePath: tempFilePaths[0],
name: 'files',
formData: {},

4
plugins/p-deliver/p-deliver.vue

@ -2,14 +2,14 @@
<view>
<!-- 上传提交 v-if="isMine && deliver" -->
<!-- TODO: 2022年春节为了演示所有人都能看到交付物插件 -->
<p-deliver-upload
<p-deliver-upload
v-if="deliver"
@upload-success="getDeliverData"
class="p-2"
@edit-success="getDeliverData"
></p-deliver-upload>
<p-deliver-check
<p-deliver-check
v-if="deliver && deliver.details && deliver.details.length"
@check-success="getDeliverData"
class="p-2"

Loading…
Cancel
Save