|
@@ -1,7 +1,8 @@
|
|
|
<script setup>
|
|
|
import { closeToast, showLoadingToast, showToast } from 'vant'
|
|
|
import Pdfh5 from 'pdfh5'
|
|
|
-
|
|
|
+import { userInfo } from "~/store/user";
|
|
|
+const { user_id } = userInfo;
|
|
|
const { currentRoute } = useRouter()
|
|
|
const route = currentRoute.value
|
|
|
const gw_id = route.query.gw_id
|
|
@@ -23,7 +24,8 @@ function getData() {
|
|
|
detailData.value = res.data.one_info
|
|
|
shjl.value = res.data.one_info.shjl
|
|
|
const appendUrl = res.data.one_info.gw_content.split('|')[0]
|
|
|
- const curFileShowUrl = appendUrl.replace(/\.\w+$/, '.pdf')
|
|
|
+ const curFileShowUrl = window.globalVariables.api
|
|
|
+ + appendUrl.replace(/\.\w+$/, '.pdf')
|
|
|
const pdfh5 = new Pdfh5('#pdfContent', {
|
|
|
pdfurl: curFileShowUrl,
|
|
|
scrollEnable: false,
|
|
@@ -36,7 +38,13 @@ getData()
|
|
|
const auditchecked = ref('')
|
|
|
const auditDialogShow = ref(false)
|
|
|
const sh_reason = ref('')
|
|
|
-function clickAudit() {
|
|
|
+function clickAudit(item) {
|
|
|
+ let ShPerson = item.sh_user_id;
|
|
|
+ let localPerson = user_id;
|
|
|
+ if (ShPerson !== localPerson) {
|
|
|
+ showToast('请审核自己的项目')
|
|
|
+ return
|
|
|
+ }
|
|
|
auditchecked.value = ''
|
|
|
sh_reason.value = ''
|
|
|
auditDialogShow.value = true
|
|
@@ -47,7 +55,7 @@ function beforeCloseDialog(action) {
|
|
|
showToast('请选择审核结果')
|
|
|
return false
|
|
|
}
|
|
|
- else if ((auditchecked.value === '2') && sh_reason.value == '') {
|
|
|
+ else if (sh_reason.value == '') {
|
|
|
showToast('请填写意见')
|
|
|
return false
|
|
|
}
|
|
@@ -177,7 +185,7 @@ function dialogSubmit() {
|
|
|
通过
|
|
|
</div>
|
|
|
<div v-else-if="item.sh_status == 1">
|
|
|
- <van-button class="rightButton" type="primary" @click.stop="clickAudit()">
|
|
|
+ <van-button class="rightButton" type="primary" @click.stop="clickAudit(item)">
|
|
|
审核
|
|
|
</van-button>
|
|
|
</div>
|
|
@@ -201,10 +209,8 @@ function dialogSubmit() {
|
|
|
</div>
|
|
|
</div>
|
|
|
<div id="pdfContent" />
|
|
|
- <van-dialog
|
|
|
- v-model:show="auditDialogShow" title="审核" confirm-button-text="提交" show-cancel-button
|
|
|
- :before-close="beforeCloseDialog"
|
|
|
- >
|
|
|
+ <van-dialog v-model:show="auditDialogShow" title="审核" confirm-button-text="提交" show-cancel-button
|
|
|
+ :before-close="beforeCloseDialog">
|
|
|
<div class="dialogDiv">
|
|
|
<van-radio-group v-model="auditchecked">
|
|
|
<van-cell-group inset>
|
|
@@ -220,7 +226,7 @@ function dialogSubmit() {
|
|
|
</van-cell>
|
|
|
</van-cell-group>
|
|
|
</van-radio-group>
|
|
|
- <van-field v-if="auditchecked === '3'" v-model="sh_reason" rows="3" autosize type="textarea" placeholder="填写意见" />
|
|
|
+ <van-field v-model="sh_reason" rows="3" autosize type="textarea" placeholder="填写意见" />
|
|
|
</div>
|
|
|
</van-dialog>
|
|
|
</div>
|