Commit d429e48b authored by 罗超's avatar 罗超

1

parent 23e24915
...@@ -385,25 +385,19 @@ ...@@ -385,25 +385,19 @@
<div <div
style="width: 138px; height: 92px; overflow: hidden" style="width: 138px; height: 92px; overflow: hidden"
:key="index" :key="index"
@click="showUpLoadFile(item)"
> >
<img <img
:src="item.url" :src="item.url"
v-if="item.type === 2" v-if="item.type === 2"
style="width: 100%; height: auto; overflow: hidden" style="width: 100%; height: auto; overflow: hidden"
@click="showUpLoadFile(item)"
/> />
<span <span
v-if="item.type === 1" v-if="item.type === 1"
class="iconfont" class="iconfont"
:class="item.suffix == 'PDF' ? 'icon-pdf' : 'icon-excel'" :class="item.suffix == 'PDF' ? 'icon-pdf' : 'icon-excel'"
@click="showUpLoadFile(item)"
></span> ></span>
<span <span v-if="item.type === 3" class="">{{ item.url }}</span>
v-if="item.type === 3"
class=""
@click="downloadFile(item)"
>{{ item.url }}</span
>
</div> </div>
</template> </template>
</div> </div>
...@@ -819,14 +813,14 @@ export default { ...@@ -819,14 +813,14 @@ export default {
if (i.type == 2) { if (i.type == 2) {
this.picObj.push(i.url); this.picObj.push(i.url);
this.picIsShow = true; this.picIsShow = true;
} else { } else if (i.type == 1) {
if (i.suffix == "PDF" || i.suffix == "TXT") { if (i.suffix == "PDF" || i.suffix == "TXT") {
this.previewPDF(i.url); this.previewPDF(i.url);
} else { } else {
window.open( this.downloadFile(i);
"https://view.officeapps.live.com/op/view.aspx?src=" + i.url
);
} }
} else {
this.downloadFile(i);
} }
}, },
downloadFile(i) { downloadFile(i) {
......
...@@ -178,7 +178,11 @@ ...@@ -178,7 +178,11 @@
label="申请理由" label="申请理由"
/> />
<div class="row"> <div class="row">
<div class="col-12 q-mt-md text-grey-6">上传附件:</div> <div class="col-12 q-mt-md text-grey-6">
上传附件:<span class="fj-tip" style="font-size: 10px; color: #f00"
>*单文件限制5M内</span
>
</div>
<div> <div>
<!-- <p>{{$t('fnc.scfujian')}}<span class="_addUpload_tips">{{$t('tips.wjdxbncgsz')}}</span></p> --> <!-- <p>{{$t('fnc.scfujian')}}<span class="_addUpload_tips">{{$t('tips.wjdxbncgsz')}}</span></p> -->
<div class="_addUpload_box clearfix"> <div class="_addUpload_box clearfix">
...@@ -469,7 +473,11 @@ export default { ...@@ -469,7 +473,11 @@ export default {
i.Content.substring( i.Content.substring(
i.Content.lastIndexOf(".") + 1, i.Content.lastIndexOf(".") + 1,
i.Content.length i.Content.length
).toUpperCase() == "PDF" ).toUpperCase() == "PDF" ||
i.Content.substring(
i.Content.lastIndexOf(".") + 1,
i.Content.length
).toUpperCase() == "TXT"
) { ) {
this.previewPDF(i.Url); this.previewPDF(i.Url);
} else { } else {
...@@ -505,14 +513,11 @@ export default { ...@@ -505,14 +513,11 @@ export default {
.substring(file.file.name.lastIndexOf(".") + 1, file.file.name.length) .substring(file.file.name.lastIndexOf(".") + 1, file.file.name.length)
.toUpperCase(); .toUpperCase();
let fileTypeNumber = 2; let fileTypeNumber = 2;
let typeOk = false;
typeArr.forEach((x) => { typeArr.forEach((x) => {
if (x.stringArr.indexOf(ft) != "-1") { if (x.stringArr.indexOf(ft) != "-1") {
fileTypeNumber = x.type; fileTypeNumber = x.type;
typeOk = true;
} }
}); });
if (!typeOk) return this.$message.error(this.$t("tips.qscWEfile"));
let newArr = []; let newArr = [];
newArr.push(file.file); newArr.push(file.file);
this.$message.info(this.$t("tips.shangchuanzhong")); this.$message.info(this.$t("tips.shangchuanzhong"));
......
...@@ -570,25 +570,19 @@ ...@@ -570,25 +570,19 @@
<div <div
style="width: 138px; height: 92px; overflow: hidden" style="width: 138px; height: 92px; overflow: hidden"
:key="index" :key="index"
@click="showUpLoadFile(item)"
> >
<img <img
:src="item.url" :src="item.url"
v-if="item.type === 2" v-if="item.type === 2"
style="width: 100%; height: auto; overflow: hidden" style="width: 100%; height: auto; overflow: hidden"
@click="showUpLoadFile(item)"
/> />
<span <span
v-if="item.type === 1" v-if="item.type === 1"
class="iconfont" class="iconfont"
:class="item.suffix == 'PDF' ? 'icon-pdf' : 'icon-excel'" :class="item.suffix == 'PDF' ? 'icon-pdf' : 'icon-excel'"
@click="showUpLoadFile(item)"
></span> ></span>
<span <span v-if="item.type === 3" class="">{{ item.url }}</span>
v-if="item.type === 3"
class=""
@click="downloadFile(item)"
>{{ item.url }}</span
>
</div> </div>
</template> </template>
</div> </div>
...@@ -1083,14 +1077,14 @@ export default { ...@@ -1083,14 +1077,14 @@ export default {
if (i.type == 2) { if (i.type == 2) {
this.picObj.push(i.url); this.picObj.push(i.url);
this.picIsShow = true; this.picIsShow = true;
} else { } else if (i.type == 1) {
if (i.suffix == "PDF" || i.suffix == "TXT") { if (i.suffix == "PDF" || i.suffix == "TXT") {
this.previewPDF(i.url); this.previewPDF(i.url);
} else { } else {
window.open( this.downloadFile(i);
"https://view.officeapps.live.com/op/view.aspx?src=" + i.url
);
} }
} else {
this.downloadFile(i);
} }
}, },
downloadFile(i) { downloadFile(i) {
......
...@@ -293,12 +293,12 @@ ...@@ -293,12 +293,12 @@
<div <div
style="width: 138px; height: 92px; overflow: hidden" style="width: 138px; height: 92px; overflow: hidden"
:key="index" :key="index"
@click="showUpLoadFile(item)"
> >
<img <img
:src="item.url" :src="item.url"
v-if="item.type === 2" v-if="item.type === 2"
style="width: 100%; height: auto; overflow: hidden" style="width: 100%; height: auto; overflow: hidden"
@click="showUpLoadFile(item)"
/> />
<span <span
v-if="item.type === 1" v-if="item.type === 1"
...@@ -306,12 +306,10 @@ ...@@ -306,12 +306,10 @@
:class=" :class="
item.suffix == 'PDF' ? 'icon-pdf' : 'icon-excel' item.suffix == 'PDF' ? 'icon-pdf' : 'icon-excel'
" "
@click="showUpLoadFile(item)"
></span> ></span>
<span <span
v-if="item.type === 3" v-if="item.type === 3"
class="iconfont icon-excel" class="iconfont icon-excel"
@click="downloadFile(item)"
></span> ></span>
</div> </div>
</template> </template>
...@@ -767,14 +765,14 @@ export default { ...@@ -767,14 +765,14 @@ export default {
if (i.type == 2) { if (i.type == 2) {
this.picObj.push(i.url); this.picObj.push(i.url);
this.picIsShow = true; this.picIsShow = true;
} else { } else if (i.type == 1) {
if (i.suffix == "PDF") { if (i.suffix == "PDF" || i.suffix == "TXT") {
this.previewPDF(i.url); this.previewPDF(i.url);
} else { } else {
window.open( this.downloadFile(i);
"https://view.officeapps.live.com/op/view.aspx?src=" + i.url
);
} }
} else {
this.downloadFile(i);
} }
}, },
downloadFile(i) { downloadFile(i) {
......
...@@ -406,12 +406,12 @@ ...@@ -406,12 +406,12 @@
<div <div
style="width: 138px; height: 92px; overflow: hidden" style="width: 138px; height: 92px; overflow: hidden"
:key="index" :key="index"
@click="showUpLoadFile(item)"
> >
<img <img
:src="item.url" :src="item.url"
v-if="item.type === 2" v-if="item.type === 2"
style="width: 100%; height: auto; overflow: hidden" style="width: 100%; height: auto; overflow: hidden"
@click="showUpLoadFile(item)"
/> />
<span <span
v-if="item.type === 1" v-if="item.type === 1"
...@@ -419,12 +419,10 @@ ...@@ -419,12 +419,10 @@
:class=" :class="
item.suffix == 'PDF' ? 'icon-pdf' : 'icon-excel' item.suffix == 'PDF' ? 'icon-pdf' : 'icon-excel'
" "
@click="showUpLoadFile(item)"
></span> ></span>
<span <span
v-if="item.type === 3" v-if="item.type === 3"
class="iconfont icon-excel" class="iconfont icon-excel"
@click="downloadFile(item)"
></span> ></span>
</div> </div>
</template> </template>
...@@ -630,7 +628,6 @@ ...@@ -630,7 +628,6 @@
import flowinfoForm from "../sale/flowinfo-form"; import flowinfoForm from "../sale/flowinfo-form";
import { saveBackBillAduit, queryBackBillMoney } from "../../api/sale/bill"; import { saveBackBillAduit, queryBackBillMoney } from "../../api/sale/bill";
import { queryEmployee } from "../../api/users/user"; import { queryEmployee } from "../../api/users/user";
export default { export default {
props: { props: {
setingObj: { setingObj: {
...@@ -832,17 +829,18 @@ export default { ...@@ -832,17 +829,18 @@ export default {
if (i.type == 2) { if (i.type == 2) {
this.picObj.push(i.url); this.picObj.push(i.url);
this.picIsShow = true; this.picIsShow = true;
} else { } else if (i.type == 1) {
if (i.suffix == "PDF" || i.suffix == "TXT") { if (i.suffix == "PDF" || i.suffix == "TXT") {
this.previewPDF(i.url); this.previewPDF(i.url);
} else { } else {
window.open( this.downloadFile(i);
"https://view.officeapps.live.com/op/view.aspx?src=" + i.url
);
} }
} else {
this.downloadFile(i);
} }
}, },
downloadFile(i) { downloadFile(i) {
console.log(846, i);
const a = document.createElement("a"); const a = document.createElement("a");
a.setAttribute("download", ""); a.setAttribute("download", "");
a.setAttribute("href", i.url); a.setAttribute("href", i.url);
......
...@@ -366,25 +366,19 @@ ...@@ -366,25 +366,19 @@
<div <div
style="width: 138px; height: 92px; overflow: hidden" style="width: 138px; height: 92px; overflow: hidden"
:key="index" :key="index"
@click="showUpLoadFile(item)"
> >
<img <img
:src="item.url" :src="item.url"
v-if="item.type === 2" v-if="item.type === 2"
style="width: 100%; height: auto; overflow: hidden" style="width: 100%; height: auto; overflow: hidden"
@click="showUpLoadFile(item)"
/> />
<span <span
v-if="item.type === 1" v-if="item.type === 1"
class="iconfont" class="iconfont"
:class="item.suffix == 'PDF' ? 'icon-pdf' : 'icon-excel'" :class="item.suffix == 'PDF' ? 'icon-pdf' : 'icon-excel'"
@click="showUpLoadFile(item)"
></span> ></span>
<span <span v-if="item.type === 3" class="">{{ item.url }}</span>
v-if="item.type === 3"
class=""
@click="downloadFile(item)"
>{{ item.url }}</span
>
</div> </div>
</template> </template>
</div> </div>
...@@ -841,14 +835,14 @@ export default { ...@@ -841,14 +835,14 @@ export default {
if (i.type == 2) { if (i.type == 2) {
this.picObj.push(i.url); this.picObj.push(i.url);
this.picIsShow = true; this.picIsShow = true;
} else { } else if (i.type == 1) {
if (i.suffix == "PDF" || i.suffix == "TXT") { if (i.suffix == "PDF" || i.suffix == "TXT") {
this.previewPDF(i.url); this.previewPDF(i.url);
} else { } else {
window.open( this.downloadFile(i);
"https://view.officeapps.live.com/op/view.aspx?src=" + i.url
);
} }
} else {
this.downloadFile(i);
} }
}, },
downloadFile(i) { downloadFile(i) {
......
...@@ -351,7 +351,13 @@ ...@@ -351,7 +351,13 @@
:label="transMsg.ChangeType == 1 ? '转班原因' : '分拆原因'" :label="transMsg.ChangeType == 1 ? '转班原因' : '分拆原因'"
/> />
<div class="row"> <div class="row">
<div class="col-12 q-mt-md text-grey-6">上传附件:</div> <div class="col-12 q-mt-md text-grey-6">
上传附件:<span
class="fj-tip"
style="font-size: 10px; color: #f00"
>*单文件限制5M内</span
>
</div>
<div> <div>
<!-- <p>{{$t('fnc.scfujian')}}<span class="_addUpload_tips">{{$t('tips.wjdxbncgsz')}}</span></p> --> <!-- <p>{{$t('fnc.scfujian')}}<span class="_addUpload_tips">{{$t('tips.wjdxbncgsz')}}</span></p> -->
<div class="_addUpload_box clearfix"> <div class="_addUpload_box clearfix">
...@@ -1001,7 +1007,11 @@ export default { ...@@ -1001,7 +1007,11 @@ export default {
i.Content.substring( i.Content.substring(
i.Content.lastIndexOf(".") + 1, i.Content.lastIndexOf(".") + 1,
i.Content.length i.Content.length
).toUpperCase() == "PDF" ).toUpperCase() == "PDF" ||
i.Content.substring(
i.Content.lastIndexOf(".") + 1,
i.Content.length
).toUpperCase() == "TXT"
) { ) {
this.previewPDF(i.Url); this.previewPDF(i.Url);
} else { } else {
...@@ -1037,14 +1047,11 @@ export default { ...@@ -1037,14 +1047,11 @@ export default {
.substring(file.file.name.lastIndexOf(".") + 1, file.file.name.length) .substring(file.file.name.lastIndexOf(".") + 1, file.file.name.length)
.toUpperCase(); .toUpperCase();
let fileTypeNumber = 2; let fileTypeNumber = 2;
let typeOk = false;
typeArr.forEach((x) => { typeArr.forEach((x) => {
if (x.stringArr.indexOf(ft) != "-1") { if (x.stringArr.indexOf(ft) != "-1") {
fileTypeNumber = x.type; fileTypeNumber = x.type;
typeOk = true;
} }
}); });
if (!typeOk) return this.$message.error(this.$t("tips.qscWEfile"));
let newArr = []; let newArr = [];
newArr.push(file.file); newArr.push(file.file);
this.$message.info(this.$t("tips.shangchuanzhong")); this.$message.info(this.$t("tips.shangchuanzhong"));
......
...@@ -892,7 +892,13 @@ ...@@ -892,7 +892,13 @@
label="备注" label="备注"
/> />
<div class="row"> <div class="row">
<div class="col-12 q-mt-md text-grey-6">上传附件:</div> <div class="col-12 q-mt-md text-grey-6">
上传附件:<span
class="fj-tip"
style="font-size: 10px; color: #f00"
>*单文件限制5M内</span
>
</div>
<div> <div>
<!-- <p>{{$t('fnc.scfujian')}}<span class="_addUpload_tips">{{$t('tips.wjdxbncgsz')}}</span></p> --> <!-- <p>{{$t('fnc.scfujian')}}<span class="_addUpload_tips">{{$t('tips.wjdxbncgsz')}}</span></p> -->
<div class="_addUpload_box clearfix"> <div class="_addUpload_box clearfix">
...@@ -1074,7 +1080,7 @@ export default { ...@@ -1074,7 +1080,7 @@ export default {
}, },
TakeEffectTime: "", //生效日期 TakeEffectTime: "", //生效日期
Remarks: "", //备注 Remarks: "", //备注
ReceiptFileList:[],//附件 ReceiptFileList: [], //附件
}, },
selected: [], selected: [],
classList: [], classList: [],
...@@ -1690,7 +1696,11 @@ export default { ...@@ -1690,7 +1696,11 @@ export default {
i.Content.substring( i.Content.substring(
i.Content.lastIndexOf(".") + 1, i.Content.lastIndexOf(".") + 1,
i.Content.length i.Content.length
).toUpperCase() == "PDF" ).toUpperCase() == "PDF" ||
i.Content.substring(
i.Content.lastIndexOf(".") + 1,
i.Content.length
).toUpperCase() == "TXT"
) { ) {
this.previewPDF(i.Url); this.previewPDF(i.Url);
} else { } else {
...@@ -1726,16 +1736,13 @@ export default { ...@@ -1726,16 +1736,13 @@ export default {
.substring(file.file.name.lastIndexOf(".") + 1, file.file.name.length) .substring(file.file.name.lastIndexOf(".") + 1, file.file.name.length)
.toUpperCase(); .toUpperCase();
let fileTypeNumber = 2; let fileTypeNumber = 2;
let typeOk = false;
typeArr.forEach((x) => { typeArr.forEach((x) => {
if (x.stringArr.indexOf(ft) != "-1") { if (x.stringArr.indexOf(ft) != "-1") {
fileTypeNumber = x.type; fileTypeNumber = x.type;
typeOk = true;
} }
}); });
if (!typeOk) return this.$message.error(this.$t("tips.qscWEfile")); // let newArr = [];
let newArr = []; // newArr.push(file.file);
newArr.push(file.file);
this.$message.info(this.$t("tips.shangchuanzhong")); this.$message.info(this.$t("tips.shangchuanzhong"));
UploadSelfFile( UploadSelfFile(
"Temporary", "Temporary",
......
...@@ -282,7 +282,13 @@ ...@@ -282,7 +282,13 @@
label="备注" label="备注"
/> />
<div class="row"> <div class="row">
<div class="col-12 text-grey-6">上传附件:</div> <div class="col-12 text-grey-6">
上传附件:<span
class="fj-tip"
style="font-size: 10px; color: #f00"
>*单文件限制5M内</span
>
</div>
<div> <div>
<!-- <p>{{$t('fnc.scfujian')}}<span class="_addUpload_tips">{{$t('tips.wjdxbncgsz')}}</span></p> --> <!-- <p>{{$t('fnc.scfujian')}}<span class="_addUpload_tips">{{$t('tips.wjdxbncgsz')}}</span></p> -->
<div class="_addUpload_box clearfix"> <div class="_addUpload_box clearfix">
...@@ -706,14 +712,17 @@ export default { ...@@ -706,14 +712,17 @@ export default {
// 预览上传文件 // 预览上传文件
if (i.Type == 3) { if (i.Type == 3) {
this.picObj.push(i.Url); this.picObj.push(i.Url);
// this.imgList.push(i.Url)
this.picIsShow = true; this.picIsShow = true;
} else { } else {
if ( if (
i.Content.substring( i.Content.substring(
i.Content.lastIndexOf(".") + 1, i.Content.lastIndexOf(".") + 1,
i.Content.length i.Content.length
).toUpperCase() == "PDF" ).toUpperCase() == "PDF" ||
i.Content.substring(
i.Content.lastIndexOf(".") + 1,
i.Content.length
).toUpperCase() == "TXT"
) { ) {
this.previewPDF(i.Url); this.previewPDF(i.Url);
} else { } else {
...@@ -749,14 +758,11 @@ export default { ...@@ -749,14 +758,11 @@ export default {
.substring(file.file.name.lastIndexOf(".") + 1, file.file.name.length) .substring(file.file.name.lastIndexOf(".") + 1, file.file.name.length)
.toUpperCase(); .toUpperCase();
let fileTypeNumber = 2; let fileTypeNumber = 2;
let typeOk = false;
typeArr.forEach((x) => { typeArr.forEach((x) => {
if (x.stringArr.indexOf(ft) != "-1") { if (x.stringArr.indexOf(ft) != "-1") {
fileTypeNumber = x.type; fileTypeNumber = x.type;
typeOk = true;
} }
}); });
if (!typeOk) return this.$message.error(this.$t("tips.qscWEfile"));
let newArr = []; let newArr = [];
newArr.push(file.file); newArr.push(file.file);
this.$message.info(this.$t("tips.shangchuanzhong")); this.$message.info(this.$t("tips.shangchuanzhong"));
......
...@@ -36,7 +36,11 @@ ...@@ -36,7 +36,11 @@
label="申请备注" label="申请备注"
/> />
<div class="row"> <div class="row">
<div class="col-12 text-grey-6">上传附件:</div> <div class="col-12 text-grey-6">
上传附件:<span class="fj-tip" style="font-size: 10px; color: #f00"
>*单文件限制5M内</span
>
</div>
<div> <div>
<!-- <p>{{$t('fnc.scfujian')}}<span class="_addUpload_tips">{{$t('tips.wjdxbncgsz')}}</span></p> --> <!-- <p>{{$t('fnc.scfujian')}}<span class="_addUpload_tips">{{$t('tips.wjdxbncgsz')}}</span></p> -->
<div class="_addUpload_box clearfix"> <div class="_addUpload_box clearfix">
...@@ -254,7 +258,11 @@ export default { ...@@ -254,7 +258,11 @@ export default {
i.Content.substring( i.Content.substring(
i.Content.lastIndexOf(".") + 1, i.Content.lastIndexOf(".") + 1,
i.Content.length i.Content.length
).toUpperCase() == "PDF" ).toUpperCase() == "PDF" ||
i.Content.substring(
i.Content.lastIndexOf(".") + 1,
i.Content.length
).toUpperCase() == "TXT"
) { ) {
this.previewPDF(i.Url); this.previewPDF(i.Url);
} else { } else {
...@@ -290,14 +298,11 @@ export default { ...@@ -290,14 +298,11 @@ export default {
.substring(file.file.name.lastIndexOf(".") + 1, file.file.name.length) .substring(file.file.name.lastIndexOf(".") + 1, file.file.name.length)
.toUpperCase(); .toUpperCase();
let fileTypeNumber = 2; let fileTypeNumber = 2;
// let typeOk = false;
typeArr.forEach((x) => { typeArr.forEach((x) => {
if (x.stringArr.indexOf(ft) != "-1") { if (x.stringArr.indexOf(ft) != "-1") {
fileTypeNumber = x.type; fileTypeNumber = x.type;
typeOk = true;
} }
}); });
// if (!typeOk) return this.$message.error(this.$t("tips.qscWEfile"));
// let newArr = []; // let newArr = [];
// newArr.push(file.file); // newArr.push(file.file);
this.$message.info(this.$t("tips.shangchuanzhong")); this.$message.info(this.$t("tips.shangchuanzhong"));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment