|
@@ -3,7 +3,7 @@
|
|
|
<el-col :span="24" class="toolbar" style="padding-bottom: 0px;">
|
|
<el-col :span="24" class="toolbar" style="padding-bottom: 0px;">
|
|
|
<el-form :inline="true">
|
|
<el-form :inline="true">
|
|
|
<el-form-item :label="$t('lable.department')" style="width: 165px">
|
|
<el-form-item :label="$t('lable.department')" style="width: 165px">
|
|
|
- <el-cascader v-if="zhengbeiCompanysId.includes(user.companyId)" v-model="searchDepartmentId" :placeholder="$t('defaultText.pleaseChoose')" style="width: 125px"
|
|
|
|
|
|
|
+ <el-cascader @change="handleCascaderChange" v-if="zhengbeiCompanysId.includes(user.companyId)" v-model="searchDepartmentId" :placeholder="$t('defaultText.pleaseChoose')" style="width: 125px"
|
|
|
:options="option" :props="{ checkStrictly: false,expandTrigger: 'hover' }" :show-all-levels="false" clearable
|
|
:options="option" :props="{ checkStrictly: false,expandTrigger: 'hover' }" :show-all-levels="false" clearable
|
|
|
size="mini"></el-cascader>
|
|
size="mini"></el-cascader>
|
|
|
|
|
|
|
@@ -21,7 +21,8 @@
|
|
|
<!-- <el-link type="primary" :underline="false" @click="intoCenterRatio" class="tanjia">批量导入{{user.timeType.customDegreeName}}</el-link>
|
|
<!-- <el-link type="primary" :underline="false" @click="intoCenterRatio" class="tanjia">批量导入{{user.timeType.customDegreeName}}</el-link>
|
|
|
<el-link icon="el-icon-circle-plus-outline" type="primary" :underline="false" class="tanjia" @click="addNewSubProject()">添加{{user.timeType.customDegreeName}}</el-link>
|
|
<el-link icon="el-icon-circle-plus-outline" type="primary" :underline="false" class="tanjia" @click="addNewSubProject()">添加{{user.timeType.customDegreeName}}</el-link>
|
|
|
<el-link type="primary" :underline="false" @click="batchDelete" class="tanjia">批量删除{{user.timeType.customDegreeName}}</el-link> -->
|
|
<el-link type="primary" :underline="false" @click="batchDelete" class="tanjia">批量删除{{user.timeType.customDegreeName}}</el-link> -->
|
|
|
- <el-link type="primary" :underline="false" @click="batchDelete" class="tanjia">{{ $t('Batchdelete')
|
|
|
|
|
|
|
+ <!---->
|
|
|
|
|
+ <el-link type="primary" :underline="false" @click="batchDelete" class="tanjia">{{ $t('Batchdelete')
|
|
|
}}</el-link>
|
|
}}</el-link>
|
|
|
<el-link type="primary" :underline="false" @click="outoCenterRatio" class="tanjia">{{ $t('Exportdata')
|
|
<el-link type="primary" :underline="false" @click="outoCenterRatio" class="tanjia">{{ $t('Exportdata')
|
|
|
}}</el-link>
|
|
}}</el-link>
|
|
@@ -103,7 +104,7 @@
|
|
|
<el-dialog :title="$t('dao-ru') + user.timeType.customDegreeName + $t('shu-ju')" v-if="intoCenterDialog"
|
|
<el-dialog :title="$t('dao-ru') + user.timeType.customDegreeName + $t('shu-ju')" v-if="intoCenterDialog"
|
|
|
:visible.sync="intoCenterDialog" customClass="customWidth" width="500px">
|
|
:visible.sync="intoCenterDialog" customClass="customWidth" width="500px">
|
|
|
<p>1. {{ $t('other.download') }}
|
|
<p>1. {{ $t('other.download') }}
|
|
|
- <el-link type="primary" style="margin-left:5px;" :underline="false" href="./upload/研究中心导入模板.xlsx"
|
|
|
|
|
|
|
+ <el-link type="primary" style="margin-left:5px;" :underline="false" :href="downloadHref"
|
|
|
:download="user.timeType.customDegreeName + $t('importTemplate') + '.xlsx'">{{
|
|
:download="user.timeType.customDegreeName + $t('importTemplate') + '.xlsx'">{{
|
|
|
user.timeType.customDegreeName
|
|
user.timeType.customDegreeName
|
|
|
+ $t('importTemplate') }}.xlsx</el-link>
|
|
+ $t('importTemplate') }}.xlsx</el-link>
|
|
@@ -126,13 +127,10 @@ export default {
|
|
|
const list = this.subProjectList
|
|
const list = this.subProjectList
|
|
|
const searchDepartmentId = this.searchDepartmentId
|
|
const searchDepartmentId = this.searchDepartmentId
|
|
|
let result = []
|
|
let result = []
|
|
|
- if(!searchDepartmentId){
|
|
|
|
|
- return this.subProjectList
|
|
|
|
|
|
|
+ if(!searchDepartmentId || !this.subProjectList){
|
|
|
|
|
+ return list
|
|
|
}
|
|
}
|
|
|
for(const item of list){
|
|
for(const item of list){
|
|
|
- console.log(item)
|
|
|
|
|
- console.log(item.departmentIdList + " searchDepartmentId: " + searchDepartmentId)
|
|
|
|
|
- console.log("ListItem:" + typeof(item.departmentIdList) + "searchDepartmentId type:" + typeof(searchDepartmentId))
|
|
|
|
|
for(const id of item.departmentIdList){
|
|
for(const id of item.departmentIdList){
|
|
|
if(id == searchDepartmentId){
|
|
if(id == searchDepartmentId){
|
|
|
result.push(item)
|
|
result.push(item)
|
|
@@ -140,7 +138,18 @@ export default {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
return result
|
|
return result
|
|
|
- }
|
|
|
|
|
|
|
+ },
|
|
|
|
|
+ downloadHref() {
|
|
|
|
|
+
|
|
|
|
|
+ const companyId = this.user.companyId
|
|
|
|
|
+ const zhengbeiCompanysIdList = this.zhengbeiCompanysId
|
|
|
|
|
+ for(const id of zhengbeiCompanysIdList){
|
|
|
|
|
+ if(id == companyId){
|
|
|
|
|
+ return "./upload/正北/工作内容导入模板.xlsx"
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ return "./upload/工作内容导入模板.xlsx"
|
|
|
|
|
+ },
|
|
|
|
|
|
|
|
},
|
|
},
|
|
|
data() {
|
|
data() {
|
|
@@ -176,6 +185,11 @@ export default {
|
|
|
aabbcc() {
|
|
aabbcc() {
|
|
|
console.log(12345)
|
|
console.log(12345)
|
|
|
},
|
|
},
|
|
|
|
|
+ handleCascaderChange(value){
|
|
|
|
|
+ if (!value || value.length === 0) {
|
|
|
|
|
+ this.searchDepartmentId = null
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
searchName() {
|
|
searchName() {
|
|
|
var val = this.searchNameVal
|
|
var val = this.searchNameVal
|
|
|
let arr = []
|
|
let arr = []
|
|
@@ -206,7 +220,7 @@ export default {
|
|
|
nametext += this.selectionArr[i].name + '、'
|
|
nametext += this.selectionArr[i].name + '、'
|
|
|
}
|
|
}
|
|
|
nametext = nametext.substring(0, nametext.length - 1)
|
|
nametext = nametext.substring(0, nametext.length - 1)
|
|
|
- this.$confirm(this.$t('makesuretodeleteinbatches') + this.user.timeType.customDegreeName + this.$t('shu-ju') + ':' + nametext + '\u3000' + $t('ma'), this.$t('btn.delete'), {
|
|
|
|
|
|
|
+ this.$confirm(this.$t('makesuretodeleteinbatches') + this.user.timeType.customDegreeName + this.$t('shu-ju') + ':' + nametext + '\u3000' + this.$t('ma'), this.$t('btn.delete'), {
|
|
|
confirmButtonText: this.$t('btn.determine'),
|
|
confirmButtonText: this.$t('btn.determine'),
|
|
|
cancelButtonText: this.$t('btn.cancel'),
|
|
cancelButtonText: this.$t('btn.cancel'),
|
|
|
type: 'warning'
|
|
type: 'warning'
|
|
@@ -246,7 +260,8 @@ export default {
|
|
|
this.intoCenterDialog = true;
|
|
this.intoCenterDialog = true;
|
|
|
},
|
|
},
|
|
|
outoCenterRatio() {
|
|
outoCenterRatio() {
|
|
|
- this.http.post('/report-extra-degree/exportData', {},
|
|
|
|
|
|
|
+ const list = this.filteredSubProjectList
|
|
|
|
|
+ this.http.JSONPost('/report-extra-degree/exportData', list,
|
|
|
res => {
|
|
res => {
|
|
|
if (res.code == 'ok') {
|
|
if (res.code == 'ok') {
|
|
|
let filePath = res.data;
|
|
let filePath = res.data;
|
|
@@ -331,8 +346,6 @@ export default {
|
|
|
);
|
|
);
|
|
|
},
|
|
},
|
|
|
addNewSubProject(subProject) {
|
|
addNewSubProject(subProject) {
|
|
|
- console.log(this.user)
|
|
|
|
|
- console.log(this.option)
|
|
|
|
|
// console.log(1234)
|
|
// console.log(1234)
|
|
|
// if (subProject == null) {
|
|
// if (subProject == null) {
|
|
|
// this.addForm = {projectId: this.currentProject.id, level:1}
|
|
// this.addForm = {projectId: this.currentProject.id, level:1}
|
|
@@ -391,13 +404,11 @@ export default {
|
|
|
.catch(() => { });
|
|
.catch(() => { });
|
|
|
},
|
|
},
|
|
|
submitInsertSubProject() {
|
|
submitInsertSubProject() {
|
|
|
- console.log(this.addfm.departmentIdList)
|
|
|
|
|
this.$refs.form2.validate(valid => {
|
|
this.$refs.form2.validate(valid => {
|
|
|
if (valid) {
|
|
if (valid) {
|
|
|
var slp = this.addfm
|
|
var slp = this.addfm
|
|
|
if(this.addfm.departmentIdList){
|
|
if(this.addfm.departmentIdList){
|
|
|
slp.departmentId = this.addfm.departmentIdList[this.addfm.departmentIdList.length - 1]
|
|
slp.departmentId = this.addfm.departmentIdList[this.addfm.departmentIdList.length - 1]
|
|
|
- console.log(slp)
|
|
|
|
|
}
|
|
}
|
|
|
else{
|
|
else{
|
|
|
slp.departmentId = null
|
|
slp.departmentId = null
|
|
@@ -488,12 +499,9 @@ export default {
|
|
|
},
|
|
},
|
|
|
getDepartmentName(id) {
|
|
getDepartmentName(id) {
|
|
|
if (!id || !this.option) return null
|
|
if (!id || !this.option) return null
|
|
|
- console.log(this.option)
|
|
|
|
|
- console.log(id)
|
|
|
|
|
const findName = (list) => {
|
|
const findName = (list) => {
|
|
|
for (let item of list) {
|
|
for (let item of list) {
|
|
|
if (item.value === id) {
|
|
if (item.value === id) {
|
|
|
- console.log(item.value + "id:" + id)
|
|
|
|
|
return item.label
|
|
return item.label
|
|
|
}
|
|
}
|
|
|
if (item.children && item.children.length) {
|
|
if (item.children && item.children.length) {
|