Browse Source

Merge branch 'deliver' of ssh://101.201.226.163:50022/TALL/TALL-MUI-4 into deliver

deliver
wally 4 years ago
parent
commit
4f7cdd9820
  1. 25
      CHANGELOG.md
  2. 70
      common/styles/tailwind.scss
  3. 31
      common/styles/theme/default.scss
  4. 3
      components/Globals/Globals.vue
  5. 19
      components/ModalBox/ModalBox.vue
  6. 91
      components/Reviewer/Reviewer.vue
  7. 11
      pages.json
  8. 26
      pages/submitlist/submitlist.vue
  9. 194
      plugins/p-deliver/p-deliver.vue
  10. 3
      plugins/p-task-title/p-task-title.vue
  11. 69
      project.config.json

25
CHANGELOG.md

@ -2,6 +2,31 @@
### 🌟 新功能
# 1.0.0 (2022-01-13)
### 🌟 新功能
| 范围 | 描述 | commitId |
| ------- | ---------------------------- | ------------------------------------------------------------------------ |
| - | 表单验证 | [8f3bc1e](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/8f3bc1e) |
| - | 插件的填写与提交,修改与删除 | [d461252](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/d461252) |
| - | 更新代码 | [392c8cc](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/392c8cc) |
| - | 日历页首页 | [561c8e6](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/561c8e6) |
| - | 日历页添加 | [1b46a91](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/1b46a91) |
| - | 时间轴接口 | [a95d005](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/a95d005) |
| - | 时间轴页面 | [e926b75](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/e926b75) |
| - | 时间轴展示 | [8b1b380](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/8b1b380) |
| - | 使用 uview 完成 api 请求 | [1b3efd8](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/1b3efd8) |
| - | 添加 timeline | [72dad2b](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/72dad2b) |
| - | 项目操作面板 | [3beb05e](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/3beb05e) |
| - | 项目列表 | [a52e6d5](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/a52e6d5) |
| - | 账户名密码登录 | [ebf456e](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/ebf456e) |
| - | app.vue | [970cf9a](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/970cf9a) |
| - | first commit | [8dc26de](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/8dc26de) |
| project | 日常任务面板添加 | [b3f16ff](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/b3f16ff) |
| theme | theme demo | [9175758](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/9175758) |
| - | vue3 | [12ed2ad](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/12ed2ad) |
| 范围 | 描述 | commitId |
| ------- | ------------------------ | ------------------------------------------------------------------------ |
| - | app.vue | [970cf9a](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/970cf9a) |

70
common/styles/tailwind.scss

@ -2199,6 +2199,9 @@
margin-left: -1px;
}
.border-none{
border-style: none;
}
.box-border {
box-sizing: border-box;
}
@ -2215,7 +2218,12 @@
--tw-border-opacity: 1;
border-color: rgba(209, 213, 219, var(--tw-border-opacity));
}
.border{
border-width: 1px;
}
.border-solid{
border-style: solid;
}
.block {
display: block;
}
@ -2696,7 +2704,12 @@
.overflow-hidden {
overflow: hidden;
}
.visible{
visibility: visible;
}
.invisible{
visibility: hidden;
}
.overflow-visible {
overflow: visible;
}
@ -4336,9 +4349,21 @@
height: 0.75rem;
}
.h5{
height: 1.25rem;
}
.h-10{
height: 2.5rem;
}
.h-full {
height: 100%;
}
.leading-10{
line-height: 2.5rem;
}
.bg-gray-50 {
--tw-bg-opacity: 1;
background-color: rgba(249, 250, 251, var(--tw-bg-opacity));
@ -4367,7 +4392,10 @@
}
.h-12 {
height: 3rem;
height: 3.15rem;
}
.h-8{
height: 2.2rem;
}
.bg-white {
--tw-bg-opacity: 1;
@ -4465,6 +4493,10 @@
box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
}
.rounded-md{
border-radius: 0.375rem;
}
.shadow-md {
--tw-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
@ -4494,3 +4526,35 @@
--tw-shadow: 0 0 #0000;
box-shadow: var(--tw-ring-offset-shadow, 0 0 #0000), var(--tw-ring-shadow, 0 0 #0000), var(--tw-shadow);
}
.bg-red-500{
--tw-bg-opacity: 1;
background-color: rgba(239, 68, 68, var(--tw-bg-opacity));
}
.bg-yellow-500{
--tw-bg-opacity: 1;
background-color: rgba(245, 158, 11, var(--tw-bg-opacity));
}
.leading-12{
line-height: 3.15rem;
}
.rounded-w-12{
border-radius: 1.5rem;
}
.bg-opacity-100{
--tw-bg-opacity: 1;
}
.bg-grey{
background-color: rgba(0,0,0,0.5);
}
.rounded-md{
border-radius: 0.375rem;
}
.border-t{
border-top-width: 1px;
}
.border-gray-200{
--tw-border-opacity: 1;
border-color: rgba(229, 231, 235, var(--tw-border-opacity));
}

31
common/styles/theme/default.scss

@ -1,10 +1,27 @@
// 默认主题文件
.theme-default {
background-color: #007aff;
// color: #fff;
background-color: #f3f3f3;
.u-card {
font-size: 24px !important;
color: #0f0;
font-size: 16px !important;
background-color: #f3f3f3 !important;
.deliverHead {
align-items: center;
}
.btns u-button {
margin: 0 !important;
}
.active {
background-color: #2979ff;
color: #ffffff;
}
.mask {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 100;
}
}
.u-navbar {
background-color: #007aff !important;
@ -13,7 +30,7 @@
color: #fff !important;
}
}
button{
border: none!important;
}
button {
border: none !important;
}
}

3
components/Globals/Globals.vue

@ -14,7 +14,7 @@
<skeleton :banner="false" :loading="showGlobalSkeleton" :row="3" animate class="u-line-2 skeleton"></skeleton>
<view class="grid gap-2">
<view v-for="item in globals" :key="item.id">
<template v-if="item.plugins && item.plugins.length">
<template v-if="item.plugins && item.plugins.length">
<view v-for="(pluginArr, i) in item.plugins" :key="i">
<template class="p-0 u-col-between" v-if="pluginArr.length">
<Plugin
@ -61,6 +61,7 @@ function openCard() {
store.commit('task/setShrink', false);
}
}
</script>
<style scoped lang="scss">

19
components/ModalBox/ModalBox.vue

@ -0,0 +1,19 @@
<template>
<!-- 标题部分 -->
<view>
ssss
</view>
<!-- 输入框 -->
<view>
</view>
<!-- 按钮 -->
</template>
<script>
</script>
<style>
</style>

91
components/Reviewer/Reviewer.vue

@ -0,0 +1,91 @@
<template>
<view class="deliverFoot border border-solid border-gray-300 rounded-md mt-3 p-2">
<view class="top flex justify-between">
<view class="mr-3">
审核人
</view>
<!-- 展示选择的审核人 -->
<view class="flex approver item-center truncate justify-end flex-1 text-sm" v-show="isUicon">
<view v-for="item in computedDelivers">
<view v-show="item.checked" class="mx-1">
{{item.name}}
</view>
</view>
</view>
<!-- 点击更换图标 -->
<view>
<u-icon v-if="isUicon" name="arrow-down" @click="changeIcon"></u-icon>
<u-icon v-else="isUicon" name="arrow-up" @click="changeIcon"></u-icon>
</view>
</view>
<!-- 隐藏的审核人选项 -->
<view v-show="!isUicon" class="foot mt-2 flex flex-wrap">
<u-button
v-for="item in delivers"
size="mini" class="my-1 mx-2"
@click="item.checked = !item.checked"
:class="item.checked ? 'active' : '' "
>
{{item.name}}
</u-button>
</view>
</view>
</template>
<script setup>
import {ref , reactive , computed }from 'vue'
//
let isUicon = ref('true')
//
const delivers = reactive([
{
checked:true,
name:'冯教授'
},
{
checked:false,
name:'陈历珺'
},
{
checked:false,
name:'张野'
},
{
checked:false,
name:'宋瑞芳'
},
{
checked:false,
name:'张斌'
},
{
checked:false,
name:'孙方圆'
}
])
//
const computedDelivers = computed(()=>{
let arr = [];
delivers.forEach((item)=>{
if(item.checked){
arr.push(item)
}
if(arr.length>3){
arr = arr.splice(0,3)
arr[3] = {checked:true,name:'...'}
}
})
return arr
})
//
function changeIcon(){
isUicon.value = !isUicon.value
}
</script>
<style lang="scss">
</style>

11
pages.json

@ -29,7 +29,16 @@
"navigationBarTextStyle": "white"
}
}
],
,{
"path" : "pages/submitList/submitList",
"style" :
{
"navigationStyle": "historty",
"navigationBarTitleText": "历史交付物"
}
}
],
"globalStyle": {
"navigationBarTextStyle": "black",
"navigationBarTitleText": "TALL",

26
pages/submitlist/submitlist.vue

@ -0,0 +1,26 @@
<template>
<theme class="h-full w-full pt-1">
<view class="bg-white mx-5 my-2 rounded-md p-3">
<view class="flex justify-between text-gray-400 mb-2">
<view>插件名</view> <view>提交时间</view>
</view>
<view class="text-blue-400 mb-2">
链接
</view>
<view class="mb-2 text-gray-400">审核人</view>
</view>
</theme>
</template>
<script>
export default {
data() {
return {
};
}
}
</script>
<style lang="scss">
</style>

194
plugins/p-deliver/p-deliver.vue

@ -1,18 +1,196 @@
<template>
<view class="box shadow-lg">
<view class="deliver-container">p-deliver</view>
<!-- <view class="deliver-container">p-deliver</view> -->
<view class="my-2 bg-white p-2 rounded-md relative" @longpress="logoTime" v-if="deliverRef">
<!-- 插件名称输入和提交 -->
<view class="flex item-center justify-between py-3 pl-2" :class="inputRef">
<u-input v-model="iptValue" type="text" :border="false" placeholder="请编辑交付物名称" />
<view class="self-center" :class="viewRef">{{ iptValue }}</view>
<u-button type="primary" size="mini" @click="submit" class="self-center" :disabled="sbumitState">提交</u-button>
<u-icon v-show="historyIcon" name="arrow-right" class="ml-1" @click="historical"></u-icon>
</view>
<view :class="viewRef" class="py-3 pl-2">
<span class="relative px-1">
<u-badge :is-dot="true" is-center></u-badge>
{{ iptValue }}
</span>
</view>
<!-- 插件上传方式 -->
<view>
<u-input v-model="linkValue" type="text" :border="true" placeholder="请输入交付物地址/链接"> </u-input>
<view class="btns flexitems-start mt-3">
<u-button size="mini" :plain="true" style="color: #007aff" class="mr-3" @click="paste">粘贴</u-button>
<u-button size="mini" :plain="true" style="color: #007aff" class="mr-3" @click="getfile">文件</u-button>
<u-button size="mini" :plain="true" style="color: #007aff" class="mr-3" @click="photos">拍照</u-button>
</view>
</view>
<!-- 提示框 -->
<u-toast ref="tips" />
<!-- 取消和确定 -->
<u-mask :show="showRef" @click="showRef = false">
<view class="warp">
<view class="rect rounded-md" @tap.stop>
<view class="text-center my-7 font-semibold"> 交付物标题名称 </view>
<view class="">
<u-input :border="true" class="m-5" placeholder="请输入交付物名称" v-model="newInputRef" />
</view>
<view class="flex justify-around h-12 mt-7 justify-self-stretch" style="border-top: 1px solid #d1d5db">
<view class="leading-12 flex-1 text-center" style="border-right: 1px solid #d1d5db" @click="cancelClick"> 取消 </view>
<view class="text-blue-700 leading-12 flex-1 text-center" @click="sureClick"> 确定 </view>
</view>
</view>
</view>
</u-mask>
<!-- 编辑和删除的遮罩层 -->
<view class="mask flex items-center justify-center bg-grey" :class="maskRef" @click="close">
<view class="bg-yellow-500 text-white w-12 h-12 text-center leading-12 rounded-w-12 mx-8" @click="revisePlugin" @tap.stop>修改</view>
<view class="bg-red-500 text-white w-12 h-12 text-center leading-12 rounded-w-12 mx-8" @click="deletePlugin" @tap.stop>删除</view>
</view>
<!-- 插件审核人员选择 -->
<Reviewer />
</view>
</template>
<script setup>
import { ref, computed, reactive } from 'vue';
//
const deliverRef = ref(true);
const iptValue = ref('');
const linkValue = ref('');
const historyIcon = ref(false);
const tips = ref('');
const showRef = ref(false);
const maskRef = ref('hidden');
const inputRef = ref('block');
const viewRef = ref('hidden');
const newInputRef = ref('');
const submitHistory = reactive([]);
//
const sbumitState = computed(() => !(iptValue.value && linkValue.value));
//
function getTime() {
const MM = uni.$dayjs().$M + 1;
const DD = uni.$dayjs().$D;
const HH = uni.$dayjs().$H;
const mm = uni.$dayjs().$m;
const getTime = MM + '/' + DD + ' ' + HH + ':' + (mm < 10 ? '0' + mm : mm);
return getTime;
}
//
function submit() {
const reg = /^http(s)?:\/\/([\w-]+\.)+[\w-]+(\/[\w- ./?%&=]*)?$/;
if (!reg.test(linkValue.value)) {
// toast
uni.$ui.showToast('请输入正确的链接');
} else {
inputRef.value = 'hidden';
viewRef.value = 'block';
const time = getTime();
const obj = {};
obj.name = iptValue.value;
obj.time = time;
obj.link = linkValue.value;
submitHistory.push(obj);
console.log(submitHistory);
}
}
//
function historical() {
uni.navigateTo({
url: '/pages/submitList/submitList',
});
}
//
function paste() {
uni.getClipboardData({
success: function (res) {
linkValue.value = res.data;
},
});
}
//
function getfile() {
uni.chooseFile({
count: 1, //100
extension: ['.zip', '.doc'],
success: function (res) {
linkValue.value = JSON.stringify(res.tempFilePaths);
},
});
}
//
function photos() {
uni.chooseImage({
count: 1, //9
sizeType: ['original', 'compressed'], //
sourceType: ['album', 'camera'], //
success: function (res) {
linkValue.value = JSON.stringify(res.tempFilePaths);
},
});
}
function close() {
maskRef.value = 'hidden';
}
//
function logoTime() {
if (viewRef.value === 'block') {
maskRef.value = 'block';
}
}
//
function revisePlugin() {
showRef.value = true;
}
//
function cancelClick() {
showRef.value = false;
// maskRef.value = 'hidden'
}
//
function sureClick() {
iptValue.value = newInputRef.value;
newInputRef.value = '';
inputRef.value = 'block';
viewRef.value = 'hidden';
historyIcon.value = true;
showRef.value = false;
maskRef.value = 'hidden';
}
//
function deletePlugin() {
deliverRef.value = false;
}
</script>
<style scoped lang="scss">
.box{
border-radius: 8px;
background: #fff;
padding: 16px;
overflow: hidden;
}
.box {
border-radius: 8px;
background: #fff;
padding: 16px;
overflow: hidden;
}
.warp {
display: flex;
align-items: center;
justify-content: center;
height: 80%;
}
.rect {
width: 80%;
height: 380rpx;
background-color: #fff;
}
</style>

3
plugins/p-task-title/p-task-title.vue

@ -1,8 +1,9 @@
<template>
<!-- 任务名插件 -->
<view class="box shadow-lg">
<view>{{ task.name }}</view>
<view class="bg-white rounded-md h-10 leading-10 pl-2">{{ task.name }}</view>
</view>
</template>
<script setup>

69
project.config.json

@ -0,0 +1,69 @@
{
"description": "项目配置文件",
"packOptions": {
"ignore": []
},
"setting": {
"bundle": false,
"userConfirmedBundleSwitch": false,
"urlCheck": true,
"scopeDataCheck": false,
"coverView": true,
"es6": true,
"postcss": true,
"compileHotReLoad": false,
"lazyloadPlaceholderEnable": false,
"preloadBackgroundData": false,
"minified": true,
"autoAudits": false,
"newFeature": false,
"uglifyFileName": false,
"uploadWithSourceMap": true,
"useIsolateContext": true,
"nodeModules": false,
"enhance": true,
"useMultiFrameRuntime": true,
"useApiHook": true,
"useApiHostProcess": true,
"showShadowRootInWxmlPanel": true,
"packNpmManually": false,
"enableEngineNative": false,
"packNpmRelationList": [],
"minifyWXSS": true,
"showES6CompileOption": false,
"minifyWXML": true
},
"compileType": "miniprogram",
"libVersion": "2.21.3",
"appid": "wx0d9aabee071e228e",
"projectname": "TALL",
"debugOptions": {
"hidedInDevtools": []
},
"scripts": {},
"staticServerOptions": {
"baseURL": "",
"servePath": ""
},
"isGameTourist": false,
"condition": {
"search": {
"list": []
},
"conversation": {
"list": []
},
"game": {
"list": []
},
"plugin": {
"list": []
},
"gamePlugin": {
"list": []
},
"miniprogram": {
"list": []
}
}
}
Loading…
Cancel
Save