Browse Source

状态核对,模板预览用链接下载

luckysheet-xiaowang-Intelligen
mk 9 months ago
parent
commit
85a430b1be
  1. 27
      src/views/modules/base/smartExcel/cpts/excel-summary.vue
  2. 4
      src/views/modules/base/smartExcel/cpts/excel-template-confirmation.vue
  3. 86
      src/views/modules/base/smartExcel/cpts/excel-view.vue
  4. 11
      src/views/modules/base/smartExcel/cpts/filling-info.vue

27
src/views/modules/base/smartExcel/cpts/excel-summary.vue

@ -6,21 +6,21 @@
<h3 class="title">汇总文件</h3> <h3 class="title">汇总文件</h3>
<el-button type="text" icon="el-icon-back" @click="handleClickBack">返回</el-button> <el-button type="text" icon="el-icon-back" @click="handleClickBack">返回</el-button>
</div> </div>
<div class="item flex flex-y flex-center-deputy " @click="handleClickShowView(list[0].workBookId,true)"> <div class="item flex flex-y flex-center-deputy " @click="handleClickShowViewAll(list[0].workBookId)">
<img :src="require(`@/assets/images/index/Excel.png`)" alt=""> <img :src="require(`@/assets/images/index/Excel.png`)" alt="">
<div class="agencyName">周期更新表</div> <div class="agencyName">周期更新表</div>
</div> </div>
<h3 class="title">提报的文件</h3> <h3 class="title">提报的文件</h3>
<div class="flex-wrap flex"> <div class="flex-wrap flex">
<div class="item flex flex-y flex-center-deputy" v-for="(item, index) in list" @click="handleClickShowView(summaryDetal.taskId)" :key="index"> <div class="item flex flex-y flex-center-deputy" v-for="(item, index) in list" @click="handleClickShowView(item)" :key="index">
<img :src="require(`@/assets/images/index/Excel.png`)" alt=""> <img :src="require(`@/assets/images/index/Excel.png`)" alt="">
<div class="agencyName">{{ item.taskTitle }}周期更新表</div> <div class="agencyName">{{ item.taskTitle }}周期更新表</div>
<div>{{ getStateDescription(item.state) }}</div> <div>{{ getStateDescription(item.taskState) }}</div>
</div> </div>
</div> </div>
</div> </div>
<div v-if="showView"> <div v-if="showView">
<excel-view @close="close" :workbookId="workbookId" :pageType="'add'" :sheetTotal="sheetTotal"></excel-view> <excel-view @close="close" :workbookId="workbookId" :infoObj="infoObj" :pageType="'add'" :sheetTotal="sheetTotal"></excel-view>
</div> </div>
</div> </div>
</template> </template>
@ -35,14 +35,14 @@ export default {
list: [ list: [
], ],
workbookId:'', workbookId:'',
sheetTotal:false sheetTotal:false,
infoObj:{}
}; };
}, },
created() { created() {
}, },
async mounted(){ async mounted(){
console.log(this.summaryDetal,"dsalkjdlfks");
this.getTableList() this.getTableList()
}, },
methods: { methods: {
@ -79,12 +79,21 @@ export default {
handleClickBack() { handleClickBack() {
this.$emit('close') this.$emit('close')
}, },
handleClickShowView(val,total){ handleClickShowView(val){
const { id, taskId, taskTitle, taskPeriod, taskType, taskIntroduction } = val;
this.$store.state.sidebarFold = true; this.$store.state.sidebarFold = true;
this.showView = true; this.showView = true;
this.sheetTotal = total || false this.sheetTotal = false
this.workbookId = val this.workbookId = val.taskId;
this.infoObj = { id, taskId, taskTitle, taskPeriod, taskType, taskIntroduction };
}, },
handleClickShowViewAll(val){
this.$store.state.sidebarFold = true;
this.showView = true;
this.sheetTotal = true
this.workbookId = val
}
}, },
components: { excelView }, components: { excelView },
computed: { computed: {

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

@ -70,8 +70,8 @@ export default {
} }
}, },
mounted() { mounted() {
console.log(this.fileUrl, 'fileUrl==='); console.log(this.fileUrl, 'fileUrl===');//'http://localhost:9001/epmet-work-pc/test1.xlsx'
this.urlToFile('http://localhost:9001/epmet-work-pc/test1.xlsx',this.fileName) this.urlToFile(this.fileUrl,this.fileName)
}, },
props: { props: {

86
src/views/modules/base/smartExcel/cpts/excel-view.vue

@ -24,9 +24,10 @@
<el-button type="success" @click="onClickUplond()" v-if="pageType !== 'add'"> 智能填表</el-button> <el-button type="success" @click="onClickUplond()" v-if="pageType !== 'add'"> 智能填表</el-button>
</div> </div>
<div> <div>
<el-button type="danger" v-if="pageType === 'add'"> 驳回重提</el-button> <!-- -->
<el-button type="primary" v-if="pageType === 'add'"> 审核存档</el-button> <el-button type="danger" v-if="pageType === 'add'" @click="handleClickCurrencyEvent('rejected')"> 驳回重提</el-button>
<el-button type="primary" v-if="pageType === 'filling'"> 保存</el-button> <el-button type="primary" v-if="pageType === 'add'" @click="handleClickCurrencyEvent('archived')"> 审核存档</el-button>
<el-button type="primary" v-if="pageType === 'filling'" @click="handleClickCurrencyEvent('submit')"> 保存</el-button>
</div> </div>
</div> </div>
<div id="luckysheet"></div> <div id="luckysheet"></div>
@ -51,26 +52,7 @@ export default {
data() { data() {
return { return {
showUploadData: false, showUploadData: false,
menuList: [ menuList: [],
// {
// name: '202411',
// workbookId:'1876569275607785473'
// },
// {
// name: '202411',
// workbookId:'1876571135966158850'
// },
// {
// name: '202411',
// workbookId:'1879063358107648002'
// },
// {
// name: '202411'
// },
// {
// name: '202411'
// }
],
menuActive: 0, menuActive: 0,
socket: null, socket: null,
currentTable: null, currentTable: null,
@ -89,6 +71,10 @@ export default {
sheetTotal: { sheetTotal: {
type: Boolean, type: Boolean,
default: false default: false
},
infoObj:{
type:Object,
default:()=>{}
} }
}, },
computed: { computed: {
@ -203,46 +189,6 @@ export default {
}, },
updataSheet(list) { updataSheet(list) {
let arr = [
// {
// 1: '1',
// 2: '1',
// 3: '1234',
// 4: '456',
// 5: '',
// 6: '',
// 7: '',
// 8: '',
// 9: '',
// 10: '',
// 11: '',
// 12: '',
// 13: '',
// 14: '',
// 15: '',
// 16: '',
// 17: ''
// },
// {
// 1: '12',
// 2: '12',
// 3: '12342',
// 4: '4562',
// 5: '2',
// 6: '2',
// 7: '2',
// 8: '2',
// 9: '2',
// 10: '2',
// 11: '2',
// 12: '2',
// 13: '2',
// 14: '2',
// 15: '2',
// 16: '2',
// 17: ''
// }
]
list.forEach((item, index) => { list.forEach((item, index) => {
luckysheet.insertRow(this.currentTable[0].data.length, 1) luckysheet.insertRow(this.currentTable[0].data.length, 1)
for (let k in item) { for (let k in item) {
@ -250,6 +196,20 @@ export default {
} }
}) })
}, },
//
async handleClickCurrencyEvent(val){
const url = '/actual/base/communityOneTablePeriodPublish/update'
let parm = {
...this.infoObj
}
parm.taskState = val
const {data,code,msg} = await requestPost(url,parm)
if(code === 0){
this.$message.success('操作成功')
}else{
console.log(msg);
}
},
}, },
components: { components: {
excelUploadData excelUploadData

11
src/views/modules/base/smartExcel/cpts/filling-info.vue

@ -65,11 +65,11 @@
<span>点击以下表格开始提报任务</span> <span>点击以下表格开始提报任务</span>
</div> </div>
<div class="flex-wrap flex"> <div class="flex-wrap flex">
<div class="item flex flex-y flex-center-deputy" @click="handleClickShowView(formData.workBookId)" <div class="item flex flex-y flex-center-deputy" @click="handleClickShowView(formData.subWorkBookId)"
:key="index"> :key="index">
<img :src="require(`@/assets/images/index/Excel.png`)" alt=""> <img :src="require(`@/assets/images/index/Excel.png`)" alt="">
<div class="agencyName">{{formData.taskTitle}}</div> <div class="agencyName">{{formData.taskTitle}}</div>
<div></div> <div>{{formData.taskStateName}}</div>
</div> </div>
</div> </div>
<div class="flex title flex-center-deputy"> <div class="flex title flex-center-deputy">
@ -90,7 +90,7 @@
</div> </div>
</div> </div>
<div v-if="showView"> <div v-if="showView">
<excel-view @close="close" :workbookId="workbookId" :pageType="'filling'" :sheetTotal="true"></excel-view> <excel-view @close="close" :workbookId="workbookId" :pageType="'filling'" :sheetTotal="true" :infoObj="infoObj"></excel-view>
</div> </div>
<el-dialog title="转派其他接收人" :visible.sync="showPersonel" width="50%" :close-on-click-modal="false"> <el-dialog title="转派其他接收人" :visible.sync="showPersonel" width="50%" :close-on-click-modal="false">
<acceptingPersonel :showType="showType" :taskId="formData.id" <acceptingPersonel :showType="showType" :taskId="formData.id"
@ -115,6 +115,7 @@ export default {
], ],
formData:{ formData:{
}, },
infoObj:{}
}; };
}, },
created() { }, created() { },
@ -139,7 +140,9 @@ export default {
id: this.taskId, id: this.taskId,
}; };
requestGet('/actual/base/communityOneTablePeriodPublish/getDetail', parms).then(res => { requestGet('/actual/base/communityOneTablePeriodPublish/getDetail', parms).then(res => {
this.formData=res.data this.formData=res.data;
const { id, taskId, taskTitle, taskPeriod, taskType, taskIntroduction } = this.formData;
this.infoObj = {id, taskId, taskTitle, taskPeriod, taskType, taskIntroduction}
}); });
}, },
close() { close() {

Loading…
Cancel
Save