|
|
@ -4,15 +4,18 @@ |
|
|
|
<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-input v-model="iptValue" type="text" :border="false" placeholder="请编辑交付物名称" /> --> |
|
|
|
<view v-model="textValue" class="flex-1"> |
|
|
|
{{textValue}} |
|
|
|
</view> |
|
|
|
<view class="self-center" :class="viewRef">{{textValue}}</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}} |
|
|
|
{{textValue}} |
|
|
|
</span> |
|
|
|
</view> |
|
|
|
<!-- 插件上传方式 --> |
|
|
@ -26,7 +29,6 @@ |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<!-- 提示框 --> |
|
|
|
<u-toast ref="tips" /> |
|
|
|
|
|
|
|
<!-- 取消和确定 --> |
|
|
|
<u-mask :show="showRef" @click="showRef = false"> |
|
|
@ -56,30 +58,30 @@ |
|
|
|
<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/> |
|
|
|
<Reviewer ref="reviewerData"></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 deliverRef = ref(true) //交付物插件的显示与销毁 |
|
|
|
const textValue = ref('入职插件V0.8原型输出') // 插件名的值 |
|
|
|
const linkValue = ref('') //链接的值 |
|
|
|
const historyIcon = ref(false) //查看历史记录的图标 |
|
|
|
const showRef = ref(false) //编辑和删除页面 |
|
|
|
const maskRef = ref('hidden') //带模态框的遮罩 |
|
|
|
const inputRef = ref('block') //未点击提交按钮的状态框 |
|
|
|
const viewRef = ref('hidden') // 点击提交按钮后的状态框 |
|
|
|
const newInputRef = ref('') //修改的插件名的值 |
|
|
|
const submitHistory = reactive([]) //提交的历史记录列表 |
|
|
|
const reviewerData = ref() |
|
|
|
|
|
|
|
// const aa = this.$reviewer.arrList |
|
|
|
|
|
|
|
// 判断提交按钮的状态 |
|
|
|
const sbumitState = computed(()=>!(iptValue.value && linkValue.value)) |
|
|
|
const sbumitState = computed(()=>!( linkValue.value)) |
|
|
|
|
|
|
|
// 获取当前时间 |
|
|
|
function getTime(){ |
|
|
@ -87,8 +89,7 @@ |
|
|
|
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 |
|
|
|
return (MM + '/' + DD + ' ' + HH + ':' + (mm < 10 ? '0' + mm : mm)) |
|
|
|
} |
|
|
|
// 提交后验证链接并修改状态 |
|
|
|
function submit(){ |
|
|
@ -99,21 +100,27 @@ |
|
|
|
}else{ |
|
|
|
inputRef.value = 'hidden' |
|
|
|
viewRef.value = 'block' |
|
|
|
const time = getTime() |
|
|
|
|
|
|
|
// 创建提交的历史对象 |
|
|
|
const obj = {} |
|
|
|
obj.name = iptValue.value |
|
|
|
const time = getTime() |
|
|
|
obj.name = textValue.value |
|
|
|
obj.time = time |
|
|
|
obj.link = linkValue.value |
|
|
|
obj.deliver = reviewerData.value.arrList |
|
|
|
submitHistory.push(obj) |
|
|
|
console.log(submitHistory) |
|
|
|
// console.log(submitHistory) |
|
|
|
// console.log(reviewerData.value.arrList) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
// 查看历史记录 |
|
|
|
function historical(){ |
|
|
|
let editItem = submitHistory |
|
|
|
uni.navigateTo({ |
|
|
|
url: '/pages/submitList/submitList' |
|
|
|
url: '/pages/submitList/submitList?editItem=' + encodeURIComponent(JSON.stringify(editItem)) |
|
|
|
}); |
|
|
|
// console.log(editItem) |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
@ -171,7 +178,7 @@ function cancelClick(){ |
|
|
|
} |
|
|
|
// 修改界面的确定按钮事件 |
|
|
|
function sureClick (){ |
|
|
|
iptValue.value = newInputRef.value |
|
|
|
textValue.value = newInputRef.value |
|
|
|
newInputRef.value = '' |
|
|
|
inputRef.value = 'block' |
|
|
|
viewRef.value = 'hidden' |
|
|
|