Browse Source

数据共享接口对接

luckysheet_xiaowang
是小王呀\24601 1 year ago
parent
commit
6f019b4dfd
  1. 375
      src/views/modules/base/smartExcel/cpts/data-excel.vue
  2. 33
      src/views/modules/base/smartExcel/cpts/data-sharing.vue
  3. 1
      src/views/modules/base/smartExcel/cpts/excel-template-confirmation.vue
  4. 154
      src/views/modules/base/smartExcel/cpts/upload-data-add.vue
  5. 34
      src/views/modules/base/smartExcel/sharedSpace.vue

375
src/views/modules/base/smartExcel/cpts/data-excel.vue

@ -0,0 +1,375 @@
<template>
<div class='flex'>
<div :class="['flex', 'flex-y', 'flex1', sheetTotal ? 'luckysheet-wrap' : 'luckysheet-wrap-all']">
<div class="top_btn flex flex-end">
<div>
<el-button type="text" round @click="handelClickBack"
icon="el-icon-back">返回</el-button>
</div>
<div>
<el-button type="primary"
@click="handleClickCurrencyEvent('submit')">下载</el-button>
</div>
</div>
<div id="luckysheet"></div>
</div>
<el-dialog title="数据列表导出" v-if="showUploadData" :visible.sync="showUploadData" width="60%"
:close-on-click-modal="false">
<excelUploadData @handleUploadDataHide="handleUploadDataHide" :currentTable="currentTable"
:btnLoading="btnLoading">
</excelUploadData>
</el-dialog>
</div>
</template>
<script>
import excelUploadData from './excel-upload-data.vue';
import LuckyExcel from 'luckyexcel';
import options from "@/utils/luckysheetConfig.js";
import { mapGetters } from 'vuex'
import { requestPost, requestGet } from "@/js/dai/request";
import nextTick from "dai-js/tools/nextTick";
import {exportSheetExcel} from "@/utils/export";
export default {
data() {
return {
showUploadData: false,
menuList: [],
menuActive: 0,
socket: null,
currentTable: null,
currentId: '',
btnLoading: false,
};
},
props: {
fileUrl: {
type: String,
default: ''
},
workbookId: {
type: String,
default: ''
},
pageType: {
type: String,
default: ''
},
sheetTotal: {
type: Boolean,
default: false
},
infoObj: {
type: Object,
default: () => { }
},
mergeObj: {
type: Object,
default: () => { }
},
userId: {
type: String,
default: ''
},
taskStateName: {
type: String,
default: ""
},
},
computed: {
tableHeight() {
return (this.clientHeight - 140) + 'px'
},
...mapGetters(['clientHeight', 'resolution']),
},
async created() {
},
watch: {},
async mounted() {
console.log(this.infoObj,"sdljkdsfj");
const newUrl = this.infoObj.url.replace(
/^https:\/\/elink-esua-epdc\.oss-cn-qingdao\.aliyuncs\.com/,
`${location.origin}`
);
console.log(newUrl);
// this.urlToFile('http://localhost:9001/epmet-work-pc/test1.xlsx',this.infoObj.name)
this.urlToFile(newUrl, this.fileName)
// console.log(this.workbookId, "dskjlfsdklf");
// this.currentId = this.workbookId;
// this.loadWorkBook()
},
methods: {
async urlToFile(url, fileName = 'file') {
try {
// 使 fetch
const response = await fetch(url);
//
if (!response.ok) {
throw new Error(`HTTP error! status: ${response.status}`);
}
// Blob
const blob = await response.blob();
// Blob File
const file = new File([blob], fileName, { type: 'excel/xlsx' });
console.log(file,"sdlkfdslk;");
this.uploadExcel(file)
} catch (error) {
console.error('Error fetching or converting file:', error);
throw error;
}
},
uploadExcel(files) {
console.log(files,"afkljlafisd");
let that = this
// console.log(exportJson,'JSON');
LuckyExcel.transformExcelToLucky(files, function (exportJson, luckysheetfile) {
console.log(exportJson,'获取到导入的JSON');
that.exportJson = exportJson
console.log( that.exportJson,'获取到导入的JSON');
if (exportJson.sheets == null || exportJson.sheets.length == 0) return alert('读取excel文件内容失败, 目前不支持XLS文件!');
window.luckysheet.destroy();
options.container = 'luckysheet'
options.loadUrl = ''
window.luckysheet.create({
...options,
data: exportJson.sheets,//sheetbug
title: exportJson.info.name,
hook: {},
});
});
},
handleClickCurrencyEvent(){
console.log(this.infoObj,"this.infoObj.taskTitle");
let parms={
workbookId:this.workbookId,
taskId:this.infoObj.id
}
let { code, msg } = requestPost('/actual/base/communityOneTableDownloadRecord/save', parms);
console.log(code,"dsfkjkldsf");
exportSheetExcel(luckysheet.getAllSheets(),this.infoObj.taskTitle)
},
async handleClickInspect() {
const list = luckysheet.getAllSheets()[0].celldata.map(item => ({
r: item.r,
c: item.c,
v: item.v.v || ''
}));
//
let { data, code, msg } = await requestPost('/actual/base/intelligentImportData/checkData', list);
if (code === 0) {
if (data && data.length > 0) {
for (const { r, c } of data) {
luckysheet.setCellFormat(r, c, 'bg', '#f5504a');
}
const findArr = this.findUniqueElements(luckysheet.getAllSheets()[0].celldata, data);
findArr.forEach(({ r, c, v }) => {
if (v.bg === "#f5504a") {
luckysheet.setCellFormat(r, c, 'bg', '#ffffff');
}
});
} else {
this.$message.success('没有找到异常');
}
}
},
findUniqueElements(A, B) {
// Brc
const bCombinations = new Set(B.map(item => `${item.r},${item.c}`));
// AB
return A.filter(item => !bCombinations.has(`${item.r},${item.c}`));
},
onClickUplond() {
this.showUploadData = true;
let list = luckysheet.getAllSheets()
this.currentTable = list.filter(item => item.status == '1')
},
async handleUploadDataHide(val) {
this.showUploadData = false;
luckysheet.insertRow(this.currentTable[0].data.length, 1)
const findLastNonNullIndex = (arr) => {
for (let i = arr.length - 1; i >= 0; i--) {
const subArray = arr[i];
// null
if (Array.isArray(subArray) && subArray.some(item => item !== null && item.v && item.v !== null && item.v !== '')) {
return i; //
}
}
return -1; // -1
};
this.sheetR = findLastNonNullIndex(this.currentTable[0].data)
console.log(this.currentTable[0].data.length, val.length);
luckysheet.insertRow(this.currentTable[0].data.length, { number: val.length });
await nextTick(2000)
let newArray = val.map(obj => {
return Object.keys(obj).map(key => {
return { m: obj[key], "ct": { "fa": "General", "t": "g" }, v: obj[key] };
});
});
console.log(newArray, '处理后数据');
let bottomRightCorner = this.numberToLetter(Object.keys(val[0]).length)//
luckysheet.setRangeValue(newArray, {
range: `A${this.sheetR + 2}:${bottomRightCorner}${this.sheetR + val.length}`,
})
},
//
numberToLetter(num) {
let letter = '';
while (num > 0) {
num -= 1; // 0 1 -> 'A'2 -> 'B'...
letter = String.fromCharCode(num % 26 + 65) + letter; // 65 'A' Unicode
num = Math.floor(num / 26);
}
return letter;
},
handleCellEditBefore(){
console.log("sdfk;s.dkf");
},
loadWorkBook() {
console.log();
window.luckysheet.destroy();
if (this.infoObj.createByName===this.$store.state.user.realName) {
options.allowEdit=true
}else{
options.allowEdit=false
}
const { id } = this.$store.state.user;
options.gridKey = this.currentId;
options.allowUpdate = true;
options.container = 'luckysheet'
options.loadUrl = `${process.env.VUE_APP_API_SERVER}/actual/base/luckySheet/workbook/load?workbookId=${this.currentId}`
options.updateUrl = `${process.env.VUE_APP_SOCKET_SERVER}/actual/base/ws/luckysheet/${this.currentId}/${id}`
options.loadSheetUrl = `${process.env.VUE_APP_API_SERVER}/actual/base/luckySheet/workbook/loadSheets`
window.luckysheet.create({
...options,
hook: {
cellEditBefore: this.handleCellEditBefore,
sheetCreateAfter: this.handleSheetCreateAfter,
},
});
},
handleSheetCreateAfter(e) {
console.log('setsheet', e);
},
handelClickBack() {
window.luckysheet.destroy();
this.$emit('handleShowPage')
},
},
components: {
excelUploadData
},
beforeDestroy() {
this.$store.state.sidebarFold = false;
if (this.socket) {
this.socket.close();
}
},
};
</script>
<style lang="scss" scoped>
.el-card {
margin: 10px auto;
padding: 0 16px;
box-sizing: border-box;
width: calc(100% - 40px);
border: none;
}
.luckysheet-wrap {
margin: 10px;
padding: 0px;
z-index: 2;
width: calc(100vw - 400px);
height: calc(100vh - 250px);
}
.luckysheet-wrap-all {
margin: 10px;
padding: 0px;
z-index: 2;
width: calc(100vw - 100px);
height: calc(100vh - 250px);
}
#luckysheet {
width: 100%;
padding: 0px;
z-index: 2;
height: calc(100% - 80px);
margin: 10px;
}
.top_btn {
height: 60px;
width: 100%;
}
.upload-demo {
position: absolute;
z-index: 999999;
margin: 20px 0 0 22px;
}
.right-slider {
position: absolute;
z-index: 999999;
border: 1px solid #eeeeee;
box-shadow: -5px 0px 5px 0px rgba(0, 0, 0, 0.2);
background: #ffffff;
margin: 10px 0 0 22px;
right: 10px;
width: 36%;
height: calc(100% - 20px);
}
.el-header,
.el-footer {
text-align: left;
line-height: 40px;
padding-top: 0;
padding-bottom: 0;
}
.el-main {
text-align: left;
line-height: 40px;
padding-top: 0;
padding-bottom: 0;
}
.el-container {
display: flex;
height: 100%;
flex-direction: column;
}
.left_menu {
width: 240px;
.menu_item {
cursor: pointer;
padding: 10px 16px;
box-sizing: border-box;
margin-bottom: 5px;
background-color: #f2f8fd;
border-radius: 5px;
font-size: 14px;
}
.active {
color: #3989eb;
}
}
</style>

33
src/views/modules/base/smartExcel/cpts/data-sharing.vue

@ -2,13 +2,16 @@
<div class="" :style="{height: tableHeight}">
<el-table :data="tableData" border class="m-table-item" :height="tableHeight" v-if="pageType=='list'">
<el-table-column prop="name" label="文件名称" min-width="140" align="center"
<el-table-column prop="name" label="文件名称" align="center"
:show-overflow-tooltip="true" >
<template slot-scope="scope">
<img style="width: 25px; height: 25px;margin-right: 20px;"
<template slot-scope="scope">
<div class="flex">
<img style=" width: 25px; height: 25px; left: 10px;"
:src="require(`@/assets/images/index/Excel.png`)" alt="">
<span>{{ scope.row.name
<span style="margin-left: 10px">{{ scope.row.name
}}</span>
</div>
</template>
</el-table-column>
<el-table-column prop="orgName" label="数据提供单位" align="center" :show-overflow-tooltip="true">
@ -31,7 +34,7 @@
</el-table>
<el-dialog :visible.sync="formShow" :close-on-click-modal="false" :close-on-press-escape="false"
title="上传共享数据" width="950px" top="5vh" class="dialog-h" @closed="closeAdd">
title="上传共享数据" namewidth="950px" top="5vh" class="dialog-h" @closed="closeAdd">
<picture-add v-if="formShow"ref="ref_form" @closeAdd="closeAdd"></picture-add>
</el-dialog>
<div v-if="showdownloadRecord">
@ -40,7 +43,7 @@
</el-dialog>
</div>
<div v-if="pageType == 'info'">
<share-excel :infoObj="infoObj" @handleShowPage="handleShowPage" :workbookId=task></share-excel>
<data-excel :infoObj="infoObj" @handleShowPage="handleShowPage" :workbookId=task></data-excel>
</div>
<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page.sync="pageNo"
:page-sizes="[20, 50, 100, 200]" :page-size="parseInt(pageSize)" layout="sizes, prev, pager, next, total"
@ -53,7 +56,7 @@ import { requestPost, requestGet } from "@/js/dai/request";
import { mapGetters } from 'vuex'
import uploaddDataAdd from "./upload-data-add"
import uploadDataList from "./upload-data-list.vue"
import shareExcel from "./share-excel";
import dataExcel from "./data-excel";
export default {
data() {
return {
@ -74,8 +77,7 @@ data() {
},
created() {},
mounted() {
console.log(this.showUpdate,"sdljflkds");
this.formData.name=this.name
this.getTableData()
},
methods: {
@ -115,9 +117,8 @@ methods: {
},
handleInfo(item) {
this.$emit('pictureClose');
const { id, taskId, taskTitle, taskPeriod, taskType, taskIntroduction,subWorkBookId,workBookId,taskStateName} = item;
this.infoObj = { id, taskId, taskTitle, taskPeriod, taskType, taskIntroduction};
this.task = item.workBookId
const { url, createdBy, id, name, createdTime} = item;
this.infoObj = { url, createdBy, id, name, createdTime};
this.pageType = 'info'
},
handleShowPage() {
@ -160,7 +161,7 @@ methods: {
}
},
},
components:{uploadDataList,shareExcel,uploaddDataAdd
components:{uploadDataList,dataExcel,uploaddDataAdd
},
computed:{
tableHeight() {
@ -169,11 +170,7 @@ computed:{
...mapGetters(['clientHeight', 'resolution']),
},
props: {
showUpdate:{
type:Boolean,
default: ""
},
taskId: {
name: {
type: String,
default: ""
},

1
src/views/modules/base/smartExcel/cpts/excel-template-confirmation.vue

@ -55,6 +55,7 @@ export default {
}
},
uploadExcel(files) {
console.log(files,"afkljlafisd");
if (!files) return alert('没有文件等待导入');
let that = this
LuckyExcel.transformExcelToLucky(files, function (exportJson, luckysheetfile) {

154
src/views/modules/base/smartExcel/cpts/upload-data-add.vue

@ -3,29 +3,33 @@
<div class="dialog-h-content scroll-h">
<el-form ref="ref_form" :inline="true" :model="formData" :rules="dataRule" class="form">
<el-row>
<el-col :span="24">
<el-form-item label="图片集名称" prop="albumName" label-width="150px">
<el-input v-model.trim="formData.albumName" size="small" clearable
placeholder="请输入图片集名称(30字以内)" class="u-item-width-normal"></el-input>
<el-form-item label="标题名称" prop="name" label-width="150px">
<el-input v-model.trim="formData.name" size="small" clearable placeholder="请输入表格名称(5-30字以内)"
class="u-item-width-normal"></el-input>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="图片集封面" label-width="150px" prop="coverPicture">
<template>
<upload-image :defaultFileList="fileList" :limit="1" @change="onChangeFileList"
@file-removed="removedImg"></upload-image>
</template>
<el-form-item label="上传表格文件" label-width="150px" prop="fileList">
<el-upload :headers="$getElUploadHeaders()" class="upload-demo" drag :action="uploadUlr"
:before-upload="beforeImgUpload" accept=".xls,.xlsx" limit="1"
:data="{ customerId: customerId }" :on-success="handleFileSuccess"
:on-remove="handleFileRemove" :file-list="fileList" :on-preview="handleFileDownload"
multiple>
<i class="el-icon-upload"></i>
<div class="el-upload__text">将文件拖到此处<em>点击上传</em>
<div>支持扩展名.xls,.xlsx</div>
</div>
</el-upload>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label-width="150px" label="共享范围" prop="agencyIdArray">
<el-cascader class="cell-width-1" ref="myCascader" :clearable="false" filterable @change="handleCascaderChange()"
:filter-method="filter" v-model.trim="agencyIdArray" :options="orgOptions"
:props="orgOptionProps" :show-all-levels="false"
collapse-tags
>
<el-form-item label-width="150px" label="共享范围" prop="sharedScope">
<el-cascader class="cell-width-1" ref="myCascader" :clearable="false" filterable
@change="handleChangeAgency" :filter-method="filter" v-model.trim="agencyIdArray"
:options="orgOptions" :props="orgOptionProps" :show-all-levels="false" collapse-tags>
<template v-slot:tag="{ value, label, index }">
<!-- 自定义标签渲染去掉叉号 -->
<span>{{ label }}</span>
@ -64,6 +68,7 @@
export default {
data() {
return {
uploadUlr: window.SITE_CONFIG['apiURL'] + '/oss/file/uploadqrcodeV2',
orgOptionProps: {
emitPath: false,
multiple: true,
@ -100,9 +105,10 @@
formType:"add",
agencyIdArray: [],
formData:
{
coverPicture:"",
albumName:"",
{ format:"xlsx",
name:"",
url:"",
type:"excel",
sharedScope:""
},
corganizerList: [],
@ -119,16 +125,68 @@
},
methods: {
handleCascaderChange() {
let obj = this.$refs["myCascader"].getCheckedNodes()[0].data
console.log(this.agencyIdArray,"Sdjksdflkj");
if(obj.subOrgList){
this.findNodeByValue(obj.subOrgList)
handleFileDownload(file) {
var a = document.createElement('a');
var event = new MouseEvent('click');
a.download = file.name;
a.href = file.url;
a.dispatchEvent(event);
},
handleFileRemove(file) {
if (file && file.status === "success") {
this.fileList.splice(this.fileList.findIndex(item => item.uid === file.uid), 1)
}
},
handleFileSuccess(res, file) {
console.log(res,file,"dsflkjsdlkj");
if (res.code === 0 && res.msg === 'success') {
this.formData.size=file.size
this.formData.url=res.data.url
const array = file.name.split('.')
const fileType = array[array.length - 1]
file.url = res.data.url
file.type = fileType
this.fileList.push(file)
console.log(this.fileList)
} else this.$message.error(res.msg)
},
beforeImgUpload(file) {
const array = file.name.split('.')
const extension = array[array.length - 1]
if (extension !== 'xls'
&& extension !== 'xlsx'
) {
this.$message.error('只能上传excel文件!')
return false
}
//
// this.agencyIdArray = Array.from(allSelected); //
},
handleChangeAgency(val){
console.log(val,"dskljlkdfs");
this.formData.sharedScope=""
if (val.length > 0) {
this.formData.sharedScope = val.toString();
} else {
this.formData.sharedScope = ""; //
}
},
// handleCascaderChange() {
// let obj = this.$refs["myCascader"].getCheckedNodes()[0].data
// console.log(this.agencyIdArray,"Sdjksdflkj");
// if(obj.subOrgList){
// this.findNodeByValue(obj.subOrgList)
// }
// //
// // this.agencyIdArray = Array.from(allSelected); //
// },
async findNodeByValue(option, value) {
obj.subOrgList.forEach(value => {
console.log(value, "dsfjkhfsdl");
@ -197,20 +255,20 @@
},
async handleComfirm() {
if(!this.formData.albumName){
return this.$message.error("请输入图片集名称")
if(!this.formData.name){
return this.$message.error("请输入标题名称")
}
if(!this.formData.coverPicture){
return this.$message.error("请上传封面图片")
if(!this.formData.url){
return this.$message.error("请上传表格文件")
}
if(!this.agencyIdArray){
if(!this.formData.sharedScope){
return this.$message.error("请选择共享范围")
}
console.log(this.formData,"dsfkjsdlkf");
this.addActivity()
},
async addActivity() {
if(this.formType=="add"){
let url = '/actual/base/albums/save'
let url = '/actual/base/sharedData/save'
const { data, code, msg } = await requestPost(url, this.formData)
if (code === 0) {
this.$message({
@ -220,24 +278,12 @@
} else {
this.$message.error(msg)
}
this.$emit('closeAdd')
}else{
let url = '/actual/base/albums/update'
const { data, code, internalMsg } = await requestPost(url, this.formData)
if (code === 0) {
this.$message({
type: 'success',
message: '操作成功'
})
} else {
this.$message.error(internalMsg)
}
this.$emit('closeAdd')
}
this.$emit('closeUpdataAdd')
},
handleCancle() {
this.$emit('closeAdd')
this.$emit('closeUpdataAdd')
},
@ -261,14 +307,14 @@
computed: {
dataRule() {
return {
albumName: [
{ required: true, message: '请输入图片集名称', trigger: 'blur' }
name: [
{ required: true, message: '请输入标题名称', trigger: 'blur' }
],
agencyIdArray: [
{ required: true, message: '请选择共享范围', trigger: 'blur' }
fileList: [
{ required: true, message: '请上传表格文件', trigger: 'blur' }
],
coverPicture: [
{ required: true, message: '请选择图片集封面', trigger: 'blur' }
sharedScope: [
{ required: true, message: '请选择共享范围', trigger: 'blur' }
]
}
},

34
src/views/modules/base/smartExcel/sharedSpace.vue

@ -12,13 +12,6 @@
</div>
<div class="flex " style="align-items: center;">
<el-button @click="handeleUpdate" v-if="selectedIndex==1" class="diy-button--white" size="small" type="primary">上传共享数据
<!-- <el-upload :headers="$getElUploadHeaders()" ref="upload" class="upload-btn"
action="uploadUlr" :limit="1" :accept="'.xls,.xlsx'" :with-credentials="true"
:show-file-list="false" :auto-upload="true" :on-progress="handleProgress"
:on-success="handleExcelSuccess" :before-upload="beforeExcelUpload"
:http-request="uploadHttpRequest">
上传共享数据
</el-upload> -->
</el-button>
<el-button v-if="selectedIndex==2" type="primary" style="" size="small"
@click="onClick('add')">新建图片库</el-button>
@ -39,15 +32,15 @@
</template>
</el-table-column>
<el-table-column prop="taskTitle" label="所属任务" min-width="140" align="center" :show-overflow-tooltip="true" />
<el-table-column prop="taskPeriod" align="center" width="100" label="任务周期" :show-overflow-tooltip="true">
<el-table-column prop="taskTitle" label="所属任务" align="center" :show-overflow-tooltip="true" />
<el-table-column prop="taskPeriod" align="center" label="任务周期" :show-overflow-tooltip="true">
<template slot-scope="scope">
{{ scope.row.taskPeriod === 'once' ? '一次性' : scope.row.taskPeriod === 'weekly' ? '每周' :
scope.row.taskPeriod
=== 'halfMonth'?'每半月': scope.row.taskPeriod === 'month'?'每月':'每季度'}}
</template>
</el-table-column>
<el-table-column prop="taskStateName" align="center" width="100" label="状态" :show-overflow-tooltip="true">
<el-table-column prop="taskStateName" align="center" label="状态" :show-overflow-tooltip="true">
<template slot-scope="scope">
<span
:class="scope.row.taskStateName==='未提交'?'yellow':scope.row.taskStateName==='已提交'?'blue':scope.row.taskStateName=='(已驳回)未提交'?'red':'green'">{{
@ -55,14 +48,14 @@
}}</span>
</template>
</el-table-column>
<el-table-column prop="redDot" label="下载人数" align="center" :show-overflow-tooltip="true" width="100">
<el-table-column prop="redDot" label="下载人数" align="center" :show-overflow-tooltip="true" >
<template slot-scope="scope">
<el-button type="text" @click="onClickRecord(scope.row)">{{ scope.row.redDot}}</el-button>
</template>
</el-table-column>
<el-table-column prop="agencyName" align="center" label="所属组织" :show-overflow-tooltip="true">
</el-table-column>
<el-table-column prop="createByName" align="center" width="100" label="创建人" :show-overflow-tooltip="true">
<el-table-column prop="createByName" align="center" label="创建人" :show-overflow-tooltip="true">
</el-table-column>
<el-table-column prop="createdTime" align="center" width="140" :show-overflow-tooltip="true" label="创建时间">
</el-table-column>
@ -80,7 +73,7 @@
</el-pagination>
</div>
<div>
<data-sharing ref="dataSharing" v-if="selectedIndex==1" @pictureClose="pictureClose" @pictureOpen="pictureOpen"></data-sharing>
<data-sharing ref="dataSharing":name="name"v-if="selectedIndex==1" @pictureClose="pictureClose" @pictureOpen="pictureOpen"></data-sharing>
</div>
<div>
<picture-collection :name="name" @pictureOpen="pictureOpen" @pictureClose="pictureClose" ref="picture_collection" v-if="selectedIndex==2"></picture-collection>
@ -117,9 +110,9 @@
import pictureCollection from "./cpts/picture-collection.vue"
import * as echarts from "echarts";
import pictureAdd from './cpts/picture-add.vue'
import uploaddDataAdd from "./cpts/upload-data-add.vue"
import uploadDataAdd from "./cpts/upload-data-add.vue"
export default {
components: { exportShared,dataSharing,pictureCollection,shareExcel,pictureAdd,uploaddDataAdd},
components: { exportShared,dataSharing,pictureCollection,shareExcel,pictureAdd,uploadDataAdd},
data() {
@ -229,6 +222,7 @@
methods: {
closeUpdataAdd(){
this.showUpdate=false
this.$refs.dataSharing.getTableData()
},
handeleUpdate(){
console.log("东方军事对抗疗法");
@ -333,6 +327,16 @@
this.formData.taskTitle=this.name
this.getTableData()
}
else if (this.selectedIndex===1) {
console.log(this.name,"sdfkl;sd");
// this.formData.taskTitle=this.name
this.$nextTick(() => {
console.log("dsfjsdklf");
this.$refs.dataSharing.formData.name=this.name;
this.$refs.dataSharing.getTableData();
});
}
},

Loading…
Cancel
Save