|
|
@@ -51,7 +51,7 @@
|
|
|
</el-col>
|
|
|
<el-col :span="16">
|
|
|
<el-form-item label="草图文件:">
|
|
|
- <hc-form-upload v-if="baseForm.pictureUrl" v-model="baseForm.pictureUrl" :options="{ preview: false }" @item="pictureUrlItem" />
|
|
|
+ <hc-form-upload v-if="baseForm.pictureUrl" v-model="baseForm.pictureUrl" />
|
|
|
<div v-else class="form-item-div">暂无文件</div>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
@@ -109,11 +109,9 @@
|
|
|
<hc-form-upload
|
|
|
v-model="baseForm.fileList" is-del is-res
|
|
|
:disabled="!isEdits || taskInfo.status === 2 || taskInfo.status === 3 || tableInfo.status === 1"
|
|
|
- :options="{ type: 'list', props: uploadFormProps, preview: false, isArr: true, num: 0 }"
|
|
|
+ :options="{ type: 'list', props: uploadFormProps, isArr: true, num: 0 }"
|
|
|
:upload="{ options: { multiple: false } }"
|
|
|
- @success="uploadFileSuccess"
|
|
|
- @item="uploadFileItem"
|
|
|
- @del="uploadFileDel"
|
|
|
+ @success="uploadFileSuccess" @del="uploadFileDel"
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
@@ -126,7 +124,6 @@
|
|
|
<script setup>
|
|
|
import { nextTick, onMounted, ref, watch } from 'vue'
|
|
|
import { useAppStore } from '~src/store'
|
|
|
-import { toPdfPage } from '~uti/btn-auth'
|
|
|
import HcBillBase from './addBillBase.vue'
|
|
|
import mainApi from '~api/tasks/hc-data'
|
|
|
import BigNumber from 'bignumber.js'
|
|
|
@@ -330,19 +327,6 @@ const uploadFormProps = {
|
|
|
name: 'fileName',
|
|
|
}
|
|
|
|
|
|
-const pictureUrlItem = ({ file }) => {
|
|
|
- const { url } = getObjValue(file)
|
|
|
- if (isNullES(url)) return
|
|
|
- toPdfPage(url)
|
|
|
-}
|
|
|
-
|
|
|
-//文件被点击
|
|
|
-const uploadFileItem = ({ file }) => {
|
|
|
- const { pdfUrl } = getObjValue(file)
|
|
|
- if (isNullES(pdfUrl)) return
|
|
|
- toPdfPage(pdfUrl)
|
|
|
-}
|
|
|
-
|
|
|
// 文件上传成功的回调
|
|
|
const uploadFileSuccess = async ({ res }, resolve) => {
|
|
|
const { link, pdfUrl, originalName } = getObjValue(res.data)
|