Browse Source

perf: 解决冲突

test2
song 4 years ago
parent
commit
dfb145a2dc
  1. 1
      CHANGELOG.md
  2. 17
      common/styles/theme/default.scss
  3. 10
      components/Adv/Adv.vue
  4. 2
      components/Calendar/Calendar.vue
  5. 2
      components/Globals/Globals.vue
  6. 6
      components/Plugin/Plugin.vue
  7. 24
      components/Upload/Upload.vue
  8. 5
      manifest.json
  9. 61
      pages/index/index.vue
  10. 4
      pages/user/login.vue
  11. 22
      plugins/p-deliver-check/p-deliver-check.vue
  12. 20
      plugins/p-deliver-upload/p-deliver-upload.vue
  13. 13
      plugins/p-deliver/p-deliver.vue
  14. 3
      plugins/p-domain-source-manage/p-domain-source-manage.vue
  15. 3
      plugins/p-project-version-management/p-project-version-management.vue
  16. BIN
      static/headimg.png
  17. BIN
      static/headimg4.png

1
CHANGELOG.md

@ -93,6 +93,7 @@
交付物 | 重构交付物审核部分,修复审核bug | [5fd8889](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/5fd8889) 交付物 | 重构交付物审核部分,修复审核bug | [5fd8889](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/5fd8889)
- | 解决默认角色不是第一个时显示出错问题 | [8dba578](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/8dba578) - | 解决默认角色不是第一个时显示出错问题 | [8dba578](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/8dba578)
- | 解决warning | [dcb0079](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/dcb0079) - | 解决warning | [dcb0079](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/dcb0079)
- | 拍照上传交付物 | [1cbb2ac](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/1cbb2ac)
- | 日历列表H5在手机端不显示 | [0b4ae72](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/0b4ae72) - | 日历列表H5在手机端不显示 | [0b4ae72](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/0b4ae72)
- | 删除多余的引入 | [050b12a](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/050b12a) - | 删除多余的引入 | [050b12a](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/050b12a)
- | 上个提交导致的bug | [7524b24](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/7524b24) - | 上个提交导致的bug | [7524b24](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/7524b24)

17
common/styles/theme/default.scss

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

10
components/Adv/Adv.vue

@ -19,7 +19,7 @@
import { useStore } from 'vuex'; import { useStore } from 'vuex';
const store = useStore(); const store = useStore();
const indicatorDots = true; const indicatorDots = false;
const autoplay = true; const autoplay = true;
const advs = computed(() => store.state.advs); const advs = computed(() => store.state.advs);
const imgs = ref([]); const imgs = ref([]);
@ -32,7 +32,7 @@
imgs.value = JSON.parse(advs.value); imgs.value = JSON.parse(advs.value);
}) })
const time = ref(5); const time = ref(10);
let timer = setInterval(() => { let timer = setInterval(() => {
time.value--; time.value--;
@ -92,12 +92,12 @@
right: 10px; right: 10px;
display: inline-block; display: inline-block;
width: 60px; width: 60px;
height: 24px; height: 30px;
line-height: 22px; line-height: 30px;
font-size: 12px; font-size: 12px;
text-align: center; text-align: center;
background-color: rgba(255, 255, 255, .7); background-color: rgba(255, 255, 255, .7);
border-radius: 12px; border-radius: 15px;
color: #666; color: #666;
border: 1px solid #eee; border: 1px solid #eee;
} }

2
components/Calendar/Calendar.vue

@ -100,7 +100,7 @@ const props = defineProps({
}, },
}); });
const emit = defineEmits(['handleFindPoint', 'handleFindPoint', 'days-change', 'selected-change']); const emit = defineEmits(['handleFindPoint', 'days-change', 'selected-change']);
const data = reactive({ const data = reactive({
weeks: ['日', '一', '二', '三', '四', '五', '六'], // weeks: ['日', '一', '二', '三', '四', '五', '六'], //

2
components/Globals/Globals.vue

@ -11,7 +11,7 @@
<template v-slot:body> <template v-slot:body>
<scroll-view :scrollY="true" :style="{ 'max-height': globalsHeight - 30 + 'px' }"> <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 class="grid">
<view <view

6
components/Plugin/Plugin.vue

@ -22,8 +22,12 @@
<p-source-manage v-else-if="pluginId === '16'" class="p-2" /> <p-source-manage v-else-if="pluginId === '16'" class="p-2" />
<p-finance-audit v-else-if="pluginId === '17'" class="p-2" /> <p-finance-audit v-else-if="pluginId === '17'" class="p-2" />
<p-finance v-else-if="pluginId === '18'" class="p-2" /> <p-finance v-else-if="pluginId === '18'" class="p-2" />
<!-- TODO:需要新的id绑定 个人和终端按钮--> <!-- 个人和终端按钮-->
<!-- <p-account-management /> --> <!-- <p-account-management /> -->
<p-account-management v-else-if="pluginId === '19'" class="p-2" />
<p-domain-source-manage v-else-if="pluginId === '20'" class="p-2" />
<p-project-version-management v-else-if="pluginId === '21'" class="p-2" />
<Render <Render
v-else v-else
:task="task" :task="task"

24
components/Upload/Upload.vue

@ -1,18 +1,17 @@
<template> <template>
<view class="upload"> <view class="upload">
<u-icon name="plus" size="24px" class="flex justify-center w-12 h-12 bg-blue-100 rounded-full shadow-md" <u-icon
@click="handleUpload"></u-icon> name="plus"
size="24px"
class="flex justify-center w-12 h-12 bg-blue-100 rounded-full shadow-md"
@click="handleUpload"
></u-icon>
</view> </view>
</template> </template>
<script setup> <script setup>
import { import { computed, ref } from 'vue';
computed, import { useStore } from 'vuex';
ref
} from 'vue';
import {
useStore
} from 'vuex';
import Config from '@/common/js/config.js'; import Config from '@/common/js/config.js';
const emit = defineEmits(['success', 'error']); const emit = defineEmits(['success', 'error']);
@ -25,6 +24,11 @@
// wbs // wbs
const handleUpload = async cur => { const handleUpload = async cur => {
// #ifdef APP-PLUS
uni.$ui.showToast('APP暂不支持导入');
// #endif
// #ifndef APP-PLUS
if (list.value.length === 1) { if (list.value.length === 1) {
store.commit('setDomain', list.value[0].url); store.commit('setDomain', list.value[0].url);
@ -35,7 +39,6 @@
if (confirm) { if (confirm) {
try { try {
const res = await uni.$u.api.import(); const res = await uni.$u.api.import();
console.log('2222', res)
// WBS // WBS
// //
// emit('success'); // emit('success');
@ -57,6 +60,7 @@
url: '/pages/business/business' url: '/pages/business/business'
}) })
} }
// #endif
}; };
async function getList() { async function getList() {

5
manifest.json

@ -79,14 +79,15 @@
} }
}, },
"splashscreen" : { "splashscreen" : {
"androidStyle" : "common" "androidStyle" : "default"
} }
}, },
"safearea" : { "safearea" : {
"bottom" : { "bottom" : {
"offset" : "none" "offset" : "none"
} }
} },
"nativePlugins" : {}
}, },
/* */ /* */
"quickapp" : {}, "quickapp" : {},

61
pages/index/index.vue

@ -22,7 +22,8 @@
<view class="relative"> <view class="relative">
<!-- <view class="relative" @touchmove="onMove"> --> <!-- <view class="relative" @touchmove="onMove"> -->
<!-- 日历 --> <!-- 日历 -->
<Calendar @selected-change="onDateChange" :show-back="true" ref="calendar" @handleFindPoint="handleFindPoint" /> <!-- <Calendar @selected-change="onDateChange" :show-back="true" ref="calendar" @handleFindPoint="handleFindPoint" /> -->
<Calendar @selected-change="onDateChange" :show-back="true" ref="calendar" />
<!-- 上传 导入wbs --> <!-- 上传 导入wbs -->
<Upload @success="onUploadSuccess" @error="onUploadError" /> <Upload @success="onUploadSuccess" @error="onUploadError" />
@ -30,7 +31,7 @@
<view class="login-box absolute" @click="toLogin"> <view class="login-box absolute" @click="toLogin">
<text v-if="!userInfo">游客</text> <text v-if="!userInfo">游客</text>
<image v-else src="../../static/headimg.png" mode=""></image> <image v-else src="../../static/headimg4.png" mode=""></image>
</view> </view>
<!-- <u-button class="mt-4" @click="toLogin">登录</u-button> --> <!-- <u-button class="mt-4" @click="toLogin">登录</u-button> -->
@ -60,7 +61,7 @@
}); });
getProjects(); getProjects();
handleFindPoint(); // handleFindPoint();
// token // token
watchEffect(() => { watchEffect(() => {
@ -89,16 +90,17 @@
}); });
} }
async function handleFindPoint(start, end) { //
try { // async function handleFindPoint(start, end) {
const startTime = start || dayjs().startOf('month').valueOf(); // try {
const endTime = end || dayjs().endOf('month').valueOf(); // const startTime = start || dayjs().startOf('month').valueOf();
const res = await uni.$u.api.findRedPoint(startTime, endTime); // const endTime = end || dayjs().endOf('month').valueOf();
store.commit('project/setDotList', res); // const res = await uni.$u.api.findRedPoint(startTime, endTime);
} catch (error) { // store.commit('project/setDotList', res);
console.log('error: ', error); // } catch (error) {
} // console.log('error: ', error);
} // }
// }
// //
const onDateChange = event => { const onDateChange = event => {
@ -148,6 +150,29 @@
uni.navigateTo({ uni.navigateTo({
url: '/pages/user/login' url: '/pages/user/login'
}); });
} else {
uni.showModal({
content: '是否退出登录',
success: ({ confirm }) => {
if (confirm) {
signout();
}
}
})
}
}
/**
* 退出登录
*/
function signout() {
try {
store.commit('user/setToken', '');
store.commit('user/setUser', '');
uni.$storage.setStorageSync('anyringToken', '');
uni.$storage.setStorageSync('user', '');
} catch (e) {
//TODO handle the exception
} }
} }
</script> </script>
@ -186,15 +211,19 @@
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
width: 50px; width: 40px;
height: 50px; height: 40px;
border-radius: 50%; border-radius: 50%;
background-color: #eeeeee; background-color: #eeeeee;
text-align: center; text-align: center;
line-height: 50px; line-height: 40px;
border: 1px solid #ddd; border: 1px solid #ddd;
overflow: hidden; overflow: hidden;
text {
font-size: 12px;
}
image { image {
display: inline-block; display: inline-block;
width: 40px; width: 40px;

4
pages/user/login.vue

@ -4,6 +4,8 @@
</view> </view>
<view class="u-p-l-50 u-p-r-50 u-p-t-30"> <view class="u-p-l-50 u-p-r-50 u-p-t-30">
<view class="mt-5 mb-10 text-4xl text-center">登录</view>
<u-form :model="form" ref="phoneLoginForm" :error-type="['message']"> <u-form :model="form" ref="phoneLoginForm" :error-type="['message']">
<u-form-item label="手机号码" prop="phone" label-width="160"> <u-form-item label="手机号码" prop="phone" label-width="160">
<u-input placeholder="请输入手机号" v-model="form.phone" type="number"></u-input> <u-input placeholder="请输入手机号" v-model="form.phone" type="number"></u-input>
@ -16,7 +18,7 @@
<u-form-item label="验证码" prop="smsCode" label-width="160"> <u-form-item label="验证码" prop="smsCode" label-width="160">
<u-input @focus="mixinInit.hasvalue(form, renderData)" placeholder="请输入验证码" v-model="form.smsCode" type="text"></u-input> <u-input @focus="mixinInit.hasvalue(form, renderData)" placeholder="请输入验证码" v-model="form.smsCode" type="text"></u-input>
<u-button slot="right" type="primary" size="mini" v-show="mixinInit.dataObj.showPaste" @click="mixinInit.setCode" class="u-m-r-20">粘贴</u-button> <!-- <u-button slot="right" type="primary" size="mini" v-show="mixinInit.dataObj.showPaste" @click="mixinInit.setCode" class="u-m-r-20">粘贴</u-button> -->
<u-button slot="right" size="mini" v-if="mixinInit.dataObj.showInterval">{{ mixinInit.dataObj.interval }}</u-button> <u-button slot="right" size="mini" v-if="mixinInit.dataObj.showInterval">{{ mixinInit.dataObj.interval }}</u-button>
</u-form-item> </u-form-item>

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

@ -2,9 +2,23 @@
<view class="p-3"> <view class="p-3">
<!-- 交付物名称 --> <!-- 交付物名称 -->
<view class="flex justify-between" @click="collapsed = !collapsed"> <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> <u-icon :name="collapsed ? 'arrow-up' : 'arrow-down'"></u-icon>
</view> </view>
@ -59,7 +73,7 @@
<text v-if="item.status === 1" class="text-green-600"> 已通过 </text> <text v-if="item.status === 1" class="text-green-600"> 已通过 </text>
<text v-else-if="item.status === 2" class="text-red-600"> 已驳回 </text> <text v-else-if="item.status === 2" class="text-red-600"> 已驳回 </text>
</view> </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> <text class="text-yellow-500 font-medium">{{ item.score }}</text>
</zwp-ring-timing> </zwp-ring-timing>
</view> </view>
@ -72,7 +86,7 @@
</template> </template>
<script setup> <script setup>
import { ref, reactive, inject } from 'vue'; import { ref, reactive, inject, computed } from 'vue';
import dayjs from 'dayjs'; import dayjs from 'dayjs';
import checkFormModal from './check-form-modal.vue'; import checkFormModal from './check-form-modal.vue';

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

@ -4,8 +4,14 @@
<!-- 插件名称输入和提交 --> <!-- 插件名称输入和提交 -->
<view class="flex item-center justify-between py-2"> <view class="flex item-center justify-between py-2">
<view class="flex-1"> <view class="flex-1">
<text v-if="deliver.deliverName"> <text v-if="deliver.deliverName" class="relative">
{{ deliver.deliverName }} {{ 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> </text>
</view> </view>
@ -79,7 +85,7 @@ import { UPLOAD_EXTENSION } from '@/config/deliver';
const deliver = inject('deliver'); const deliver = inject('deliver');
const task = inject('task'); const task = inject('task');
const store = useStore(); const store = useStore();
const emits = defineEmits(['upload-success']); const emits = defineEmits(['upload-success', 'edit-success']);
const reviewerRef = ref(null); const reviewerRef = ref(null);
const submitBtnLoading = ref(false); const submitBtnLoading = ref(false);
@ -165,12 +171,20 @@ function paste() {
// //
async function uploadFile() { async function uploadFile() {
// #ifdef APP-PLUS
uni.$ui.showToast('APP暂不支持上传文件')
// #endif
// #ifdef H5
try { try {
const data = await uni.$upload.chooseAndUpload(UPLOAD_URL, {}, UPLOAD_EXTENSION, 'files'); const data = await uni.$upload.chooseAndUpload(UPLOAD_URL, {}, UPLOAD_EXTENSION, 'files');
// console.log(data[0]);
linkValue.value = data[0].visitUrl; linkValue.value = data[0].visitUrl;
} catch (error) { } catch (error) {
console.error('error: ', error); console.error('error: ', error);
} }
// #endif
} }
// //
@ -215,7 +229,6 @@ function uploadPhoto (){
// //
async function confirmEditDeliverName() { async function confirmEditDeliverName() {
// TODO: task
if (!newInputRef.value) { if (!newInputRef.value) {
uni.$ui.showToast('输入不能为空'); uni.$ui.showToast('输入不能为空');
} }
@ -227,6 +240,7 @@ async function confirmEditDeliverName() {
}; };
await uni.$u.api.editDeliverName(param); await uni.$u.api.editDeliverName(param);
// uni.$ui.showToast(''); // uni.$ui.showToast('');
emits('edit-success');
// //
showEditModal.value = false; showEditModal.value = false;
showMask.value = false; showMask.value = false;

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

@ -1,9 +1,18 @@
<template> <template>
<view> <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> </view>
</template> </template>

3
plugins/p-domain-source-manage/p-domain-source-manage.vue

@ -1,11 +1,10 @@
<!-- 资源管理 --> <!-- 资源管理 -->
<template> <template>
<button class="text-xs bg-blue-500 text-white leading-6" style="width: 500rpx" @click="openSourceManage">域资源管理</button> <button class="text-xs bg-blue-500 text-white leading-6" style="width: 500rpx" @click="openSourceManage">域资源管理</button>
</template> </template>
<script setup> <script setup>
function openSourceManage() { function openSourceManage() {
// DEBUG:
uni.$ui.openDetail({ url: 'https://www.taobao.com/', name: '域资源管理' }); uni.$ui.openDetail({ url: 'https://www.taobao.com/', name: '域资源管理' });
} }
</script> </script>

3
plugins/p-project version management/p-project version management.vue → plugins/p-project-version-management/p-project-version-management.vue

@ -1,11 +1,10 @@
<!-- 资源管理 --> <!-- 项目版本管理 -->
<template> <template>
<button class="text-xs bg-blue-500 text-white leading-6" style="width: 500rpx" @click="openSourceManage">项目版本管理</button> <button class="text-xs bg-blue-500 text-white leading-6" style="width: 500rpx" @click="openSourceManage">项目版本管理</button>
</template> </template>
<script setup> <script setup>
function openSourceManage() { function openSourceManage() {
// DEBUG:
uni.$ui.openDetail({ url: 'https://www.taobao.com/', name: '项目版本管理' }); uni.$ui.openDetail({ url: 'https://www.taobao.com/', name: '项目版本管理' });
} }
</script> </script>

BIN
static/headimg.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

BIN
static/headimg4.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Loading…
Cancel
Save