|
@@ -4,7 +4,7 @@
|
|
direction="rtl" :before-close="close" destroy-on-close>
|
|
direction="rtl" :before-close="close" destroy-on-close>
|
|
<el-container>
|
|
<el-container>
|
|
<el-main>
|
|
<el-main>
|
|
- <el-form :model="ruleForm" :rules="rules" ref="ruleForm1" label-width="130px" label-position="left"
|
|
|
|
|
|
+ <el-form :model="ruleForm" :rules="rules" ref="ruleForm" label-width="130px" label-position="left"
|
|
class="demo-ruleForm">
|
|
class="demo-ruleForm">
|
|
<el-form-item label="专题库名称" prop="name">
|
|
<el-form-item label="专题库名称" prop="name">
|
|
<el-input v-model="ruleForm.name" placeholder="请输入专题库名称"></el-input>
|
|
<el-input v-model="ruleForm.name" placeholder="请输入专题库名称"></el-input>
|
|
@@ -13,9 +13,9 @@
|
|
<div>
|
|
<div>
|
|
<el-form-item label="委托方" prop="entrustName" v-if="userinfo.tenantType == 1">
|
|
<el-form-item label="委托方" prop="entrustName" v-if="userinfo.tenantType == 1">
|
|
|
|
|
|
- <mySelectButton size='large' style="width:100%" @click="handleSelect">
|
|
|
|
|
|
+ <mySelectButton size='large' style="width:100%" @click="handleSelect" >
|
|
<div slot="select" style="width:100%">
|
|
<div slot="select" style="width:100%">
|
|
- <el-autocomplete style="width:100%" v-model="ruleForm.entrustName" ref="client" :fetch-suggestions="querySearch" v-SelectLazyLoading="loadClient"
|
|
|
|
|
|
+ <el-autocomplete style="width:100%" v-model="ruleForm.entrustName" ref="client" value-key="name" :fetch-suggestions="querySearch" v-SelectLazyLoading="loadClient"
|
|
@input="input" placeholder="请输入内容" :trigger-on-focus="false" @select="handleChange">
|
|
@input="input" placeholder="请输入内容" :trigger-on-focus="false" @select="handleChange">
|
|
</el-autocomplete>
|
|
</el-autocomplete>
|
|
</div>
|
|
</div>
|
|
@@ -32,7 +32,7 @@
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item label="负责人" prop="person">
|
|
<el-form-item label="负责人" prop="person">
|
|
<el-select style="width:100%" v-model="ruleForm.headId" filterable remote clearable placeholder="请选择"
|
|
<el-select style="width:100%" v-model="ruleForm.headId" filterable remote clearable placeholder="请选择"
|
|
- :loading="loading" v-SelectLazyLoading="loadHead" :remote-method="remoteMethod">
|
|
|
|
|
|
+ :loading="personnelList.loading" v-SelectLazyLoading="loadHead" :remote-method="remoteMethod">
|
|
<el-option v-for="item in personnelList.data" :key="item.id" :label="item.name" :value="item.id">
|
|
<el-option v-for="item in personnelList.data" :key="item.id" :label="item.name" :value="item.id">
|
|
</el-option>
|
|
</el-option>
|
|
</el-select>
|
|
</el-select>
|
|
@@ -56,29 +56,19 @@
|
|
</span>
|
|
</span>
|
|
</div>
|
|
</div>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
- <el-form-item label="应用场景" prop="scenarioList">
|
|
|
|
- <el-checkbox-group v-model="ruleForm.scenarios" @change="onChange">
|
|
|
|
- <el-checkbox v-for="item in commonData.ENTERPRISE_APPLICATION_SCENARIO" :key="item.value"
|
|
|
|
- :label="parseInt(item.value)">{{ item.label }}</el-checkbox>
|
|
|
|
|
|
+ <el-form-item label="应用场景" prop="scenarioIds">
|
|
|
|
+ <el-checkbox-group v-model="ruleForm.scenarioIds" @change="onChange">
|
|
|
|
+ <el-checkbox v-for="item in commonData" :key="item.id"
|
|
|
|
+ :label="parseInt(item.id)">{{ item.name }}</el-checkbox>
|
|
</el-checkbox-group>
|
|
</el-checkbox-group>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item label="调查类型" prop="matterIds" v-if="show == true">
|
|
<el-form-item label="调查类型" prop="matterIds" v-if="show == true">
|
|
<el-checkbox-group v-model="ruleForm.matterIds">
|
|
<el-checkbox-group v-model="ruleForm.matterIds">
|
|
- <template v-for="(item, index) in dictAssociateData">
|
|
|
|
- <el-checkbox :label="parseInt(item.dictChildValue)">
|
|
|
|
- {{ item.dictChildLabel }}
|
|
|
|
|
|
+ <template >
|
|
|
|
+ <el-checkbox v-for="(item, index) in dictAssociateData" :key="index" :label="parseInt(item.id)">
|
|
|
|
+ {{ item.name }}
|
|
</el-checkbox>
|
|
</el-checkbox>
|
|
- <div v-if="index === dictAssociateData.length - 1" class="more-data-box">
|
|
|
|
- <el-link v-if="moreData" type="primary" icon="el-icon-arrow-down" @click="handleMoreData(0)">更多
|
|
|
|
- </el-link>
|
|
|
|
- <el-link v-else type="primary" icon="el-icon-arrow-up" @click="handleMoreData(1)">收起</el-link>
|
|
|
|
- </div>
|
|
|
|
</template>
|
|
</template>
|
|
- <div v-show="isShow">
|
|
|
|
- <el-checkbox v-for="item in dictSecondAssociateData" :label="parseInt(item.dictChildValue)">
|
|
|
|
- {{ item.dictChildLabel }}
|
|
|
|
- </el-checkbox>
|
|
|
|
- </div>
|
|
|
|
</el-checkbox-group>
|
|
</el-checkbox-group>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<template>
|
|
<template>
|
|
@@ -96,7 +86,7 @@
|
|
</div>
|
|
</div>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item label="分类架构" prop="structureId" v-if="ruleForm.products && ruleForm.products.fieldId && $permission('/workspace/product')">
|
|
<el-form-item label="分类架构" prop="structureId" v-if="ruleForm.products && ruleForm.products.fieldId && $permission('/workspace/product')">
|
|
- <my-select-Tree style="width:100%" :options="structureList" @getValue="getStructureId" :props="StructureProp" :value="ruleForm.structureId"></my-select-Tree>
|
|
|
|
|
|
+ <my-select-Tree style="width:100%" :options="structureList" :props="StructureProp" v-model="ruleForm.structureId"></my-select-Tree>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
@@ -192,7 +182,7 @@ export default {
|
|
product
|
|
product
|
|
},
|
|
},
|
|
props: {
|
|
props: {
|
|
- commonData: Object
|
|
|
|
|
|
+ commonData: Array
|
|
},
|
|
},
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
@@ -216,18 +206,15 @@ export default {
|
|
},
|
|
},
|
|
data:[]
|
|
data:[]
|
|
},
|
|
},
|
|
- //负责人下拉加载
|
|
|
|
|
|
+ //确认按钮
|
|
loading: false,
|
|
loading: false,
|
|
//显示调查类型
|
|
//显示调查类型
|
|
show: false,
|
|
show: false,
|
|
- //显示更多调查类型
|
|
|
|
- isShow: false,
|
|
|
|
- //显示更多和收起按钮
|
|
|
|
- moreData: true,
|
|
|
|
|
|
+
|
|
|
|
+
|
|
//调查类型列表
|
|
//调查类型列表
|
|
dictAssociateData: [],
|
|
dictAssociateData: [],
|
|
- //其他调查类型
|
|
|
|
- dictSecondAssociateData: [],
|
|
|
|
|
|
+
|
|
//用来获取调查类型
|
|
//用来获取调查类型
|
|
test: {
|
|
test: {
|
|
value: '1',
|
|
value: '1',
|
|
@@ -260,8 +247,10 @@ export default {
|
|
current:1,
|
|
current:1,
|
|
size:10
|
|
size:10
|
|
},
|
|
},
|
|
- data:[]
|
|
|
|
|
|
+ data:[],
|
|
|
|
+ cb:null
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
|
|
};
|
|
};
|
|
},
|
|
},
|
|
@@ -284,10 +273,12 @@ export default {
|
|
}
|
|
}
|
|
this.ruleForm.crons=val
|
|
this.ruleForm.crons=val
|
|
},
|
|
},
|
|
|
|
+
|
|
//获取架构id
|
|
//获取架构id
|
|
getStructureId(val){
|
|
getStructureId(val){
|
|
|
|
|
|
},
|
|
},
|
|
|
|
+
|
|
//获取选中的值
|
|
//获取选中的值
|
|
chooseItem({row,type}){
|
|
chooseItem({row,type}){
|
|
this.ruleForm.products = {
|
|
this.ruleForm.products = {
|
|
@@ -312,6 +303,7 @@ export default {
|
|
closeProduct(){
|
|
closeProduct(){
|
|
this.productVisible = false
|
|
this.productVisible = false
|
|
},
|
|
},
|
|
|
|
+
|
|
//选择事件
|
|
//选择事件
|
|
change(value){
|
|
change(value){
|
|
if(this.ruleForm.eventList){
|
|
if(this.ruleForm.eventList){
|
|
@@ -349,6 +341,7 @@ export default {
|
|
this.showEvent = true
|
|
this.showEvent = true
|
|
})
|
|
})
|
|
},
|
|
},
|
|
|
|
+
|
|
//打开弹窗
|
|
//打开弹窗
|
|
open(form, title) {
|
|
open(form, title) {
|
|
//获取部门列表
|
|
//获取部门列表
|
|
@@ -359,12 +352,21 @@ export default {
|
|
this.title = title
|
|
this.title = title
|
|
this.drawer = true
|
|
this.drawer = true
|
|
},
|
|
},
|
|
|
|
+ //关闭抽屉
|
|
|
|
+ close() {
|
|
|
|
+ this.drawer = false
|
|
|
|
+ this.clientList.queryParams.name = ''
|
|
|
|
+ this.personnelList.queryParams.name = ''
|
|
|
|
+ },
|
|
|
|
+
|
|
//获取部门列表
|
|
//获取部门列表
|
|
getDepartment() {
|
|
getDepartment() {
|
|
this.$api.getPermissionDepartmentList().then((response) => {
|
|
this.$api.getPermissionDepartmentList().then((response) => {
|
|
this.departmentList = response.data;
|
|
this.departmentList = response.data;
|
|
});
|
|
});
|
|
},
|
|
},
|
|
|
|
+
|
|
|
|
+
|
|
//获取人员列表(懒加载)
|
|
//获取人员列表(懒加载)
|
|
loadHead(){
|
|
loadHead(){
|
|
if(this.personnelList.queryParams.current * this.personnelList.queryParams.size>=this.personnelList.queryParams.total){
|
|
if(this.personnelList.queryParams.current * this.personnelList.queryParams.size>=this.personnelList.queryParams.total){
|
|
@@ -374,40 +376,48 @@ export default {
|
|
this.getPersonnelList()
|
|
this.getPersonnelList()
|
|
},
|
|
},
|
|
getPersonnelList() {
|
|
getPersonnelList() {
|
|
|
|
+ this.personnelList.loading = true;
|
|
this.$api.getPermissionPersonnel(this.personnelList.queryParams).then((response) => {
|
|
this.$api.getPermissionPersonnel(this.personnelList.queryParams).then((response) => {
|
|
- this.personnelList.data.push(...response.data)
|
|
|
|
- this.personnelList.queryParams.total=response.pageColumn.total
|
|
|
|
|
|
+ if(response.code == 200){
|
|
|
|
+ this.personnelList.loading = false;
|
|
|
|
+ this.personnelList.data.push(...response.data)
|
|
|
|
+ this.personnelList.queryParams.total=response.pageColumn.total
|
|
|
|
+ }
|
|
})
|
|
})
|
|
},
|
|
},
|
|
- //关闭抽屉
|
|
|
|
- close() {
|
|
|
|
- this.drawer = false
|
|
|
|
|
|
+ //人员远程搜索
|
|
|
|
+ remoteMethod(query) {
|
|
|
|
+ this.personnelList.data=[]
|
|
|
|
+ this.personnelList.queryParams.current = 1
|
|
|
|
+ this.personnelList.queryParams.name = query
|
|
|
|
+ this.getPersonnelList()
|
|
},
|
|
},
|
|
- //远程搜索(建议调取接口获取)
|
|
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ //远程搜索委托方(建议调取接口获取)
|
|
async querySearch(queryString, cb) {
|
|
async querySearch(queryString, cb) {
|
|
this.clientList.queryParams.current = 1
|
|
this.clientList.queryParams.current = 1
|
|
this.clientList.queryParams.name = queryString
|
|
this.clientList.queryParams.name = queryString
|
|
this.clientList.data = []
|
|
this.clientList.data = []
|
|
|
|
+ this.clientList.cb = cb
|
|
await this.getClientList()
|
|
await this.getClientList()
|
|
- // // 调用 callback 返回建议列表的数据
|
|
|
|
- cb(this.clientList.data);
|
|
|
|
|
|
+ // 调用 callback 返回建议列表的数据
|
|
|
|
+ // cb(this.clientList.data);
|
|
},
|
|
},
|
|
loadClient(){
|
|
loadClient(){
|
|
|
|
+ if(this.clientList.queryParams.current * this.clientList.queryParams.size>=this.clientList.queryParams.total){
|
|
|
|
+ return false
|
|
|
|
+ }
|
|
this.clientList.queryParams.current += 1
|
|
this.clientList.queryParams.current += 1
|
|
- this.getClientList('load')
|
|
|
|
|
|
+ this.getClientList()
|
|
},
|
|
},
|
|
//获取委托方
|
|
//获取委托方
|
|
- async getClientList(type){
|
|
|
|
|
|
+ async getClientList(){
|
|
await this.$api.getAdminClientList(this.clientList.queryParams).then(res => {
|
|
await this.$api.getAdminClientList(this.clientList.queryParams).then(res => {
|
|
if (res.code == 200) {
|
|
if (res.code == 200) {
|
|
- res.data.records.forEach(item => {
|
|
|
|
- item.value = item.name
|
|
|
|
- });
|
|
|
|
- if(type){
|
|
|
|
- this.$refs['client'].$data.suggestions.push(...res.data.records)
|
|
|
|
- }else{
|
|
|
|
this.clientList.data.push(...res.data.records)
|
|
this.clientList.data.push(...res.data.records)
|
|
- }
|
|
|
|
|
|
+ this.clientList.queryParams.total = res.data.total
|
|
|
|
+ this.clientList.cb(this.clientList.data);
|
|
}
|
|
}
|
|
})
|
|
})
|
|
},
|
|
},
|
|
@@ -435,52 +445,30 @@ export default {
|
|
close2() {
|
|
close2() {
|
|
this.visible = false
|
|
this.visible = false
|
|
},
|
|
},
|
|
- //负责人远程搜索
|
|
|
|
- remoteMethod(query) {
|
|
|
|
-
|
|
|
|
- },
|
|
|
|
- //负责人下拉懒加载
|
|
|
|
- lazyLoading() {
|
|
|
|
|
|
|
|
- },
|
|
|
|
//调查类型选择切换
|
|
//调查类型选择切换
|
|
onChange() {
|
|
onChange() {
|
|
- if (this.ruleForm.scenarioList.length != 0) {
|
|
|
|
|
|
+ if (this.ruleForm.scenarioIds.length != 0) {
|
|
this.show = true
|
|
this.show = true
|
|
- this.test.value = this.ruleForm.scenarioList.toString()
|
|
|
|
- this.test.flag = 1
|
|
|
|
- this.$api.getDictTreeByParentDictValue(this.test).then(response => {
|
|
|
|
- this.dictAssociateData = response.data
|
|
|
|
- this.test.value = this.ruleForm.scenarioList.toString()
|
|
|
|
- this.test.flag = 0
|
|
|
|
- this.$api.getDictTreeByParentDictValue(this.test).then(response => {
|
|
|
|
- this.dictSecondAssociateData = response.data
|
|
|
|
- })
|
|
|
|
|
|
+ this.$api.getMatter(this.ruleForm.scenarioIds).then(response => {
|
|
|
|
+ this.dictAssociateData = response.data.data
|
|
})
|
|
})
|
|
} else {
|
|
} else {
|
|
this.show = false
|
|
this.show = false
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- //调查类型展开收起
|
|
|
|
- handleMoreData(type) {
|
|
|
|
- if (type === 0) {
|
|
|
|
- this.isShow = true
|
|
|
|
- this.test.value = this.ruleForm.scenarioList.toString()
|
|
|
|
- this.test.flag = 0
|
|
|
|
- this.$api.getDictTreeByParentDictValue(this.test).then(response => {
|
|
|
|
- this.dictSecondAssociateData = response.data
|
|
|
|
- })
|
|
|
|
- } else if (type === 1) {
|
|
|
|
- this.isShow = false
|
|
|
|
- }
|
|
|
|
- this.moreData = !this.moreData
|
|
|
|
- },
|
|
|
|
|
|
+
|
|
//提交数据
|
|
//提交数据
|
|
submit() {
|
|
submit() {
|
|
this.$refs.ruleForm.validate((valid) => {
|
|
this.$refs.ruleForm.validate((valid) => {
|
|
if (valid) {
|
|
if (valid) {
|
|
this.show = false
|
|
this.show = false
|
|
this.loading = true
|
|
this.loading = true
|
|
|
|
+ console.log(this.ruleForm)
|
|
|
|
+ this.ruleForm.trees = []
|
|
|
|
+ if(this.ruleForm.products){
|
|
|
|
+ this.ruleForm.trees.push(this.ruleForm.products)
|
|
|
|
+ }
|
|
if (this.ruleForm.id) {
|
|
if (this.ruleForm.id) {
|
|
this.$api.editProject(this.ruleForm).then(response => {
|
|
this.$api.editProject(this.ruleForm).then(response => {
|
|
this.loading = false
|
|
this.loading = false
|
|
@@ -493,9 +481,6 @@ export default {
|
|
} else {
|
|
} else {
|
|
this.$api.addPatentProject(this.ruleForm).then(response => {
|
|
this.$api.addPatentProject(this.ruleForm).then(response => {
|
|
this.loading = false
|
|
this.loading = false
|
|
- let permissions = this.permissions
|
|
|
|
- permissions[response.data] = 0
|
|
|
|
- this.$store.commit('SET_PERMISSIONS', permissions)
|
|
|
|
this.$message.success('新增成功')
|
|
this.$message.success('新增成功')
|
|
this.$emit('submit', 1)
|
|
this.$emit('submit', 1)
|
|
this.close()
|
|
this.close()
|