Commit 7256cf70 authored by wangxl's avatar wangxl

eeeee

parent 28d27623
...@@ -309,7 +309,7 @@ export default { ...@@ -309,7 +309,7 @@ export default {
return fetch(`/v1/science-admin/com-expert-spec/getExpertListBySpecIdProjId`, params) return fetch(`/v1/science-admin/com-expert-spec/getExpertListBySpecIdProjId`, params)
}, },
getExpertListByExpertSpecIds (params) { getExpertListByExpertSpecIds (params) {
return fetch(`/v1/science-admin/com-expert-spec/getExpertListByExpertSpecIds`, params) return fetch(`/v1/science-admin/com-expert-spec/getExpertListByExpertSpecIds`, params, 'post', 'json')
}, },
getExpertListByExpertSpecIdOrParentId (params) { getExpertListByExpertSpecIdOrParentId (params) {
return fetch(`/v1/science-admin/com-expert-spec/getExpertListByExpertSpecIdOrParentId`, params) return fetch(`/v1/science-admin/com-expert-spec/getExpertListByExpertSpecIdOrParentId`, params)
...@@ -344,6 +344,9 @@ export default { ...@@ -344,6 +344,9 @@ export default {
getProjectDetailListbyPage (params) { getProjectDetailListbyPage (params) {
return fetch('/v1/science-admin/com-project-group-detail/getProjectDetailListbyPage', params) return fetch('/v1/science-admin/com-project-group-detail/getProjectDetailListbyPage', params)
}, },
getGroupProjectInfo (params) {
return fetch('/v1/science-admin/com-project-group/getGroupProjectInfo', params)
},
getProjectListByGroupIds (params) { getProjectListByGroupIds (params) {
return fetch('/v1/science-admin/com-project-group-detail/getProjectListByGroupIds', params) return fetch('/v1/science-admin/com-project-group-detail/getProjectListByGroupIds', params)
}, },
......
...@@ -7,13 +7,13 @@ ...@@ -7,13 +7,13 @@
<a v-for="(item) in expertSelectKeys" :key="item.key">{{item.title}}</a> <a v-for="(item) in expertSelectKeys" :key="item.key">{{item.title}}</a>
</div> </div>
</div> </div>
<div class="select-header-content"> <div class="select-seach-content">
<a-input placeholder="专家姓名" v-model="personName" @change="changePersonName" /> <a-input placeholder="专家姓名" v-model="personName" @change="changePersonName" />
</div> </div>
<div class="layout-select-content "> <div class="layout-select-content ">
<div class="content-inner"> <div class="content-inner">
<div class="tree-select"> <div class="tree-select">
<a-tree v-model="checkedKeys" :expandedKeys="defaultExpandedKeys" :blockNode="true" style="width: 100%" :tree-data="treeData" @select="onClick" @check="onCheck" @expand="onExpand" /> <a-tree v-model="checkedKeys" checkable :expandedKeys="defaultExpandedKeys" :blockNode="true" style="width: 100%" :tree-data="treeData" @select="onClick" @check="onCheck" @expand="onExpand" />
</div> </div>
<div class="content-select "> <div class="content-select ">
<select-item v-model="expertSelectKeys" :dataList="dataList" /> <select-item v-model="expertSelectKeys" :dataList="dataList" />
...@@ -64,66 +64,48 @@ export default { ...@@ -64,66 +64,48 @@ export default {
}, },
created () { created () {
this.loadTreeSelect() this.loadTreeSelect()
this.loadSpecList() this.getGroupProjectInfo()
this.seachExpert("00000000-0000-0000-0000-000000000000", null, null)
}, },
methods: { methods: {
loadTreeSelect () { getGroupProjectInfo () {
this.$api.parameter.getKnowledgeInfoList1().then(({ data = {} }) => { let pars = { groupIds: this.projGroupSelectedRowKeys }
if (data) { this.$api.projectGroupAssign.getGroupProjectInfo(pars).then(({ data = {} }) => {
this.treeData = data
this.defaultExpandedKeys = [this.treeData[0].key]
}
}).catch(() => { this.loading = true });
},
loadSpecList () {
this.$api.parameter.getSpecArray().then(({ data = {} }) => {
if (data) { if (data) {
this.specArray = data this.checkedKeys = data.spec
this.buildSpecKeyMap() this.defaultExpandedKeys = data.expanded
this.seachExpert(this.checkedKeys)
} }
this.loading = false
}).catch(() => {
this.$message.error('error!')
this.loading = false
}) })
}, },
buildSpecKeyMap() {
this.specKeyMap = {}
this.specArray.forEach(item => {
this.specKeyMap[item.key] = 3
this.specKeyMap[item.pkey] = 2
this.specKeyMap[item.ppkey] = 1
})
},
FromSpecArrayFindKey(key) {
return this.specKeyMap[key] || 0
},
processExpertSearch(value) {
const level = this.FromSpecArrayFindKey(value)
if (level == 1)
this.seachExpert(null, null, value)
else if (level == 2)
this.seachExpert(null, value, null)
else
this.seachExpert(value, null, null)
},
onClick (value, info) { onClick (value, info) {
this.processExpertSearch(value)
}, },
onCheck (value, info) { onCheck (value, info) {
this.processExpertSearch(value) this.seachExpert(value)
}, },
onExpand (value) { onExpand (value) {
this.defaultExpandedKeys = value this.defaultExpandedKeys = value
}, },
onCancel () {
this.$emit("close", 'cancel')
},
loadTreeSelect () {
this.$api.parameter.getKnowledgeInfoList1().then(({ data = {} }) => {
if (data) {
this.treeData = data
this.defaultExpandedKeys = [this.treeData[0].key]
}
}).catch(() => { this.loading = true });
},
changePersonName () { changePersonName () {
this.seachExpert(null, null, null) this.seachExpert(null, null, null,)
}, },
seachExpert (specId, pkey, ppkey) { seachExpert (specId) {
this.loading = true this.loading = true
if (this.personName !== null && this.personName !== '') { this.$api.expertSpec.getExpertListByExpertSpecIds({ specIds: specId, groupIds: this.projGroupSelectedRowKeys, personName: this.personName }).then(({ data = {} }) => {
specId = null
pkey = null
ppkey = null
}
this.$api.expertSpec.getExpertListByExpertSpecIdOrParentId({ specId: specId, pkey: pkey, ppkey: ppkey, personName: this.personName }).then(({ data = {} }) => {
if (data) { if (data) {
this.dataList = data this.dataList = data
this.expertFilter(this.expertSelectKeys, this.dataList) this.expertFilter(this.expertSelectKeys, this.dataList)
...@@ -132,9 +114,6 @@ export default { ...@@ -132,9 +114,6 @@ export default {
}).catch(() => { }); }).catch(() => { });
this.loading = false this.loading = false
}, },
onCancel () {
this.$emit("close", 'cancel')
},
submit () { submit () {
this.loading = true this.loading = true
if (this.expertSelectKeys.length == 0) { if (this.expertSelectKeys.length == 0) {
...@@ -178,6 +157,7 @@ export default { ...@@ -178,6 +157,7 @@ export default {
height: 100%; height: 100%;
border: 1px solid #d9d9d9; border: 1px solid #d9d9d9;
border-radius: 4px 4px 4px 4px; border-radius: 4px 4px 4px 4px;
font-size: 8pt;
.layout-select-header { .layout-select-header {
position: relative; position: relative;
...@@ -189,15 +169,29 @@ export default { ...@@ -189,15 +169,29 @@ export default {
line-height: 35px; line-height: 35px;
position: absolute; position: absolute;
top: 0; top: 0;
left: 75px; left: 60px;
width: calc(100% - 75px); width: calc(100% - 60px);
height: 100%; height: 100%;
padding: 2px;
} }
.select-header-content a { .select-header-content a {
margin-left: 6px; margin-left: 6px;
} }
} }
.select-seach-content {
padding: 3px;
}
.layout-select-content { .layout-select-content {
.ant-tree {
font-size: 8pt !important;
}
::v-deep .ant-tree .ant-tree-checkbox {
margin: 0 0 !important;
}
::v-deep .ant-tree li span.ant-tree-switcher,
.ant-tree li span.ant-tree-iconEle {
width: 16px !important;
}
width: 100%; width: 100%;
height: calc(100% - 70px); height: calc(100% - 70px);
padding: 3px; padding: 3px;
...@@ -214,7 +208,7 @@ export default { ...@@ -214,7 +208,7 @@ export default {
width: 100%; width: 100%;
height: 35px; height: 35px;
vertical-align: middle; vertical-align: middle;
text-align: right; text-align: left;
padding: 1px; padding: 1px;
} }
::v-deep.ant-spin-nested-loading .ant-spin-container { ::v-deep.ant-spin-nested-loading .ant-spin-container {
...@@ -226,15 +220,15 @@ export default { ...@@ -226,15 +220,15 @@ export default {
position: absolute; position: absolute;
top: 0; top: 0;
left: 0; left: 0;
width: 200px; width: 320px;
height: 100%; height: 100%;
overflow-x: auto; overflow-x: auto;
overflow-y: auto; overflow-y: auto;
border-right: 1px solid #e8e8e8; border-right: 1px solid #e8e8e8;
} }
.content-select { .content-select {
margin-left: 200px; margin-left: 320px;
width: calc(100% - 200px); width: calc(100% - 320px);
height: 100%; height: 100%;
overflow-x: auto; overflow-x: auto;
overflow-y: auto; overflow-y: auto;
......
<template> <template>
<div class="layout-data-page"> <div class="select-item">
<div class="data-header"> <div class="select-checked">
<a-checkbox :indeterminate="indeterminate" :checked="checkAll" @change="onCheckAllChange" /> <span>{{nowSelectKeys.length}}</span> <a-checkbox :indeterminate="indeterminate" :checked="checkAll" @change="onCheckAllChange" /> <span>{{nowSelectKeys.length}}</span>
</div> </div>
<div class="data-list-body"> <div class="select-content">
<ul class="data-list-content"> <ul class="data-list-content">
<li v-for="(item,index) in dataList" :key="item.key" @click="onChange(item,index)" class="data-list-content-item"> <li v-for="(item,index) in dataList" :key="item.key" @click="onChange(item,index)" class="data-list-content-item">
<input type="checkbox" class="list-checkbox-input" :checked="item.selected"> <input type="checkbox" class="list-checkbox-input" :checked="item.selected" :disabled="item.disabled">
<span> <span style="font-size:8pt;" :title="item.description" :class="{'font-red':item.disabled}">
<span style="font-size:14px;">{{item.title}}<span style="margin-left:4px;font-style: italic;font-size: 12px;color: #8e99a5;">({{item.description}})</span></span> <span>{{item.title}}<span style="font-style: italic;color: #8e99a5;" :class="{'font-red':item.disabled}">({{item.description}})</span></span>
</span> </span>
</li> </li>
</ul> </ul>
...@@ -48,7 +48,13 @@ export default { ...@@ -48,7 +48,13 @@ export default {
this.initData() this.initData()
}, },
methods: { methods: {
getStyle (value) {
return {
color: value ? 'red' : 'black'
};
},
onChange (e) { onChange (e) {
if (!e.disabled) {
e.selected = !e.selected e.selected = !e.selected
if (e.selected) { if (e.selected) {
this.selectKeys.push(e) this.selectKeys.push(e)
...@@ -62,6 +68,7 @@ export default { ...@@ -62,6 +68,7 @@ export default {
} }
this.initData() this.initData()
this.$emit("input", this.selectKeys) this.$emit("input", this.selectKeys)
}
}, },
onCheckAllChange (e) { onCheckAllChange (e) {
if (e.target.checked) { if (e.target.checked) {
...@@ -113,13 +120,16 @@ export default { ...@@ -113,13 +120,16 @@ export default {
} }
</script> </script>
<style scoped lang="less"> <style scoped lang="less">
.layout-data-page { .font-red {
color: red !important;
}
.select-item {
position: relative; position: relative;
width: 100%; width: 100%;
height: 100%; height: 100%;
vertical-align: middle; vertical-align: middle;
border-radius: 4px; border-radius: 4px;
.data-header { .select-checked {
width: 100%; width: 100%;
height: 40px; height: 40px;
padding: 8px 5px 9px; padding: 8px 5px 9px;
...@@ -129,41 +139,45 @@ export default { ...@@ -129,41 +139,45 @@ export default {
border-bottom: 1px solid #e8e8e8; border-bottom: 1px solid #e8e8e8;
border-radius: 4px 4px 0 0; border-radius: 4px 4px 0 0;
} }
.data-list-body { .select-content {
width: 100%; width: 100%;
height: calc(100% - 40px); height: calc(100% - 40px);
overflow-x: hidden; overflow-x: hidden;
overflow-y: auto; overflow-y: auto;
.data-list-content { ul {
height: 100%; height: 100%;
margin: 0; margin: 0;
padding: 0; padding: 0;
overflow: auto; overflow: auto;
list-style: none; list-style: none;
} }
.data-list-content-item { ul li {
position: relative;
height: 24px; height: 24px;
padding: 3px 2px 2px 5px; padding: 0px 4px;
overflow: hidden; overflow: hidden;
white-space: nowrap; white-space: nowrap;
text-overflow: ellipsis; text-overflow: ellipsis;
transition: all 0.3s; transition: all 0.3s;
overflow: hidden; overflow: hidden;
cursor: pointer; cursor: pointer;
.list-checkbox-input {
width: 16px;
height: 16px;
cursor: pointer;
}
} }
.data-list-content-item:hover { ul li:hover {
background-color: rgb(230 247 255); background-color: rgb(230 247 255);
} }
.data-list-content-item > span { ul li > span {
position: absolute; padding-left: 4px;
top: 0; cursor: pointer;
margin-left: 4px; margin: 0;
vertical-align: middle;
}
ul li input {
display: inline-block;
vertical-align: middle;
}
.list-checkbox-input {
width: 14px;
height: 14px;
cursor: pointer;
} }
} }
} }
......
...@@ -66,8 +66,7 @@ ...@@ -66,8 +66,7 @@
</template> </template>
<template slot="option" slot-scope="record"> <template slot="option" slot-scope="record">
<a-button type="link" size="small" @click="recordClick(record, 'view')">查看</a-button> <a-button type="link" size="small" @click="recordClick(record, 'view')">查看</a-button>
<a-button type="link" size="small" v-if="record.auditResult == 1 && isButten" <a-button type="link" size="small" v-if="record.auditResult == 1 && isButten" @click="recordClick(record, 'audit')">审核</a-button>
@click="recordClick(record, 'audit')">审核</a-button>
</template> </template>
</a-table> </a-table>
<a-pagination v-if="pagination.total > 0" :total="pagination.total" show-size-changer show-quick-jumper v-model="pagination.pageIndex" :page-size="pagination.pageSize" :page-size-options="pagination.pageSizeOptions" @showSizeChange="showSizeChange" @change="change" :showTotal="() => `共 ${pagination.total} 条`" /> <a-pagination v-if="pagination.total > 0" :total="pagination.total" show-size-changer show-quick-jumper v-model="pagination.pageIndex" :page-size="pagination.pageSize" :page-size-options="pagination.pageSizeOptions" @showSizeChange="showSizeChange" @change="change" :showTotal="() => `共 ${pagination.total} 条`" />
...@@ -101,7 +100,7 @@ export default { ...@@ -101,7 +100,7 @@ export default {
paraSelect, paraSelect,
Audit, Audit,
}, },
data() { data () {
return { return {
// 选项卡 // 选项卡
panes: { count1: 0, count2: 0, count3: 0, count4: 0, count5: 0 }, panes: { count1: 0, count2: 0, count3: 0, count4: 0, count5: 0 },
...@@ -156,19 +155,19 @@ export default { ...@@ -156,19 +155,19 @@ export default {
objectId: null, objectId: null,
}; };
}, },
created() { created () {
this.getYear(); this.getYear();
}, },
methods: { methods: {
search() { search () {
this.pagination.pageIndex = 1; this.pagination.pageIndex = 1;
this.getListByPage(); this.getListByPage();
}, },
reset() { reset () {
this.pagination.pageIndex = 1; this.pagination.pageIndex = 1;
this.getListByPage(); this.getListByPage();
}, },
getYear() { getYear () {
let pars = { type: 3 }; let pars = { type: 3 };
this.$api.year this.$api.year
.getYearByTreeCode(pars) .getYearByTreeCode(pars)
...@@ -184,7 +183,7 @@ export default { ...@@ -184,7 +183,7 @@ export default {
this.loading = false; this.loading = false;
}); });
}, },
getListByPage() { getListByPage () {
this.getCount(); this.getCount();
this.loading = true; this.loading = true;
let pars = isEmptyParams(this.searchForm); let pars = isEmptyParams(this.searchForm);
...@@ -207,7 +206,7 @@ export default { ...@@ -207,7 +206,7 @@ export default {
this.loading = false; this.loading = false;
}); });
}, },
getCount() { getCount () {
let pars = isEmptyParams({ let pars = isEmptyParams({
auditType: 3, auditType: 3,
reportYear: this.searchForm.reportYear, reportYear: this.searchForm.reportYear,
...@@ -221,15 +220,15 @@ export default { ...@@ -221,15 +220,15 @@ export default {
}) })
.catch(() => { }); .catch(() => { });
}, },
submitForm() { }, submitForm () { },
change() { change () {
this.getListByPage(); this.getListByPage();
}, },
showSizeChange (current, pageSize) { showSizeChange (current, pageSize) {
this.pagination.pageSize = pageSize this.pagination.pageSize = pageSize
this.getListByPage() this.getListByPage()
}, },
closeAuditWindow(value) { closeAuditWindow (value) {
if (value === "audit") { if (value === "audit") {
this.getListByPage(); this.getListByPage();
this.visibleAudit = false; this.visibleAudit = false;
...@@ -237,7 +236,7 @@ export default { ...@@ -237,7 +236,7 @@ export default {
this.visibleAudit = false; this.visibleAudit = false;
} else this.visibleView = false; } else this.visibleView = false;
}, },
recordClick(record, type) { recordClick (record, type) {
if (type === "view") { if (type === "view") {
this.objectId = record.auditObjectId; this.objectId = record.auditObjectId;
this.visibleView = true; this.visibleView = true;
...@@ -247,11 +246,11 @@ export default { ...@@ -247,11 +246,11 @@ export default {
this.visibleAudit = true; this.visibleAudit = true;
} }
}, },
callback(key) { callback (key) {
this.searchForm.auditResult = key; this.searchForm.auditResult = key;
this.getListByPage(); this.getListByPage();
}, },
exportData() { exportData () {
this.$ToDoExcel( this.$ToDoExcel(
`中期考核审核列表`, `中期考核审核列表`,
tableColumnsName(this.columns), tableColumnsName(this.columns),
......
...@@ -25,7 +25,6 @@ ...@@ -25,7 +25,6 @@
</a-form-item> </a-form-item>
<a-form-item> <a-form-item>
<para-select v-model="searchForm.knowledgeId" :typeId="56" :width="150" /> <para-select v-model="searchForm.knowledgeId" :typeId="56" :width="150" />
<!-- <para-multi-select v-model="searchForm.knowledgeId" @parentChange="parChange" :title="'学科'" :objType="'project'" :typeId="57" :width="150" /> -->
</a-form-item> </a-form-item>
<a-form-item> <a-form-item>
<a-button type="primary" icon="search" @click="projSearch">搜索</a-button> <a-button type="primary" icon="search" @click="projSearch">搜索</a-button>
...@@ -68,12 +67,6 @@ ...@@ -68,12 +67,6 @@
</a-table> </a-table>
<a-pagination v-if="pagination.total > 0" :total="pagination.total" show-size-changer show-quick-jumper v-model="pagination.pageIndex" :page-size="pagination.pageSize" :page-size-options="pagination.pageSizeOptions" @showSizeChange="showSizeChange" @change="change" :showTotal="() => `共 ${pagination.total} 条`" /> <a-pagination v-if="pagination.total > 0" :total="pagination.total" show-size-changer show-quick-jumper v-model="pagination.pageIndex" :page-size="pagination.pageSize" :page-size-options="pagination.pageSizeOptions" @showSizeChange="showSizeChange" @change="change" :showTotal="() => `共 ${pagination.total} 条`" />
<!-- <s-modal :title="projectGroupTitle" v-model="projDetailVisible" v-if="projDetailVisible" ref="childWindow" :loading="false">
<div slot="content">
<group-detail v-model="groupId" :btnAddVisiable="false" @close="closeProjDetail" />
</div>
</s-modal> -->
<a-modal v-model="groupEditVisible" title="项目组编辑" width="60%" :dialog-style="{ top: '15%' }" :maskClosable="false" destroyOnClose> <a-modal v-model="groupEditVisible" title="项目组编辑" width="60%" :dialog-style="{ top: '15%' }" :maskClosable="false" destroyOnClose>
<template slot="footer"> <template slot="footer">
<a-button type="primary" @click="() => this.$refs.childEdit.submit()">提交</a-button> <a-button type="primary" @click="() => this.$refs.childEdit.submit()">提交</a-button>
...@@ -514,7 +507,7 @@ export default { ...@@ -514,7 +507,7 @@ export default {
margin: 14px 0px 0px 0px !important; margin: 14px 0px 0px 0px !important;
} }
::v-deep .ant-drawer .ant-drawer-content-wrapper { ::v-deep .ant-drawer .ant-drawer-content-wrapper {
width: 480px !important; width: 600px !important;
.ant-drawer-content .ant-drawer-wrapper-body { .ant-drawer-content .ant-drawer-wrapper-body {
.ant-drawer-header { .ant-drawer-header {
padding: 10px 10px !important; padding: 10px 10px !important;
......
...@@ -335,8 +335,8 @@ ...@@ -335,8 +335,8 @@
<td colspan="2">${emp.unitName!}</td> <td colspan="2">${emp.unitName!}</td>
<td colspan="2">${emp.unitAddress!}</td> <td colspan="2">${emp.unitAddress!}</td>
<td colspan="2">${emp.organizationCode!}</td> <td colspan="2">${emp.organizationCode!}</td>
<td colspan="2">${emp.division!}</td> <td colspan="2">${emp.projectWork!}</td>
<td>${unit.projectWork!}</td> <td></td>
</tr> </tr>
</#list> </#list>
</table> </table>
...@@ -345,12 +345,12 @@ ...@@ -345,12 +345,12 @@
<p>三、项目人员情况</p> <p>三、项目人员情况</p>
<table> <table>
<tr> <tr>
<td rowspan="5">项目负责人</td> <td rowspan="5" colspan="2">项目负责人</td>
<td colspan="3">姓名</td> <td colspan="3">姓名</td>
<td colspan="3">${appPersonName!}</td> <td colspan="3">${appPersonName!}</td>
<td colspan="2">性别</td> <td colspan="2">性别</td>
<td colspan="2">${sex!}</td> <td colspan="2">${sex!}</td>
<td colspan="3">出生日期</td> <td colspan="2">出生日期</td>
<td colspan="2">${(birthday?string('yyyy年MM月'))!}</td> <td colspan="2">${(birthday?string('yyyy年MM月'))!}</td>
</tr> </tr>
<tr> <tr>
...@@ -358,7 +358,7 @@ ...@@ -358,7 +358,7 @@
<td colspan="3">身份证</td> <td colspan="3">身份证</td>
<td colspan="2">证件号码</td> <td colspan="2">证件号码</td>
<td colspan="2">${certId!}</td> <td colspan="2">${certId!}</td>
<td colspan="3">民族</td> <td colspan="2">民族</td>
<td colspan="2">${nationName!}</td> <td colspan="2">${nationName!}</td>
</tr> </tr>
<tr> <tr>
...@@ -366,7 +366,7 @@ ...@@ -366,7 +366,7 @@
<td colspan="3">${titleName!}</td> <td colspan="3">${titleName!}</td>
<td colspan="2">从事专业</td> <td colspan="2">从事专业</td>
<td colspan="2">${specName!}</td> <td colspan="2">${specName!}</td>
<td colspan="3">项目分工</td> <td colspan="2">项目分工</td>
<td colspan="2">${projWork!}</td> <td colspan="2">${projWork!}</td>
</tr> </tr>
<tr> <tr>
...@@ -374,7 +374,7 @@ ...@@ -374,7 +374,7 @@
<td colspan="3">${degreeName!}</td> <td colspan="3">${degreeName!}</td>
<td colspan="2">职务</td> <td colspan="2">职务</td>
<td colspan="2">${dutyName!}</td> <td colspan="2">${dutyName!}</td>
<td colspan="3">传真</td> <td colspan="2">传真</td>
<td colspan="2">${fax!}</td> <td colspan="2">${fax!}</td>
</tr> </tr>
<tr> <tr>
...@@ -382,7 +382,7 @@ ...@@ -382,7 +382,7 @@
<td colspan="3">${mobile!}</td> <td colspan="3">${mobile!}</td>
<td colspan="2">联系电话</td> <td colspan="2">联系电话</td>
<td colspan="2">${telephone!}</td> <td colspan="2">${telephone!}</td>
<td colspan="3">电子邮箱</td> <td colspan="2">电子邮箱</td>
<td colspan="2">${email!}</td> <td colspan="2">${email!}</td>
</tr> </tr>
<tr> <tr>
......
...@@ -694,7 +694,7 @@ ...@@ -694,7 +694,7 @@
<a-col :span="4"> <a-col :span="4">
<div class="special-middle"> <div class="special-middle">
<div> <div>
{{ value.memCount }} {{ value.memCount }} I
</div> </div>
</div> </div>
</a-col> </a-col>
......
...@@ -148,30 +148,23 @@ export default { ...@@ -148,30 +148,23 @@ export default {
} }
}, },
onExport () { onExport () {
let headers = {
Authorization: 'Bearer ' + getToken()
}
axios({ axios({
url: "/v1/science-admin/com-project-task/export/" + this.value, url: "/v1/science-admin/com-project-task/export/" + this.value,
method: 'GET', method: 'GET',
responseType: "blob", responseType: "arraybuffer", // 告诉axios返回的数据类型为Blob
headers: { headers: headers
Authorization: 'Bearer ' + getToken(),
'Content-Type': 'application/pdf;charset=utf-8'
}
}).then(response => { }).then(response => {
console.log(response) const url = window.URL.createObjectURL(new Blob([response.data]))
const blob = new Blob([response.data], { type: 'application/pdf' }); const link = document.createElement('a')
const url = window.URL.createObjectURL(blob); link.href = url
const link = document.createElement('a'); link.setAttribute("download", this.formData.projName + ".pdf");// 下载文件的名称
link.href = url; document.body.appendChild(link)
const filename = response.headers['content-disposition'] ? decodeURIComponent(response.headers['content-disposition'].split('filename=')[1]) : '项目报告.pdf'; link.click()
link.setAttribute("download", filename); this.loading = false
document.body.appendChild(link); })
link.click();
document.body.removeChild(link);
window.URL.revokeObjectURL(url);
}).catch(error => {
console.error('下载文件出错:', error);
this.$message.error('下载文件失败');
});
}, },
callback (key) { callback (key) {
var index = parseInt(key) var index = parseInt(key)
......
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