|
@@ -13,8 +13,8 @@
|
|
</el-form-item> -->
|
|
</el-form-item> -->
|
|
<el-form-item v-if="form.reportType == 3" label="标的产品" prop="signPatentNo">
|
|
<el-form-item v-if="form.reportType == 3" label="标的产品" prop="signPatentNo">
|
|
<el-select style="width:100%" v-model="form.signProjectId" placeholder="请选择产品" filterable remote
|
|
<el-select style="width:100%" v-model="form.signProjectId" placeholder="请选择产品" filterable remote
|
|
- :popper-append-to-body="false" :remote-method="remoteMethodProduct" v-SelectLazyLoading="lazyLoadingProduct"
|
|
|
|
- :loading="productList.loading">
|
|
|
|
|
|
+ :popper-append-to-body="false" :remote-method="remoteMethodProduct"
|
|
|
|
+ v-SelectLazyLoading="lazyLoadingProduct" :loading="productList.loading">
|
|
<el-option v-for="item in productList.data" :key="item.id" :label="item.name"
|
|
<el-option v-for="item in productList.data" :key="item.id" :label="item.name"
|
|
:value="item.id"></el-option>
|
|
:value="item.id"></el-option>
|
|
</el-select>
|
|
</el-select>
|
|
@@ -22,8 +22,8 @@
|
|
placeholder="请输入标的产品" @change="getPatentNo"></el-input> -->
|
|
placeholder="请输入标的产品" @change="getPatentNo"></el-input> -->
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item v-else label="标的专利" prop="signPatentNo">
|
|
<el-form-item v-else label="标的专利" prop="signPatentNo">
|
|
- <el-input v-model="form.signPatentNo" autocomplete="off"
|
|
|
|
- placeholder="请输入标的专利" @change="getPatentNo"></el-input>
|
|
|
|
|
|
+ <el-input v-model="form.signPatentNo" autocomplete="off" placeholder="请输入标的专利"
|
|
|
|
+ @change="getPatentNo"></el-input>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
<el-col :span="12">
|
|
<el-col :span="12">
|
|
@@ -41,8 +41,10 @@
|
|
<div>
|
|
<div>
|
|
<el-form-item label="核心结论">
|
|
<el-form-item label="核心结论">
|
|
<el-checkbox-group v-model="form.cronIds">
|
|
<el-checkbox-group v-model="form.cronIds">
|
|
- <el-checkbox v-for="item in conclusion" :key="item.dictChildValue" :label="item.dictChildValue">{{
|
|
|
|
- item.dictChildLabel }}</el-checkbox>
|
|
|
|
|
|
+ <el-checkbox v-for="item in conclusion" :key="item.value" :label="item.value">{{
|
|
|
|
+ item.label }}</el-checkbox>
|
|
|
|
+ <!-- <el-checkbox v-for="item in conclusion" :key="item.dictChildValue" :label="item.dictChildValue">{{
|
|
|
|
+ item.dictChildLabel }}</el-checkbox> -->
|
|
</el-checkbox-group>
|
|
</el-checkbox-group>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item label="结论论述">
|
|
<el-form-item label="结论论述">
|
|
@@ -54,7 +56,7 @@
|
|
<span>
|
|
<span>
|
|
<el-popover ref="popover" placement="bottom" @hide="hidePopover" @show="showPopover" trigger="click">
|
|
<el-popover ref="popover" placement="bottom" @hide="hidePopover" @show="showPopover" trigger="click">
|
|
<div>
|
|
<div>
|
|
- <addMatter :type="matterType" :sign="matterSign" @value="getMatter"></addMatter>
|
|
|
|
|
|
+ <addMatter :type="matterType" :sign="matterSign" @value="getMatter"></addMatter>
|
|
</div>
|
|
</div>
|
|
<el-button slot="reference">添加后续事项</el-button>
|
|
<el-button slot="reference">添加后续事项</el-button>
|
|
</el-popover>
|
|
</el-popover>
|
|
@@ -132,7 +134,36 @@
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
</el-row>
|
|
</el-row>
|
|
- <template v-if="form.type == 7">
|
|
|
|
|
|
+ <el-row>
|
|
|
|
+ <el-col :span="24">
|
|
|
|
+ <el-form-item label="事件:">
|
|
|
|
+ <mySelectButton size='large' style="width:100%" @click="addEvent">
|
|
|
|
+ <div style="width:100%">
|
|
|
|
+ <el-select style="width:100%" v-model="form.eventId" @change="changeEvent" filterable remote clearable
|
|
|
|
+ placeholder="请选择" :loading="eventList.loading" v-SelectLazyLoading="loadEvent"
|
|
|
|
+ :remote-method="remoteEvent">
|
|
|
|
+ <el-option v-for="item in eventList.data" :key="item.id" :label="item.name" :value="item.id">
|
|
|
|
+ </el-option>
|
|
|
|
+ </el-select>
|
|
|
|
+ </div>
|
|
|
|
+ </mySelectButton>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-col>
|
|
|
|
+ </el-row>
|
|
|
|
+ <el-row v-if="show == true">
|
|
|
|
+ <el-col :span="24">
|
|
|
|
+ <el-form-item label="调查类型:" prop="matterIds">
|
|
|
|
+ <el-checkbox-group v-model="form.matterIds">
|
|
|
|
+ <template>
|
|
|
|
+ <el-checkbox v-for="item in dictAssociates" :key="item.id" :label="parseInt(item.id)">
|
|
|
|
+ {{ item.name }}
|
|
|
|
+ </el-checkbox>
|
|
|
|
+ </template>
|
|
|
|
+ </el-checkbox-group>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-col>
|
|
|
|
+ </el-row>
|
|
|
|
+ <template v-if="form.reportType == 7">
|
|
<div>
|
|
<div>
|
|
<el-row>
|
|
<el-row>
|
|
<el-col :span="12">
|
|
<el-col :span="12">
|
|
@@ -161,7 +192,7 @@
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
<el-form-item :label="(!form.id && form.status == 3) ? '上传报告文档' : '上传附件'">
|
|
<el-form-item :label="(!form.id && form.status == 3) ? '上传报告文档' : '上传附件'">
|
|
- <myUpload :file-list="handleConcat(form.systemFileList)" @on-change="onChange" @on-remove="onRemove"
|
|
|
|
|
|
+ <myUpload :file-list="form.systemFileList" @on-change="onchangeFile" @on-remove="onRemove"
|
|
@on-preview="onPreview" style="height: 180px;" :autoUpload="true"></myUpload>
|
|
@on-preview="onPreview" style="height: 180px;" :autoUpload="true"></myUpload>
|
|
</el-form-item>
|
|
</el-form-item>
|
|
<el-form-item label="备注" prop="description">
|
|
<el-form-item label="备注" prop="description">
|
|
@@ -170,7 +201,7 @@
|
|
</el-form>
|
|
</el-form>
|
|
<div slot="footer" v-if="$reportPermission(form.id, [0, 1])">
|
|
<div slot="footer" v-if="$reportPermission(form.id, [0, 1])">
|
|
<el-button @click="handleClose(false)">取 消</el-button>
|
|
<el-button @click="handleClose(false)">取 消</el-button>
|
|
- <el-button type="primary" @click="ifNext" v-if="form.type == 7 && !form.id">下一步</el-button>
|
|
|
|
|
|
+ <el-button type="primary" @click="ifNext" v-if="form.reportType == 7 && !form.id">下一步</el-button>
|
|
<el-button type="primary" @click="submit" v-else>确 定</el-button>
|
|
<el-button type="primary" @click="submit" v-else>确 定</el-button>
|
|
</div>
|
|
</div>
|
|
</el-dialog>
|
|
</el-dialog>
|
|
@@ -225,8 +256,7 @@ export default {
|
|
data() {
|
|
data() {
|
|
const isExist = (rule, value, callback) => {
|
|
const isExist = (rule, value, callback) => {
|
|
if (!this.form.signPatentNo) {//没有专利号进入报错提示
|
|
if (!this.form.signPatentNo) {//没有专利号进入报错提示
|
|
- this.show = 0
|
|
|
|
- if ([3].includes(Number(this.form.type))) {
|
|
|
|
|
|
+ if ([3].includes(Number(this.form.reportType))) {
|
|
var text = '请输入标的产品'
|
|
var text = '请输入标的产品'
|
|
} else {
|
|
} else {
|
|
var text = '请输入标的专利号'
|
|
var text = '请输入标的专利号'
|
|
@@ -258,7 +288,11 @@ export default {
|
|
//控制弹窗是否打开
|
|
//控制弹窗是否打开
|
|
showDialog: false,
|
|
showDialog: false,
|
|
//表单数据
|
|
//表单数据
|
|
- form: {},
|
|
|
|
|
|
+ form: {
|
|
|
|
+ matterIds: [],
|
|
|
|
+ systemFileList: [],
|
|
|
|
+ fileGuids: [],
|
|
|
|
+ },
|
|
//表单规则
|
|
//表单规则
|
|
rules: {
|
|
rules: {
|
|
name: [{ required: true, message: '请输入报告名称', trigger: 'blur' },],
|
|
name: [{ required: true, message: '请输入报告名称', trigger: 'blur' },],
|
|
@@ -280,7 +314,7 @@ export default {
|
|
copyList: [],
|
|
copyList: [],
|
|
//人员列表
|
|
//人员列表
|
|
// personnelList: [],
|
|
// personnelList: [],
|
|
- //客户列表
|
|
|
|
|
|
+ //客户/委托方列表
|
|
clientList: [],
|
|
clientList: [],
|
|
//上传文件列表
|
|
//上传文件列表
|
|
files: [],
|
|
files: [],
|
|
@@ -312,25 +346,38 @@ export default {
|
|
loading: false,
|
|
loading: false,
|
|
//是否懒加载
|
|
//是否懒加载
|
|
isLazy: true,
|
|
isLazy: true,
|
|
|
|
+ data:[],
|
|
},
|
|
},
|
|
//人员列表懒加载
|
|
//人员列表懒加载
|
|
personnelList: {
|
|
personnelList: {
|
|
- queryParams:{
|
|
|
|
- current:1,
|
|
|
|
- size:10
|
|
|
|
|
|
+ queryParams: {
|
|
|
|
+ current: 1,
|
|
|
|
+ size: 10
|
|
},
|
|
},
|
|
- data:[]
|
|
|
|
|
|
+ data: []
|
|
},
|
|
},
|
|
//产品列表懒加载
|
|
//产品列表懒加载
|
|
productList: {
|
|
productList: {
|
|
- queryParams:{
|
|
|
|
- current:1,
|
|
|
|
- size:10
|
|
|
|
|
|
+ queryParams: {
|
|
|
|
+ current: 1,
|
|
|
|
+ size: 10
|
|
},
|
|
},
|
|
- isLazy:true,
|
|
|
|
- data:[]
|
|
|
|
|
|
+ isLazy: true,
|
|
|
|
+ data: []
|
|
},
|
|
},
|
|
matterType: null,
|
|
matterType: null,
|
|
|
|
+ //事件列表
|
|
|
|
+ eventList: {
|
|
|
|
+ queryParams: {
|
|
|
|
+ current: 1,
|
|
|
|
+ size: 10
|
|
|
|
+ },
|
|
|
|
+ data: []
|
|
|
|
+ },
|
|
|
|
+ // 控制调查类型是否显示
|
|
|
|
+ show: false,
|
|
|
|
+ //调查类型列表
|
|
|
|
+ dictAssociates: [],
|
|
/*审核弹窗所需变量start*/
|
|
/*审核弹窗所需变量start*/
|
|
showTask: false,
|
|
showTask: false,
|
|
// 任务表单
|
|
// 任务表单
|
|
@@ -375,10 +422,84 @@ export default {
|
|
this.getDepartment()
|
|
this.getDepartment()
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ //打开事件弹窗
|
|
|
|
+ addEvent() {
|
|
|
|
+
|
|
|
|
+ },
|
|
|
|
+ //懒加载事件
|
|
|
|
+ loadEvent() {
|
|
|
|
+ if (this.eventList.queryParams.current * this.eventList.queryParams.size >= this.eventList.queryParams.total) {
|
|
|
|
+ return false
|
|
|
|
+ }
|
|
|
|
+ this.eventList.queryParams.current += 1
|
|
|
|
+ this.getEventList()
|
|
|
|
+ },
|
|
|
|
+ //远程搜索
|
|
|
|
+ remoteEvent(query) {
|
|
|
|
+ this.eventList.data = []
|
|
|
|
+ this.eventList.queryParams.current = 1
|
|
|
|
+ this.eventList.name = query
|
|
|
|
+ this.getEventList()
|
|
|
|
+ },
|
|
|
|
+ //获取事件列表
|
|
|
|
+ async getEventList(type) {
|
|
|
|
+ this.eventList.loading = true;
|
|
|
|
+ let params = {
|
|
|
|
+ ...this.eventList.queryParams,//分页信息
|
|
|
|
+ searchQuery: this.eventList.name ? `name=${this.eventList.name}` : '',//检索条件
|
|
|
|
+ orderDTOList: [{ orderBy: "createTime", orderType: 1 },]//排序
|
|
|
|
+ }
|
|
|
|
+ await this.$api.queryEvent(params).then(response => {
|
|
|
|
+ if (response.code == 200) {
|
|
|
|
+ this.eventList.loading = false;
|
|
|
|
+ if (!type) {
|
|
|
|
+ if (this.form.eventId) {
|
|
|
|
+ var index = response.data.data.findIndex(item => {
|
|
|
|
+ return item.id == this.form.eventId
|
|
|
|
+ })
|
|
|
|
+ if (index != -1) {
|
|
|
|
+ response.data.data.splice(index, 1)
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ this.eventList.queryParams.total = response.data.total
|
|
|
|
+ }
|
|
|
|
+ this.eventList.data.push(...response.data.data)
|
|
|
|
+ // this.eventList.queryParams.total = response.data.total
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ },
|
|
|
|
+ //切换事件
|
|
|
|
+ async changeEvent(val) {
|
|
|
|
+ if (!val) {
|
|
|
|
+ this.form.scenarioIds = []
|
|
|
|
+ this.show = false
|
|
|
|
+ this.form.matterIds = []
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ var obj = this.eventList.data.find(item => {
|
|
|
|
+ return item.id == val
|
|
|
|
+ })
|
|
|
|
+ if (obj) {
|
|
|
|
+ this.form.scenarioIds = [obj.scenarioId]
|
|
|
|
+ this.show = true
|
|
|
|
+ await this.onChange()
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ //调查类型选择切换
|
|
|
|
+ async onChange() {
|
|
|
|
+ if (this.form.scenarioIds.length != 0) {
|
|
|
|
+ await this.$api.getMatter(this.form.scenarioIds).then(response => {
|
|
|
|
+ this.show = true
|
|
|
|
+ this.dictAssociates = response.data.data
|
|
|
|
+ })
|
|
|
|
+ } else {
|
|
|
|
+ this.show = false
|
|
|
|
+ }
|
|
|
|
+ },
|
|
//打开弹窗
|
|
//打开弹窗
|
|
- open(form) {
|
|
|
|
- this.form = JSON.parse(JSON.stringify(form))
|
|
|
|
|
|
+ async open(form) {
|
|
var a = ''
|
|
var a = ''
|
|
|
|
+ this.form = JSON.parse(JSON.stringify(form))
|
|
if (this.form.id) {
|
|
if (this.form.id) {
|
|
if (this.$reportPermission(this.form.id, [0, 1])) {
|
|
if (this.$reportPermission(this.form.id, [0, 1])) {
|
|
a = '编辑'
|
|
a = '编辑'
|
|
@@ -386,82 +507,127 @@ export default {
|
|
a = '查看'
|
|
a = '查看'
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
|
|
+ this.$set(this.form,'matterIds',[])
|
|
|
|
+ this.$set(this.form,'systemFileList',[])
|
|
|
|
+ this.$set(this.form,'fileGuids',[])
|
|
a = '创建'
|
|
a = '创建'
|
|
}
|
|
}
|
|
- console.log(this.form);
|
|
|
|
var reportType = this.dictMessage.REPORT_TYPE.filter(item => { return item.dictChildValue == this.form.reportType })[0].dictChildLabel
|
|
var reportType = this.dictMessage.REPORT_TYPE.filter(item => { return item.dictChildValue == this.form.reportType })[0].dictChildLabel
|
|
this.title = a + reportType + '报告'
|
|
this.title = a + reportType + '报告'
|
|
|
|
+ // 事件
|
|
|
|
+ if (this.form.eventIds && this.form.eventIds.length > 0) {
|
|
|
|
+ this.form.eventId = this.form.eventIds[0]
|
|
|
|
+ this.onChange()
|
|
|
|
+ this.eventList.queryParams.id = this.form.eventId[0]
|
|
|
|
+ await this.getEventList(1)
|
|
|
|
+ this.eventList.queryParams.id = null
|
|
|
|
+ this.show = true
|
|
|
|
+ } else {
|
|
|
|
+ this.show = false
|
|
|
|
+ }
|
|
|
|
+ // 文件
|
|
|
|
+ if (this.form.systemFileList && this.form.systemFileList.length > 0) {
|
|
|
|
+ this.$set(this.form, 'fileGuids', [])
|
|
|
|
+ this.form.systemFileList.forEach(item => {
|
|
|
|
+ this.form.fileGuids.push(item.guid)
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ // 负责人
|
|
|
|
+ if (this.form.headId) {
|
|
|
|
+ this.personnelList.queryParams.id = this.form.headId
|
|
|
|
+ await this.getPermissionPersonnel(1)
|
|
|
|
+ this.personnelList.queryParams.id = null
|
|
|
|
+ }
|
|
|
|
+ // 委托方
|
|
|
|
+ if (this.form.entrustId) {
|
|
|
|
+ this.personnelList.queryParams.id = this.form.headId
|
|
|
|
+ await this.getPermissionPersonnel(1)
|
|
|
|
+ this.personnelList.queryParams.id = null
|
|
|
|
+ }
|
|
|
|
+ this.getPermissionPersonnel()
|
|
|
|
+ this.getEventList()
|
|
this.showDialog = true
|
|
this.showDialog = true
|
|
},
|
|
},
|
|
// 产品列表远程搜索
|
|
// 产品列表远程搜索
|
|
- remoteMethodProduct(query) {
|
|
|
|
|
|
+ remoteMethodProduct(query) {
|
|
this.productList.isLazy = true
|
|
this.productList.isLazy = true
|
|
- if (query !== '') {
|
|
|
|
- this.productList.loading = true;
|
|
|
|
- this.productList.queryParams = {
|
|
|
|
- current:1,
|
|
|
|
- size:10,
|
|
|
|
- searchQuery:`name=${query}`
|
|
|
|
- }
|
|
|
|
- this.$api.queryProductCategory(this.productList.queryParams).then(response=>{
|
|
|
|
- if(response.code == 200){
|
|
|
|
- this.productList.loading = false;
|
|
|
|
- this.productList.data = response.data.data
|
|
|
|
- }
|
|
|
|
- }).catch(error=>{
|
|
|
|
- this.productList.loading = false;
|
|
|
|
- })
|
|
|
|
- } else {
|
|
|
|
- this.productList.queryParams.name = null
|
|
|
|
- this.productList = [];
|
|
|
|
- this.getAllProduct()
|
|
|
|
|
|
+ if (query !== '') {
|
|
|
|
+ this.productList.loading = true;
|
|
|
|
+ this.productList.queryParams = {
|
|
|
|
+ current: 1,
|
|
|
|
+ size: 10,
|
|
|
|
+ searchQuery: `name=${query}`
|
|
}
|
|
}
|
|
|
|
+ this.$api.queryProductCategory(this.productList.queryParams).then(response => {
|
|
|
|
+ if (response.code == 200) {
|
|
|
|
+ this.productList.loading = false;
|
|
|
|
+ this.productList.data = response.data.data
|
|
|
|
+ }
|
|
|
|
+ }).catch(error => {
|
|
|
|
+ this.productList.loading = false;
|
|
|
|
+ })
|
|
|
|
+ } else {
|
|
|
|
+ this.productList.queryParams.name = null
|
|
|
|
+ this.productList = [];
|
|
|
|
+ this.getAllProduct()
|
|
|
|
+ }
|
|
},
|
|
},
|
|
// 产品列表懒加载
|
|
// 产品列表懒加载
|
|
- lazyLoadingProduct() {
|
|
|
|
- if(!this.productList.isLazy){
|
|
|
|
|
|
+ lazyLoadingProduct() {
|
|
|
|
+ if (!this.productList.isLazy) {
|
|
return false
|
|
return false
|
|
}
|
|
}
|
|
this.productList.queryParams.current++;
|
|
this.productList.queryParams.current++;
|
|
this.getAllProduct();
|
|
this.getAllProduct();
|
|
},
|
|
},
|
|
getAllProduct() {
|
|
getAllProduct() {
|
|
- if(!this.productList.isLazy){
|
|
|
|
|
|
+ if (!this.productList.isLazy) {
|
|
return false
|
|
return false
|
|
}
|
|
}
|
|
- this.$api.queryProductCategory(this.productList.queryParams).then(response=>{
|
|
|
|
- if(response.code == 200){
|
|
|
|
- if(response.data.data && response.data.data.length == 0){
|
|
|
|
|
|
+ this.$api.queryProductCategory(this.productList.queryParams).then(response => {
|
|
|
|
+ if (response.code == 200) {
|
|
|
|
+ if (response.data.data && response.data.data.length == 0) {
|
|
this.productList.isLazy = false
|
|
this.productList.isLazy = false
|
|
}
|
|
}
|
|
this.productList.data = [...this.productList.data, ...response.data.data];
|
|
this.productList.data = [...this.productList.data, ...response.data.data];
|
|
}
|
|
}
|
|
- }).catch(error=>{
|
|
|
|
|
|
+ }).catch(error => {
|
|
})
|
|
})
|
|
},
|
|
},
|
|
// 人员列表远程搜索
|
|
// 人员列表远程搜索
|
|
remoteMethodPerson(query) {
|
|
remoteMethodPerson(query) {
|
|
- this.personnelList.data=[]
|
|
|
|
- this.personnelList.queryParams.current = 1
|
|
|
|
- this.personnelList.queryParams.name = query
|
|
|
|
- this.getPermissionPersonnel()
|
|
|
|
|
|
+ this.personnelList.data = []
|
|
|
|
+ this.personnelList.queryParams.current = 1
|
|
|
|
+ this.personnelList.queryParams.name = query
|
|
|
|
+ this.getPermissionPersonnel()
|
|
},
|
|
},
|
|
// 获取所有人员列表懒加载
|
|
// 获取所有人员列表懒加载
|
|
lazyLoadingPerson() {
|
|
lazyLoadingPerson() {
|
|
- 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) {
|
|
return false
|
|
return false
|
|
}
|
|
}
|
|
this.personnelList.queryParams.current += 1
|
|
this.personnelList.queryParams.current += 1
|
|
this.getPermissionPersonnel()
|
|
this.getPermissionPersonnel()
|
|
},
|
|
},
|
|
//获取所有人员列表(修改不要一次性获取,可以使用懒加载加远程搜索 )
|
|
//获取所有人员列表(修改不要一次性获取,可以使用懒加载加远程搜索 )
|
|
- getPermissionPersonnel() {
|
|
|
|
|
|
+ async getPermissionPersonnel(type) {
|
|
this.personnelList.loading = true;
|
|
this.personnelList.loading = true;
|
|
- this.$api.getPermissionPersonnel(this.personnelList.queryParams).then((response) => {
|
|
|
|
- if(response.code == 200){
|
|
|
|
|
|
+ await this.$api.getPermissionPersonnel(this.personnelList.queryParams).then((response) => {
|
|
|
|
+ if (response.code == 200) {
|
|
this.personnelList.loading = false;
|
|
this.personnelList.loading = false;
|
|
|
|
+ if (!type) {
|
|
|
|
+ if (this.form.headId) {
|
|
|
|
+ var index = response.data.findIndex(item => {
|
|
|
|
+ return item.id == this.form.headId
|
|
|
|
+ })
|
|
|
|
+ if (index != -1) {
|
|
|
|
+ response.data.splice(index, 1)
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ this.personnelList.queryParams.total = response.pageColumn.total
|
|
|
|
+ }
|
|
this.personnelList.data.push(...response.data)
|
|
this.personnelList.data.push(...response.data)
|
|
- this.personnelList.queryParams.total=response.pageColumn.total
|
|
|
|
|
|
+ // this.personnelList.queryParams.total = response.pageColumn.total
|
|
}
|
|
}
|
|
})
|
|
})
|
|
},
|
|
},
|
|
@@ -470,7 +636,7 @@ export default {
|
|
if (query != '') {
|
|
if (query != '') {
|
|
this.clientObj.loading = true;
|
|
this.clientObj.loading = true;
|
|
this.clientObj.queryParams.current = 1
|
|
this.clientObj.queryParams.current = 1
|
|
- this.clientObj.queryParams.name=query
|
|
|
|
|
|
+ this.clientObj.queryParams.name = query
|
|
this.$api.getAllClientList(this.clientObj.queryParams).then(response => {
|
|
this.$api.getAllClientList(this.clientObj.queryParams).then(response => {
|
|
if (response.code == 200) {
|
|
if (response.code == 200) {
|
|
this.clientObj.loading = false;
|
|
this.clientObj.loading = false;
|
|
@@ -504,21 +670,32 @@ export default {
|
|
})
|
|
})
|
|
},
|
|
},
|
|
//获取所有部门列表
|
|
//获取所有部门列表
|
|
- //获取部门列表
|
|
|
|
|
|
+ //获取部门列表
|
|
getDepartment() {
|
|
getDepartment() {
|
|
this.$api.getPermissionDepartmentList().then((response) => {
|
|
this.$api.getPermissionDepartmentList().then((response) => {
|
|
this.departmentList = response.data;
|
|
this.departmentList = response.data;
|
|
});
|
|
});
|
|
},
|
|
},
|
|
//切换是否完成状态
|
|
//切换是否完成状态
|
|
- changeStatus(val) {
|
|
|
|
|
|
+ async changeStatus(val) {
|
|
if (val == 3) {
|
|
if (val == 3) {
|
|
this.rules.headId[0].required = false
|
|
this.rules.headId[0].required = false
|
|
this.rules.entrustId[0].required = false
|
|
this.rules.entrustId[0].required = false
|
|
if (!this.form.id) {
|
|
if (!this.form.id) {
|
|
this.$set(this.form, 'cronIds', [])
|
|
this.$set(this.form, 'cronIds', [])
|
|
}
|
|
}
|
|
- this.conclusion = this.dictMessage[this.reportAsDicItem[this.form.type]]
|
|
|
|
|
|
+ let params = {
|
|
|
|
+ reportType:this.form.reportType
|
|
|
|
+ }
|
|
|
|
+ await this.$api.queryCrons(params).then(res => {
|
|
|
|
+ if (res.code == 200) {
|
|
|
|
+ this.conclusion=res.data.data
|
|
|
|
+ }
|
|
|
|
+ }).catch(error => {
|
|
|
|
+ this.conclusion = []
|
|
|
|
+ this.$message.error(error.message)
|
|
|
|
+ })
|
|
|
|
+ // this.conclusion = this.dictMessage[this.reportAsDicItem[this.form.reportType]]
|
|
this.matterType = 2
|
|
this.matterType = 2
|
|
} else {
|
|
} else {
|
|
this.rules.headId[0].required = true
|
|
this.rules.headId[0].required = true
|
|
@@ -559,39 +736,43 @@ export default {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
},
|
|
- // 合并已上传的文件和未上传的文件
|
|
|
|
- handleConcat(arr) {
|
|
|
|
- let files = (arr || []).concat(this.files)
|
|
|
|
- return files
|
|
|
|
- },
|
|
|
|
- //切换上传的文件
|
|
|
|
- onChange(file, fileList) {
|
|
|
|
- if (this.files && this.files.length > 0) {
|
|
|
|
- let a = this.files.findIndex(item => {
|
|
|
|
- return item.size == file.size
|
|
|
|
|
|
+ // 上传的文件监听
|
|
|
|
+ onchangeFile(file, fileList) {
|
|
|
|
+ if (file.guid) {
|
|
|
|
+ let index = this.form.systemFileList.findIndex(item => {
|
|
|
|
+ return item.uid == file.uid
|
|
})
|
|
})
|
|
- if (a != -1) {
|
|
|
|
- this.$message.error(`${file.raw.name}文件重复`)
|
|
|
|
- this.files.splice(a, 1, file.raw)
|
|
|
|
- } else {
|
|
|
|
- this.files.push(file.raw)
|
|
|
|
|
|
+ if (index != -1) {
|
|
|
|
+ this.form.systemFileList.splice(index, 1, file)
|
|
|
|
+ this.form.fileGuids.push(file.guid)
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
- this.files.push(file.raw)
|
|
|
|
|
|
+ this.form.systemFileList.push(file.raw)
|
|
}
|
|
}
|
|
|
|
+
|
|
},
|
|
},
|
|
- //删除未提交的附件
|
|
|
|
|
|
+ // 删除上传的文件
|
|
onRemove(file, fileList) {
|
|
onRemove(file, fileList) {
|
|
if (file.guid) {
|
|
if (file.guid) {
|
|
- let a = this.form.systemFileList.findIndex(item => {
|
|
|
|
|
|
+ let index = this.form.systemFileList.findIndex(item => {
|
|
return item.guid == file.guid
|
|
return item.guid == file.guid
|
|
})
|
|
})
|
|
- this.form.systemFileList.splice(a, 1)
|
|
|
|
|
|
+ if (index!=-1) {
|
|
|
|
+ this.form.systemFileList.splice(index, 1)
|
|
|
|
+ }
|
|
|
|
+ let index2 = this.form.fileGuids.findIndex(item => {
|
|
|
|
+ return item == file.guid
|
|
|
|
+ })
|
|
|
|
+ if (index2 != -1) {
|
|
|
|
+ this.form.fileGuids.splice(index2, 1)
|
|
|
|
+ }
|
|
} else {
|
|
} else {
|
|
- let a = this.files.findIndex(item => {
|
|
|
|
- return item.size == file.size
|
|
|
|
|
|
+ let index3 = this.form.systemFileList.findIndex(item => {
|
|
|
|
+ return item.uid == file.uid
|
|
})
|
|
})
|
|
- this.files.splice(a, 1)
|
|
|
|
|
|
+ if (index3 != -1) {
|
|
|
|
+ this.form.fileGuids.splice(index3, 1)
|
|
|
|
+ }
|
|
}
|
|
}
|
|
},
|
|
},
|
|
//上传附件时点击查看附件内容
|
|
//上传附件时点击查看附件内容
|
|
@@ -627,7 +808,23 @@ export default {
|
|
submit() {
|
|
submit() {
|
|
this.$refs.reportForm.validate((valid) => {
|
|
this.$refs.reportForm.validate((valid) => {
|
|
if (valid) {
|
|
if (valid) {
|
|
- this.form.type=2//项目类型(1专题库 2报告 3专利挖掘项目)
|
|
|
|
|
|
+ this.form.type = 2//项目类型(1专题库 2报告 3专利挖掘项目)
|
|
|
|
+ if (this.form.scenarioIds && this.form.scenarioIds.length>0) {
|
|
|
|
+ var scenarioIds = JSON.parse(JSON.stringify(this.form.scenarioIds))
|
|
|
|
+ }
|
|
|
|
+ if (this.form.eventId) {
|
|
|
|
+ this.form.events = []
|
|
|
|
+ this.form.scenarioIds = []
|
|
|
|
+ this.form.matterIds.forEach(item => {
|
|
|
|
+ this.form.events.push(
|
|
|
|
+ {
|
|
|
|
+ matterId: item,
|
|
|
|
+ scenarioId: scenarioIds[0],
|
|
|
|
+ eventId: this.form.eventId
|
|
|
|
+ }
|
|
|
|
+ )
|
|
|
|
+ })
|
|
|
|
+ }
|
|
let formData = this.form
|
|
let formData = this.form
|
|
if (!this.form.id) {//新增报告
|
|
if (!this.form.id) {//新增报告
|
|
this.$confirm('是否需要进行审核?', '提示', {
|
|
this.$confirm('是否需要进行审核?', '提示', {
|
|
@@ -640,11 +837,11 @@ export default {
|
|
this.$set(this.taskForm, 'taskName', this.form.name + '审核')
|
|
this.$set(this.taskForm, 'taskName', this.form.name + '审核')
|
|
}).catch(action => {//不审核直接创建报告
|
|
}).catch(action => {//不审核直接创建报告
|
|
// 调用创建报告公用,接口
|
|
// 调用创建报告公用,接口
|
|
- this.addReport(formData)
|
|
|
|
|
|
+ this.addReport(formData)
|
|
});
|
|
});
|
|
|
|
|
|
} else {//编辑报告
|
|
} else {//编辑报告
|
|
- this.$api.UpdateReport(formData).then(response => {
|
|
|
|
|
|
+ this.$api.updateReportProject(formData).then(response => {
|
|
if (response.code == 200) {
|
|
if (response.code == 200) {
|
|
this.files = []
|
|
this.files = []
|
|
this.$message.success('报告更新成功')
|
|
this.$message.success('报告更新成功')
|
|
@@ -658,14 +855,18 @@ export default {
|
|
},
|
|
},
|
|
//关闭弹窗
|
|
//关闭弹窗
|
|
handleClose(val) {
|
|
handleClose(val) {
|
|
- if (this.form.type == 7 && val) {
|
|
|
|
|
|
+ if (this.form.reportType == 7 && val) {
|
|
this.showEvidenceAndRequest = true
|
|
this.showEvidenceAndRequest = true
|
|
this.$s.setSession('params', {})
|
|
this.$s.setSession('params', {})
|
|
this.reportId = val
|
|
this.reportId = val
|
|
}
|
|
}
|
|
this.personnelList.queryParams.name = ''
|
|
this.personnelList.queryParams.name = ''
|
|
this.$refs.reportForm.resetFields()
|
|
this.$refs.reportForm.resetFields()
|
|
- this.form = {}
|
|
|
|
|
|
+ this.form = {
|
|
|
|
+ matterIds: [],
|
|
|
|
+ systemFileList: [],
|
|
|
|
+ fileGuids: [],
|
|
|
|
+ }
|
|
this.showDialog = false
|
|
this.showDialog = false
|
|
},
|
|
},
|
|
// 创建报告创建接口公用
|
|
// 创建报告创建接口公用
|
|
@@ -747,6 +948,17 @@ export default {
|
|
}
|
|
}
|
|
})
|
|
})
|
|
},
|
|
},
|
|
|
|
+
|
|
|
|
+ },
|
|
|
|
+ // 组件销毁函数
|
|
|
|
+ destroyed() {
|
|
|
|
+ // 清空事件相关
|
|
|
|
+ this.form.eventIds = []
|
|
|
|
+ this.eventList.queryParams.current=1
|
|
|
|
+ this.eventList.data=[]
|
|
|
|
+ // 清空负责人相关
|
|
|
|
+ this.personnelList.data = []
|
|
|
|
+ this.personnelList.queryParams.current=1
|
|
},
|
|
},
|
|
};
|
|
};
|
|
</script>
|
|
</script>
|