Browse Source

fix: 解决冲突

test2
xuesinan 4 years ago
parent
commit
852e776e91
  1. 1
      CHANGELOG.md
  2. 17
      common/styles/theme/default.scss
  3. 2
      components/Globals/Globals.vue
  4. 22
      plugins/p-deliver-check/p-deliver-check.vue
  5. 76
      plugins/p-deliver-upload/p-deliver-upload.vue
  6. 13
      plugins/p-deliver/p-deliver.vue
  7. 6
      plugins/p-finance/p-finance.vue
  8. 3
      utils/upload.js

1
CHANGELOG.md

@ -8,6 +8,7 @@
财务 | 细节调整;根据任务获取财务条信息 | [414106a](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/414106a)
- | 插件的填写提交,编辑与删除 | [84390d5](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/84390d5)
- | 插件的填写与提交,修改与删除 | [d461252](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/d461252)
- | 插件调用 | [9146b40](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/9146b40)
- | 插件面板分开显示 | [fb5e86b](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/fb5e86b)
- | 插件api | [08bdf74](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/08bdf74)
- | 登录、日历页小绿点、二级项目列表 | [e676cf0](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/e676cf0)

17
common/styles/theme/default.scss

@ -4,15 +4,14 @@
.u-card {
font-size: 16px !important;
background-color: #f3f3f3 !important;
.mask {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 100;
}
}
.mask {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 100;
}
// 弹出层 内容盒子
.modal-content-wrap {

2
components/Globals/Globals.vue

@ -11,7 +11,7 @@
<template v-slot:body>
<scroll-view :scrollY="true" :style="{ 'max-height': globalsHeight - 30 + 'px' }">
<!-- 骨架屏 -->
<skeleton :banner="false" :loading="showGlobalSkeleton" :row="3" animate class="u-line-2 skeleton"></skeleton>
<!-- <skeleton :banner="false" :loading="showGlobalSkeleton" :row="3" animate class="u-line-2 skeleton"></skeleton> -->
<view class="grid">
<view

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

@ -2,9 +2,23 @@
<view class="p-3">
<!-- 交付物名称 -->
<view class="flex justify-between" @click="collapsed = !collapsed">
<!-- {{ deliverData ? deliverData.deliverName : '' }} -->
<view class="relative">
{{ deliverData ? deliverData.deliverName : '' }}审核状态
<text> {{ deliverData ? deliverData.deliverName : '' }} 审核状态 </text>
<!-- 有提交记录 有检查人 检查人里有我 且状态是null或者0 才显示小红点 -->
<u-badge
size="mini"
:is-dot="true"
style="transform: translate3d(2em, -1em, 0)"
v-show="
deliverData.details &&
deliverData.details.length &&
deliverData.checkerList &&
deliverData.checkerList.length &&
deliverData.checkerList.find(item => item.isMine && !item.status)
"
></u-badge>
</view>
<!-- 展开折叠按钮 -->
<u-icon :name="collapsed ? 'arrow-up' : 'arrow-down'"></u-icon>
</view>
@ -59,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 !== null">
<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>
@ -72,7 +86,7 @@
</template>
<script setup>
import { ref, reactive, inject } from 'vue';
import { ref, reactive, inject, computed } from 'vue';
import dayjs from 'dayjs';
import checkFormModal from './check-form-modal.vue';

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

@ -4,8 +4,14 @@
<!-- 插件名称输入和提交 -->
<view class="flex item-center justify-between py-2">
<view class="flex-1">
<text v-if="deliver.deliverName">
<text v-if="deliver.deliverName" class="relative">
{{ deliver.deliverName }}
<u-badge
size="mini"
:is-dot="true"
style="transform: translate3d(2em, -1em, 0)"
v-show="!deliver.details || !deliver.details.length"
></u-badge>
</text>
</view>
@ -79,7 +85,7 @@ import { UPLOAD_EXTENSION } from '@/config/deliver';
const deliver = inject('deliver');
const task = inject('task');
const store = useStore();
const emits = defineEmits(['upload-success']);
const emits = defineEmits(['upload-success', 'edit-success']);
const reviewerRef = ref(null);
const submitBtnLoading = ref(false);
@ -165,6 +171,11 @@ function paste() {
//
async function uploadFile() {
// #ifdef APP-PLUS
uni.$ui.showToast('APP暂不支持上传文件')
// #endif
// #ifdef H5
try {
const data = await uni.$upload.chooseAndUpload(UPLOAD_URL, {}, UPLOAD_EXTENSION, 'files');
// console.log(data[0]);
@ -172,34 +183,52 @@ async function uploadFile() {
} catch (error) {
console.error('error: ', error);
}
}
// #endif
// TODO:
async function uploadPhoto() {
try {
const data = await uni.$upload.chooseAndUpload(UPLOAD_URL, {}, UPLOAD_EXTENSION, 'files');
// console.log(data[0])
linkValue.value = data[0].visitUrl;
} catch (error) {
console.error('error: ', error);
}
}
//
// function photos (){
// uni.chooseImage({
// count: 1, //9
// sizeType: ['original', 'compressed'], //
// sourceType: ['album','camera'], //
// success: function (res) {
// linkValue.value = JSON.stringify(res.tempFilePaths)
// }
// });
// }
function uploadPhoto (){
uni.$ui.hideLoading();
let timer = null;
clearTimeout(timer);
uni.chooseImage({
count: 1, //9
sizeType: ['original', 'compressed'], //
sourceType: ['album','camera'], //
success: (res) => {
if (!timer) {
timer = setTimeout(() => {
uni.$ui.showLoading('正在上传...');
timer = null;
}, 800);
}
const tempFilePaths = res.tempFilePaths;
uni.uploadFile({
url: UPLOAD_URL, //
filePath: tempFilePaths[0],
name: 'files',
formData: {},
success: (res) => {
clearTimeout(timer);
uni.$ui.hideLoading();
const data = JSON.parse(res.data)
if(data.code === 200){
linkValue.value = data.data[0].visitUrl;
}
},
fail: error => {
clearTimeout(timer);
uni.$ui.hideLoading();
console.error('error',error)
},
});
}
});
}
//
async function confirmEditDeliverName() {
// TODO: task
if (!newInputRef.value) {
uni.$ui.showToast('输入不能为空');
}
@ -211,6 +240,7 @@ async function confirmEditDeliverName() {
};
await uni.$u.api.editDeliverName(param);
// uni.$ui.showToast('');
emits('edit-success');
//
showEditModal.value = false;
showMask.value = false;

13
plugins/p-deliver/p-deliver.vue

@ -1,9 +1,18 @@
<template>
<view>
<!-- 上传提交 -->
<p-deliver-upload v-if="isMine && deliver" @upload-success="getDeliverData" class="p-2"></p-deliver-upload>
<p-deliver-upload
v-if="isMine && deliver"
@upload-success="getDeliverData"
class="p-2"
@edit-success="getDeliverData"
></p-deliver-upload>
<p-deliver-check v-if="deliver" @check-success="getDeliverData" class="p-2"></p-deliver-check>
<p-deliver-check
v-if="deliver && deliver.details && deliver.details.length"
@check-success="getDeliverData"
class="p-2"
></p-deliver-check>
</view>
</template>

6
plugins/p-finance/p-finance.vue

@ -30,14 +30,16 @@
<script setup>
import { ref, inject } from 'vue';
import useGenerateWebviewParam from '@/hooks/project/useGenerateWebviewParam';
const task = inject('task');
const data = ref(null);
const { projectId, projectName, token } = useGenerateWebviewParam();
//
async function getFinanceByTaskData() {
try {
const detailId = task.detailId;
const { detailId } = task;
data.value = await uni.$u.api.getFinanceByTask(detailId);
} catch (error) {
console.log('getFinanceByTaskData error: ', error);
@ -49,7 +51,7 @@ getFinanceByTaskData();
//
function openFinance() {
// DEBUG:
uni.$ui.openDetail({ url: 'http://www.baidu.com', name: '财务' });
uni.$ui.openDetail({ url: `http://121.36.3.207/finance/applicant?name=财务&token=${token}&projectId=${projectId}&id=${task.id}&pn=${projectName}&tn=${task.name}` });
}
</script>

3
utils/upload.js

@ -114,5 +114,6 @@ export default {
reject(error);
});
});
},
},
};

Loading…
Cancel
Save