dev
张同海 2 years ago
parent b630afc4a3
commit 2d459db541

@ -27,8 +27,8 @@ import VueContextMenu from 'vue-contextmenu'
import vcolorpicker from 'vcolorpicker'
import VXETable from 'vxe-table'
import 'vxe-table/lib/style.css'
import 'vue-easytable/libs/theme-default/index.css';
import VueEasytable from 'vue-easytable';
import 'vue-easytable/libs/theme-default/index.css'
import VueEasytable from 'vue-easytable'
Vue.use(VXETable)
Vue.use(VueContextMenu)
@ -38,9 +38,10 @@ Vue.use(socket, '/hubs/chatHub')
Vue.use(VueAxios)
Vue.use(Dialog)
Vue.use(dataV)
Vue.use(VueEasytable);
Vue.use(VueEasytable)
Vue.prototype.hasPerm = hasBtnPermission
Vue.prototype.applocation = sysApplication
Vue.prototype.$bus = new Vue()
Vue.config.productionTip = false
new Vue({

@ -45,7 +45,7 @@
<button @click="TxxpLink"><span class="iconfont icon-dayinxiaopiao"></span>提箱小票</button>
</div>
<div class="btn-list single-view-4">
<a-upload :file-list="fileList" name="file" :customRequest="uploadFile">
<a-upload :file-list="fileList" :before-upload="beforeUpload" name="file" :customRequest="uploadFile">
<button @click="ShowOCR"><span class="iconfont icon-OCR"></span>OCR</button>
</a-upload>
@ -690,6 +690,10 @@ export default {
})
}
},
beforeUpload(file) {
console.log(this.details, 'this.details')
this.$bus.$emit('WebTest001', { upFileList: file, attachCode: 'other', attachName: '其他' })
},
uploadFile(file) {
const formData = new FormData()
formData.append('file', file.file)

@ -17,13 +17,13 @@
</div>
</div>
<div class="tip" v-else-if="excuteRulesType === 'fail'">
<div class="rules-label">
<i class="iconfont icon-shibai Warning"></i><span>校验失败</span>
</div>
<div class="rules-label"><i class="iconfont icon-shibai Warning"></i><span>校验失败</span></div>
</div>
<div class="tip no-data" v-else>
<i class="iconfont icon-meiyoudingdan"></i>
<div class="text">暂无校验, <a-button size="small" type="link" class="btn" @click="checkFun"> </a-button></div>
<div class="text">
暂无校验, <a-button size="small" type="link" class="btn" @click="checkFun"> </a-button>
</div>
</div>
</div>
</a-card>
@ -285,7 +285,11 @@ export default {
locaService: []
}
},
created() {},
created() {
this.$bus.$on('WebTest001', val => {
this.WebTest001(val)
})
},
watch: {
'$route.query': {
immediate: true,
@ -392,6 +396,7 @@ export default {
.then(res => {
if (res.success) {
this.fileList = res.data
console.log(this.fileList)
}
})
.catch(err => {
@ -421,12 +426,20 @@ export default {
this.upFileList = newFileList
},
beforeUpload(file) {
debugger
this.upFileList = [...this.upFileList, file]
return false
},
WebTest001(val) {
console.log(val.upFileList)
this.beforeUpload(val.upFileList)
// this.upFileList = this.upFileList.unshift(val.upFileList)
this.attachCode = val.attachCode
this.attachName = val.attachName
this.handleUpload()
},
handleUpload() {
const { upFileList, attachCode, attachName } = this
console.log(upFileList, attachCode, attachName)
if (upFileList.length === 0) {
this.$message.error('请上传文件')
return false
@ -867,9 +880,8 @@ export default {
color: #999;
padding: 20px 0;
line-height: 30px;
.text{
.text {
display: inline-block;
}
}
}
@ -1047,7 +1059,7 @@ export default {
width: 140px;
line-height: 32px;
}
.format{
.format {
color: #999;
// color: @primary-color;
// opacity: .8;

Loading…
Cancel
Save