| | |
| | | } |
| | | .avue-dialog .el-dialog__body{ |
| | | padding: 20px; |
| | | margin-bottom: 20px !important; |
| | | } |
| | | .avue--detail .el-col{ |
| | | margin-bottom: 0; |
| | |
| | | .tree-buttons .el-button{ |
| | | margin: 0 5px 5px 0; |
| | | } |
| | | .el-dialog__footer{ |
| | | border-top: 1px solid #e9e7e7; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import request from '@/router/axios'; |
| | | |
| | | // ä¸è½½æä»¶ |
| | | export const download = (data) => { |
| | | return request({ |
| | | url: '/api/vciFileDownloadController/downloadByFileOidPost', |
| | | method: 'post', |
| | | headers: {'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8'}, |
| | | responseType: 'blob', |
| | | data: data |
| | | }) |
| | | } |
| | |
| | | |
| | | |
| | | export const doAction = (options,callback) => { |
| | | //modelName æµç¨åç§° é»è®¤ä¸º å½åç¨æ·+'å¯å¨æµç¨'+å½ååç±» |
| | | //multi æ¯å¦å¼å¯å¤é |
| | | //checknotprocess æ¯å¦å
许åèµ·æµç¨ |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | name: "downLoadFile" |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | |
| | | </style> |
| | |
| | | import {validatenull} from "@/util/validate"; |
| | | import Vue from "vue"; |
| | | import func from "@/util/func"; |
| | | import {download} from "@/api/base/file"; |
| | | |
| | | export const doAction = (options,callback) => { |
| | | console.log(options) |
| | | options.sourceData = options.sourceData || {}; |
| | | options.dataStore = options.dataStore || []; |
| | | if (!options.dataStore || options.dataStore.length < 1) { |
| | |
| | | */ |
| | | export const showStartWindow = (options,callback)=> { |
| | | const paramVOS = options.paramVOS; |
| | | if (!paramVOS['form'] && !paramVOS['context']) { |
| | | Vue.prototype.$message.error("æé®é
ç½®ä¸æ£ç¡®"); |
| | | return false; |
| | | } |
| | | const oids = options.dataStore.map(item => item.oid).join(','); |
| | | let data = new FormData(); |
| | | data.append('fileOid',oids); |
| | | download(data).then(res => { |
| | | console.log(res); |
| | | if (res) { |
| | | func.downloadFileByBlobHandler(res); |
| | | Vue.prototype.$message.success("ä¸è½½æå"); |
| | | } |
| | | }).catch(err => { |
| | | console.log(err); |
| | | }); |
| | | // if (!paramVOS['form'] && !paramVOS['context']) { |
| | | // Vue.prototype.$message.error("æé®é
ç½®ä¸æ£ç¡®"); |
| | | // return false; |
| | | // } |
| | | // func.downloadFileByBlobHandler(); |
| | | |
| | | } |
| | |
| | | getWorkByType() { |
| | | let params = { |
| | | type: 'ææ¡£å®¡ç¾æµç¨', |
| | | filterTemplate: "" |
| | | filterTemplate: "ææ¡£å®¡ç¾æµç¨" |
| | | } |
| | | getTemplateByType(params).then(res => { |
| | | const data = res.data.data; |
| | |
| | | |
| | | this.processTemplateList = data; |
| | | this.saveParam.processTemplate = data[0].value; |
| | | this.saveParam.processName = userInfo.content.userName + '-' + data[0].value; // 对æµç¨æ¨¡æ¿ æµç¨åç§°èµé»è®¤å¼ |
| | | this.saveParam.processName = this.paramVOS.processName || userInfo.content.userName + '-' + data[0].value; // 对æµç¨æ¨¡æ¿ æµç¨åç§°èµé»è®¤å¼ |
| | | |
| | | this.getProcessNode(data[0].attributes.oid); // 馿¬¡è¿å
¥è°ç¨ç¬¬ä¸ä¸ªæ¨¡æ¿çææèç¹ |
| | | }).catch(err => { |
| | |
| | | }, |
| | | |
| | | handleConfirm() { |
| | | const oids = this.dataStore.map(item => item.oid).join(','); |
| | | let params = { |
| | | deployid:this.processTemplateList[0].attributes.deploymentId, |
| | | title:this.saveParam.processName, |
| | | description:this.saveParam.processDesc, |
| | | btmType:this.processTemplateList[0].attributes.taskType, |
| | | uiType:this.processTemplateList[0].attributes.taskType, |
| | | oids:'', // å½åæ°æ®oidï¼å¤ä¸ªç¨,åé |
| | | detailInfoUrl:'', // ç¨æ·é
ç½®å±æ§ |
| | | oids:oids, // å½åæ°æ®oidï¼å¤ä¸ªç¨,åé |
| | | detailInfoUrl:this.paramVOS.detailInfoUrl || '', // ç¨æ·é
ç½®å±æ§ |
| | | resetStatus:'Editing', |
| | | nodeUsers:{ |
| | | ...this.collectParam |
| | |
| | | <template> |
| | | <el-dialog |
| | | v-dialogDrag |
| | | :width="width" |
| | | :visible.sync="visible" |
| | | :destroy-on-close="true" |
| | | :close-on-click-modal="false" |
| | | :destroy-on-close="true" |
| | | :visible.sync="visible" |
| | | :width="width" |
| | | append-to-body |
| | | title="ä¸ä¼ æä»¶" |
| | | class="avue-dialog" |
| | | title="ä¸ä¼ æä»¶" |
| | | style="margin-top: -20vh !important;" |
| | | > |
| | | <Divider left="30px" text="导å
¥æç¤º"></Divider> |
| | | <ul> |
| | | <li> |
| | | 1.红è²åä½è¡¨ç¤ºå¿
è¾é¡¹ |
| | | </li> |
| | | <li> |
| | | 2.æ¯æ¬¡ä»
è½æå¤å¯¼å
¥10000æ¡æ°æ® |
| | | 请ç¹å»æµè§æä»¶è¿è¡ä¸ä¼ |
| | | </li> |
| | | </ul> |
| | | <Divider left="30px" text="excelæä»¶ï¼éæ©æä»¶åä¼èªå¨ä¸ä¼ "></Divider> |
| | | <Divider left="30px" text="éæ©æä»¶åä¼èªå¨ä¸ä¼ "></Divider> |
| | | <el-upload |
| | | :before-upload="beforeUpload" |
| | | :data="fileData" |
| | | :headers="uploadHeaders" |
| | | :on-change="uploadChange" |
| | | :on-error="onError" |
| | | :on-success="onSuccess" |
| | | :show-file-list="false" |
| | | accept=".xlsx, .xls" |
| | | action="/api/ubcs-code/codeClassify/importClassify" |
| | | action="/api/vciFileUploadController/uploadFile" |
| | | class="upload-demo"> |
| | | <el-button size="small" style="margin: 15px 35px" type="primary">æµè§æä»¶</el-button> |
| | | </el-upload> |
| | | <template #footer> |
| | | <el-button |
| | | :loading="downloadLoading" |
| | | size="small" |
| | | type="primary" |
| | | @click="downloadTemplateFun" |
| | | >ä¸è½½å¯¼å
¥æ¨¡æ¿ |
| | | </el-button |
| | | > |
| | | <el-button size="small" @click="visible = false">å
³é</el-button> |
| | | </template> |
| | | </el-dialog> |
| | |
| | | flga: true, |
| | | pageLoading: null, |
| | | downloadLoading: false, |
| | | visible:false, |
| | | visible: false, |
| | | } |
| | | }, |
| | | created() { |
| | | console.log(this.sourceData); |
| | | }, |
| | | watch: { |
| | | visible: { |
| | |
| | | computed: { |
| | | uploadHeaders() { |
| | | return { |
| | | "Blade-Auth": "bearer " + getToken(), |
| | | "Authorizationtoken": getToken(), |
| | | }; |
| | | }, |
| | | fileData() { |
| | | return { |
| | | ownbizOid: this.sourceData.oid, |
| | | ownBtmName: this.sourceData.btmname, |
| | | secretGrade: -1, |
| | | fileDocClassify: '', |
| | | updateFileFlag: true, |
| | | } |
| | | }, |
| | | width() { |
| | | if (!validatenull(this.paramVOS.width)) { |
| | |
| | | return this.paramVOS.width + "px"; |
| | | } |
| | | } else { |
| | | return "60%"; |
| | | return "40%"; |
| | | } |
| | | }, |
| | | fullscreen(){ |
| | | fullscreen() { |
| | | console.log(this.paramVOS) |
| | | if(this.paramVOS.width || this.paramVOS.height){ |
| | | if (this.paramVOS.width || this.paramVOS.height) { |
| | | return false; |
| | | }else if(this.paramVOS.form){ |
| | | } else if (this.paramVOS.form) { |
| | | return false; |
| | | } |
| | | return true; |
| | |
| | | methods: { |
| | | //æä»¶ä¸ä¼ å |
| | | async beforeUpload(file) { |
| | | const fileType = file.name.split(".").pop(); |
| | | if (fileType !== "xlsx" && fileType !== "xls") { |
| | | // è·åæä»¶æ©å±å |
| | | const fileExtension = file.name.split(".").pop().toLowerCase(); // 转æ¢ä¸ºå°å以é¿å
大å°åä¸å¹é
çé®é¢ |
| | | const allowedExtensions = this.paramVOS.fileType || ['css', 'csv', 'doc', 'gif', 'html', 'jpe', 'jpg', 'jpeg', 'png', 'js', 'json', |
| | | 'mp3', 'mp4', 'xlsx', 'xml', 'zip', 'xhtml', 'wps', 'ppt', 'xls', 'word', 'pdf', 'txt']; |
| | | |
| | | // æ£æ¥æä»¶æ©å±åæ¯å¦å¨å
许çæä»¶æ©å±åæ°ç»ä¸ |
| | | if (!allowedExtensions.includes(fileExtension)) { |
| | | // ä¸ä¼ æ ¼å¼ä¸ç¬¦åè¦æ±ï¼æç¤ºé误信æ¯å¹¶åæ¶ä¸ä¼ |
| | | this.$message.error("åªå
许ä¸ä¼ xlsxãxlsæ ¼å¼çæä»¶"); |
| | | this.$message.error(`åªå
许ä¸ä¼ ${allowedExtensions.toString()}æ ¼å¼çæä»¶`); |
| | | return Promise.reject(false); |
| | | } |
| | | |
| | | this.pageLoading = this.$loading({ |
| | | lock: true, |
| | | text: "æä»¶ä¸ä¼ ä¸", |
| | | spinner: "el-icon-loading", |
| | | background: "rgba(0, 0, 0, 0.7)", |
| | | }); |
| | | |
| | | return true; |
| | | }, |
| | | // æä»¶ä¸ä¼ æå |
| | | onSuccess(resbonse) { |
| | | if (Object.keys(resbonse.data).length === 0) { |
| | | if (resbonse.code === 200) { |
| | | this.$message.success("ä¸ä¼ æåï¼"); |
| | | this.dialogVisible = false; |
| | | return; |
| | | }else { |
| | | this.$message.error(resbonse.msg); |
| | | } |
| | | if (resbonse.data.fileOid) { |
| | | const fileName = resbonse.data.filePath.split("/").pop(); |
| | | this.$message.error("请ä¸è½½éè¯¯ä¿¡æ¯æä»¶è¿è¡æ¥çï¼"); |
| | | downloadErrorFile({uuid: resbonse.data.fileOid}).then((res) => { |
| | | func.downloadFileByBlobHandler(res); |
| | | }); |
| | | } |
| | | }, |
| | | //ç¹å»ä¸è½½æ¨¡æ¿ |
| | | downloadTemplateFun() { |
| | | this.downloadLoading = true; |
| | | downloadBatchImportApplyTemplate({codeClassifyOid: this.codeClassifyOid}).then(res => { |
| | | this.$utilFunc.downloadFileByBlob(res.data, "æ¨¡æ¿æä»¶.xls"); |
| | | this.downloadLoading = false; |
| | | }).catch((res) => { |
| | | this.$message.warning(res) |
| | | this.downloadLoading = false; |
| | | }) |
| | | }, |
| | | //æä»¶ä¸ä¼ 失败 |
| | | onError(res) { |
| | | this.pageLoading.close(); |
| | | this.$message.error(res); |
| | | }, |
| | | //æä»¶ç¶ææ¹å |
| | | uploadChange(file) { |
| | |
| | | import {validatenull} from "@/util/validate"; |
| | | import Vue from "vue"; |
| | | import uploadFileDialog from "@/components/actions/base/uploadFile" |
| | | import func from "@/util/func"; |
| | | |
| | | |
| | | export const doAction = (options,callback) => { |
| | | options.sourceData = options.sourceData || {}; |
| | | options.dataStore = options.dataStore || []; |
| | | |
| | | if (func.isEmptyObject(options.sourceData)) { |
| | | Vue.prototype.$message.error("è¯·éæ©è¦ä¸ä¼ çåç±»ï¼"); |
| | | return false; |
| | | } |
| | | callPreEvent(options, doBefore, function (options) { |
| | | showStartWindow(options, function () { |
| | | callPostEvent(options, doAfter, callback,type); |
| | |
| | | uploadfile: () => {import("@/components/actions/base/uploadFileAction").then(module => { |
| | | module.doAction(options,callback); |
| | | })}, |
| | | //ä¸ä¼ æä»¶ |
| | | //ä¸è½½æä»¶ |
| | | downloadfile: () => {import("@/components/actions/base/downloadFileAction").then(module => { |
| | | module.doAction(options,callback); |
| | | })}, |
| | |
| | | proxy: { |
| | | '/api': { |
| | | //æ¬å°æå¡æ¥å£å°å |
| | | target: 'http://localhost:12000/web', |
| | | // target: 'http://localhost:12000/web', |
| | | target: 'http://192.168.0.105:12005/web', // yxc |
| | | // target: 'http://192.168.0.103:12005/web', // ldc |
| | | // target: 'http://dev.vci-tech.com:37000', |
| | | //è¿ç¨æ¼ç¤ºæå¡å°å,å¯ç¨äºç´æ¥å¯å¨é¡¹ç® |
| | | //target: 'https://saber.bladex.vip/api/', |