合并冲突

This commit is contained in:
guoyue 2022-10-17 14:16:00 +08:00
commit ea2afd08c9
8 changed files with 762 additions and 286 deletions

View File

@ -116,7 +116,6 @@ import CommonQuestion from '../components/common-question.vue'
import InfrastructureModal from './components/infrastructure-modal.vue' import InfrastructureModal from './components/infrastructure-modal.vue'
import Cookies from 'js-cookie' import Cookies from 'js-cookie'
import upload from '@/views/modules/components/upload' import upload from '@/views/modules/components/upload'
const btnArray = ['基本信息', '场景痛点', '解决方案', '组合能力', '更多能力', '使用步骤'] const btnArray = ['基本信息', '场景痛点', '解决方案', '组合能力', '更多能力', '使用步骤']
// \ // \
export const getJson = (type) => { export const getJson = (type) => {
@ -163,7 +162,6 @@ export const modalTypeText = {
} }
export const getFuseResourceList = (abilityListObj) => { export const getFuseResourceList = (abilityListObj) => {
console.log('abilityListObjabilityListObj',abilityListObj);
const arr = [] const arr = []
let length = 0 let length = 0
for (const key in abilityListObj) { for (const key in abilityListObj) {
@ -176,7 +174,7 @@ export const getFuseResourceList = (abilityListObj) => {
resourceId: v.id, resourceId: v.id,
type: key, type: key,
sequence: index, sequence: index,
resourceName:v.resourceName, resourceName:v.resourceName|| v.name ,
deptName:v.deptName, deptName:v.deptName,
}) })
}) })
@ -331,9 +329,10 @@ export default {
}, },
// //
updateDataForm (data) { updateDataForm (data) {
console.log('datadatadata',data); //console.log('datadatadata',data);
if (Object.keys(this.getListParams).includes(data.title)) { if (Object.keys(this.getListParams).includes(data.title)) {
this.abilityListObj[data.title] = data.list this.abilityListObj[data.title] = data.list
console.log(' this.abilityListObj[data.title]3333', this.abilityListObj[data.title]);
} else { } else {
// 使 // 使
this.operateFuseAttrList(data.title, data) this.operateFuseAttrList(data.title, data)
@ -363,6 +362,7 @@ export default {
// //
dataFormSubmitHandle: debounce( dataFormSubmitHandle: debounce(
function () { function () {
console.log('this.dataForm------表单提交------>111111', this.dataForm)
this.$refs.dataForm.validate((valid) => { this.$refs.dataForm.validate((valid) => {
if (!valid) { if (!valid) {
this.$message.error('请检查表单是否填写完整') this.$message.error('请检查表单是否填写完整')

View File

@ -16,19 +16,20 @@
</el-transfer> </el-transfer>
</div> </div>
<div v-else-if="type==='数据资源'" class="dataTransfer"> <div v-else-if="type==='数据资源'" class="dataTransfer">
<el-transfer v-model="selectedArray" filterable :filter-method="filterMethod" filter-placeholder="请输入名称" <!-- <el-transfer v-model="selectedArray" filter-placeholder="请输入名称"
:titles="nameArray" :props="{ :titles="nameArray" :props="{
key: 'id', key: 'id',
label: 'name', label: 'name',
}" :data="transferData"> }" :data="transferData">
</el-transfer> </el-transfer>
<!-- <el-input <el-input
v-model="searchValue" v-model="searchValue"
placeholder="请输入名称" placeholder="请输入名称"
></el-input> ></el-input>
<el-button @click="rest" class="restClick">重置</el-button> --> <el-button @click="rest" class="restClick">重置</el-button> -->
<data-resource-tranfer @updateData="updateResourceDataForm" :selected-data="selectedData" :type="type"></data-resource-tranfer>
</div> </div>
<el-pagination <!-- <el-pagination
v-if="type==='数据资源'" v-if="type==='数据资源'"
:current-page="currentPage" :current-page="currentPage"
:page-size="15" :page-size="15"
@ -36,7 +37,7 @@
:total="total" :total="total"
@current-change="pageCurrentChangeHandle" @current-change="pageCurrentChangeHandle"
> >
</el-pagination> </el-pagination> -->
<template slot="footer"> <template slot="footer">
<el-button @click="showModal = false">{{ $t("cancel") }}</el-button> <el-button @click="showModal = false">{{ $t("cancel") }}</el-button>
<el-button type="primary" @click="confirmSubmitHandle()">{{ <el-button type="primary" @click="confirmSubmitHandle()">{{
@ -52,7 +53,7 @@
<script> <script>
import InfrastructureModal from '../assignedScene/components/infrastructure-modal.vue' import InfrastructureModal from '../assignedScene/components/infrastructure-modal.vue'
import DisplayList from '../assignedScene/components/display-list.vue' import DisplayList from '../assignedScene/components/display-list.vue'
import dataResourceTranfer from './data-resource-tranfer.vue'
const sjzyArray = [ const sjzyArray = [
{ {
zyname: '城阳区图书馆总分馆、社区图书室明细信息', zyname: '城阳区图书馆总分馆、社区图书室明细信息',
@ -199,7 +200,9 @@ export default {
total: 0, total: 0,
currentPage: 1, currentPage: 1,
newNum: 1, newNum: 1,
searchValue: '' searchValue: '',
selectedData:[],
newResourceData:[]
} }
}, },
watch: { watch: {
@ -223,10 +226,12 @@ export default {
}, },
methods: { methods: {
async getDataInfo (dataForm) { async getDataInfo (dataForm) {
console.log('dataForm-----====',dataForm);
console.log('this.type',this.type);
await this.getData() await this.getData()
const arr = [] const arr = []
const attrValue = dataForm.fuseResourceList.filter(v => v.type == this.type); const attrValue = dataForm.fuseResourceList.filter(v => v.type == this.type);
console.log('attrValue22',attrValue); this.selectedData = attrValue;
if (attrValue.length > 0) { if (attrValue.length > 0) {
attrValue.map(val => { attrValue.map(val => {
if(val.type==="数据资源"){ if(val.type==="数据资源"){
@ -248,6 +253,7 @@ export default {
} }
// //
this.displayList = JSON.parse(JSON.stringify(arr)); this.displayList = JSON.parse(JSON.stringify(arr));
this.displayList = Array.from(new Set(this.displayList))
// //
this.selectedArray = arr.map(v => v.id) this.selectedArray = arr.map(v => v.id)
this.$nextTick(() => { this.$nextTick(() => {
@ -286,7 +292,7 @@ export default {
this.$http[this.getDataParams.methods](this.getDataParams.url, this.$http[this.getDataParams.methods](this.getDataParams.url,
this.getDataParams.postData this.getDataParams.postData
).then(res => { ).then(res => {
console.log('res.data----获取列表-------->', res.data) console.log('res.data----数据资源获取列表-------->', res.data)
this.total = Number(res.data.data.rows) this.total = Number(res.data.data.rows)
if (res.data.code !== 0) { if (res.data.code !== 0) {
return this.$message.error(res.msg) return this.$message.error(res.msg)
@ -302,37 +308,56 @@ export default {
              resourceName:v.zyname               resourceName:v.zyname
}) })
}) })
this.allData = JSON.parse(JSON.stringify(this.transferData)) this.allData = JSON.parse(JSON.stringify(this.transferData));
//console.log('this.transferData======43434',this.transferData);
//console.log('res.data----retretryry-------->', this.transferData)
}).catch(err => { }).catch(err => {
this.$message.error('未搜索到相关数据资源') this.$message.error('未搜索到相关数据资源')
}) })
} }
}, },
//
updateResourceDataForm(data){
let obj = {};
data = data.list.reduce(function(item, next) {
obj[next.id] ? '' : obj[next.id] = true && item.push(next);
return item;
}, []);
console.log('变化后的数据222',data);
this.newResourceData = data;
},
filterMethod (query, item) { filterMethod (query, item) {
console.log('1111111111111111111111111') console.log('1111111111111111111111111')
return item.name && item.name.indexOf(query) > -1 return item.name && item.name.indexOf(query) > -1
}, },
confirmSubmitHandle () { confirmSubmitHandle () {
console.log('tttttt',this.selectedArray)
if(this.type === "数据资源"){ if(this.type === "数据资源"){
// //
let selectedObjectList = []; // let selectedObjectList = [];
this.selectedArray.forEach((item)=>{ // this.selectedArray.forEach((item)=>{
let filterData = []; // let filterData = [];
filterData = this.allData.filter(v => v.id == item); // filterData = this.allData.filter(v => v.id == item);
//console.log('filterDatafilterData',filterData); // //console.log('filterDatafilterData',filterData);
selectedObjectList.push(filterData[0]); // selectedObjectList.push(filterData[0]);
}); // });
// this.$emit('update', {
// title: this.type,
// list: selectedObjectList
// })
if (this.newResourceData.length > this.maxNum) {
return this.$message.error('最多选择十条数据!')
}
this.$emit('update', { this.$emit('update', {
title: this.type, title: this.type,
list: selectedObjectList list: this.newResourceData
}) });
this.displayList = this.newResourceData;
this.showModal = false
}else{ }else{
this.$emit('update', { this.$emit('update', {
title: this.type, title: this.type,
list: this.selectedArray list: this.selectedArray
}) })
}
if (this.selectedArray.length > this.maxNum) { if (this.selectedArray.length > this.maxNum) {
return this.$message.error('最多选择十条数据!') return this.$message.error('最多选择十条数据!')
} }
@ -343,7 +368,9 @@ export default {
this.displayList.push(v) this.displayList.push(v)
} }
}) })
this.displayList = Array.from(new Set(this.displayList))
console.log(this.selectedArray, this.displayList, 'this.displayList') console.log(this.selectedArray, this.displayList, 'this.displayList')
}
}, },
handleChange(){ handleChange(){
//console.log('222222',this.selectedArray); //console.log('222222',this.selectedArray);
@ -376,9 +403,10 @@ export default {
this.getData() this.getData()
} }
}, },
components: { InfrastructureModal, DisplayList }, components: { InfrastructureModal, DisplayList,dataResourceTranfer },
mounted () { mounted () {
console.log(this.type, 'this.type') console.log(this.type, 'this.type')
} }
} }
</script> </script>
@ -493,7 +521,7 @@ export default {
position: absolute; position: absolute;
font-size: 14px; font-size: 14px;
display: inline-block; display: inline-block;
width: 80%; width: 30%;
top: 52px; top: 52px;
left: 12px; left: 12px;
} }

View File

@ -0,0 +1,415 @@
<template>
<div class="transfer">
<div class="leftTransfer">
<div class="leftTransfer_title">
<el-checkbox
:indeterminate="left.isIndeterminate"
v-model="left.checkAll"
@change="leftHandleCheckAllChange"
>{{ titles[0] }}</el-checkbox
>
<span
>{{ left.transferDataChecked.length }}/{{
left.transferData.length
}}</span
>
</div>
<el-input
@input="transferInputLeft"
class="transfer_input"
placeholder="请输入内容"
prefix-icon="el-icon-search"
v-model="left.inputValue"
>
</el-input>
<el-checkbox-group
class="transfer_group"
v-model="left.transferDataChecked"
@change="leftHandleCheckedCitiesChange"
>
<el-checkbox
v-for="item in left.transferData"
:label="item"
:key="item[defaultProps.id]"
>{{ item[defaultProps.label] }}</el-checkbox
>
</el-checkbox-group>
<el-pagination
:current-page="currentPage"
:page-size="15"
layout="total, prev, pager, next"
:total="total"
@current-change="handleCurrentChange"
>
</el-pagination>
</div>
<div class="transferButton">
<el-button type="primary" @click="push">></el-button>
<el-button type="primary" @click="del">{{ "<" }}</el-button>
</div>
<div class="rightTransfer">
<div class="rightTransfer_title">
<el-checkbox
:indeterminate="right.isIndeterminate"
v-model="right.checkAll"
@change="rightHandleCheckAllChange"
>{{ titles[1] }}</el-checkbox
>
<span
>{{ right.transferDataChecked.length }}/{{
right.transferData.length
}}</span
>
</div>
<el-input
@input="transferInputRight"
class="transfer_input"
placeholder="请输入内容"
prefix-icon="el-icon-search"
v-model="right.inputValue"
>
</el-input>
<div style="margin: 5px 0"></div>
<el-checkbox-group
class="transfer_group"
v-model="right.transferDataChecked"
@change="rightHandleCheckedCitiesChange"
>
<el-checkbox
v-for="item in right.transferData"
:label="item"
:key="item[defaultProps.id]"
>{{ item[defaultProps.label] }}</el-checkbox
>
</el-checkbox-group>
</div>
</div>
</template>
<script>
//import { listUser } from "@/api/system/user";
export default {
name: "transferPage",
props: {
titles: {
type: Array,
default: () => ["待选列表", "已选列表"],
},
selectedData: {
type: Array,
default: () => []
},
type: {
type: String,
default: ''
},
},
data() {
return {
left: {
inputValue: "",
isIndeterminate: false, //
checkAll: false, //
transferData: [], //穿
transferDataAll: [], //穿
transferDataChecked: [], //穿
},
right: {
inputValue: "",
isIndeterminate: false, //
checkAll: false, //
transferData: [], //穿
transferDataAll: [], //穿
transferDataChecked: [], //穿
},
total: 0,
currentPage: 1,
queryParams: {
current: 1,
size: 10,
},
getDataParams:{
methods: "post",
url: "/resource/getDataResource",
postData: {
serviceName: "",
orderField: "fbrq",
orderType: "desc",
pageNum: 1,
pageSize: 15
}
},
defaultProps: {
label: "name",
id: "id",
},
};
},
created() {
this.initTransferData();
},
watch: {
// selectedData:{
// handler (newName, oldName) {
// console.log('',newName);
// this.right.transferData = newName
// }
// },
right: {
handler (newName, oldName) {
//console.log('nnnnnn',newName);
this.$emit('updateData', {
title: "选中的数据资源",
list: newName.transferData
})
},
immediate: false,
deep: true
}
},
methods: {
//
initTransferData() {
this.$http[this.getDataParams.methods](this.getDataParams.url,
this.getDataParams.postData
).then(response => {
console.log('数据资源response---->',response.data.data.data);
let responseDataList = [];
(response.data.data.data || []).map(v => {
responseDataList.push({
type: this.type,
id: v.guid,
name: v.zyname || '--',
deptName:v.TGBM,
resourceName:v.zyname
})
});
this.left.transferData = responseDataList;
this.left.transferData.map((item, index) => {
item.current = this.currentPage;
});
this.total = Number(response.data.data.rows);
this.left.transferDataAll = this.left.transferData;
// id
let checkedIdArr = this.right.transferData.map((item) => {
return item[this.defaultProps.id];
});
//
this.left.transferData = this.left.transferData.filter((item) => {
if (!checkedIdArr.includes(item[this.defaultProps.id])) {
return item;
}
});
});
let selectedDataRight = [];
this.selectedData = JSON.parse(JSON.stringify(this.selectedData));
(this.selectedData || []).map(v => {
selectedDataRight.push({
type: v.resource.type,
id: v.resource.resourceId,
name: v.resource.resourceName,
deptName:v.resource.deptName,
})
});
selectedDataRight.map(v => {
this.right.transferData.push(v);
});
let obj = {};
this.right.transferData = this.right.transferData.reduce(function(item, next) {
obj[next.id] ? '' : obj[next.id] = true && item.push(next);
return item;
}, []);
this.right.transferDataAll = this.right.transferData;
//console.log('this.selectedData',this.selectedData);
//console.log('left',this.left);
//console.log('rigth',this.right);
},
//
leftHandleCheckAllChange(val) {
this.left.transferDataChecked = val ? this.left.transferData : [];
this.left.isIndeterminate = false;
},
//
leftHandleCheckedCitiesChange(value) {
let checkedCount = value.length;
this.left.checkAll = checkedCount === this.left.transferData.length;
this.left.isIndeterminate =
checkedCount > 0 && checkedCount < this.left.transferData.length;
},
//
rightHandleCheckAllChange(val) {
this.right.transferDataChecked = val ? this.right.transferData : [];
this.right.isIndeterminate = false;
},
//
rightHandleCheckedCitiesChange(value) {
let checkedCount = value.length;
this.right.checkAll = checkedCount === this.right.transferData.length;
this.right.isIndeterminate =
checkedCount > 0 && checkedCount < this.right.transferData.length;
},
// 穿
push() {
//
this.right.transferData = [
...this.right.transferData,
...this.left.transferDataChecked,
].sort((a, b) => {
return a[this.defaultProps.id] - b[this.defaultProps.id];
});
this.right.transferDataAll = this.right.transferData;
// id
let checkedIdArr = this.right.transferData.map((item) => {
return item[this.defaultProps.id];
});
//
this.left.transferData = this.left.transferData.filter((item) => {
if (!checkedIdArr.includes(item[this.defaultProps.id])) {
return item;
}
});
this.left.transferDataAll = this.left.transferData;
//
this.left.transferDataChecked = [];
this.left.isIndeterminate = false;
this.left.checkAll = false;
},
// 穿 current
del() {
//
let arr = this.right.transferDataChecked.filter((item) => {
if (this.queryParams.current == item.current) {
return item;
}
});
//
this.left.transferData = [...this.left.transferData, ...arr].sort(
(a, b) => {
return a[this.defaultProps.id] - b[this.defaultProps.id];
}
);
this.left.transferDataAll = this.left.transferData;
// id
let checkedIdArr = this.right.transferDataChecked.map((item) => {
return item[this.defaultProps.id];
});
//
this.right.transferData = this.right.transferData.filter((item) => {
if (!checkedIdArr.includes(item[this.defaultProps.id])) {
return item;
}
});
this.right.transferDataAll = this.right.transferData;
//
this.right.transferDataChecked = [];
this.right.isIndeterminate = false;
this.right.checkAll = false;
},
handleCurrentChange(val) {
//console.log('valval',val);
this.getDataParams.postData.pageNum = val;
this.initTransferData();
},
transferInputLeft() {
if (this.left.inputValue) {
this.left.transferData = this.left.transferData.filter(
(p) => p[this.defaultProps.label].indexOf(this.left.inputValue) !== -1
);
} else {
this.left.transferData = this.left.transferDataAll;
}
},
transferInputRight() {
if (this.right.inputValue) {
this.right.transferData = this.right.transferData.filter(
(p) =>
p[this.defaultProps.label].indexOf(this.right.inputValue) !== -1
);
} else {
this.right.transferData = this.right.transferDataAll;
}
},
},
};
</script>
<style lang="scss" scoped>
.transfer {
width: 100%;
display: flex;
justify-content: space-between;
align-items: center;
margin: 0 auto;
.transferButton {
.el-button {
display: block;
margin: 10px 0;
}
}
.el-checkbox {
line-height: 30px;
}
.transfer_input {
margin: 10px 15px 0 15px;
width: 85%;
.el-input--medium .el-input__inner {
height: 36px;
line-height: 36px;
border-radius: 16px;
}
}
.leftTransfer,
.rightTransfer {
height: 510px;
border: 1px solid #e6ebf5;
border-radius: 4px;
overflow: hidden;
background: #ffffff;
display: inline-block;
vertical-align: middle;
width: 360px;
-webkit-box-sizing: border-box;
box-sizing: border-box;
position: relative;
margin: 0 10px;
.el-checkbox {
display: block;
}
.el-input {
position: absolute;
font-size: 14px;
display: inline-block;
width: 70%;
top: 40px;
}
.pagination {
position: absolute;
bottom: -8px;
right: 0;
}
.leftTransfer_title,
.rightTransfer_title {
display: flex;
justify-content: space-between;
height: 40px;
line-height: 40px;
background: #f5f7fa;
margin: 0;
padding-left: 15px;
border-bottom: 1px solid #e6ebf5;
-webkit-box-sizing: border-box;
box-sizing: border-box;
color: #000000;
padding-right: 15px;
align-items: center;
}
}
}
.transfer_group {
padding-left: 15px;
margin-top: 50px;
height: 390px;
overflow-y: auto;
}
</style>

View File

@ -1,8 +1,8 @@
/* /*
* @Author: hisense.wuhongjian * @Author: hisense.wuhongjian
* @Date: 2022-04-01 17:23:11 * @Date: 2022-04-01 17:23:11
* @LastEditors: hisense.wuhongjian * @LastEditors: Light
* @LastEditTime: 2022-10-11 13:59:18 * @LastEditTime: 2022-10-17 09:25:32
* @Description: 告诉大家这是什么 * @Description: 告诉大家这是什么
*/ */
/** /**
@ -26,7 +26,6 @@ router.beforeEach(async (to, from, next) => {
// if (SSOTOKEN) { // if (SSOTOKEN) {
// setAccessToken(SSOTOKEN) // setAccessToken(SSOTOKEN)
// } // }
console.log('验证白名单', routesWhiteList)
const token = getAccessToken() const token = getAccessToken()
console.log('token', token) console.log('token', token)
let hasToken = token let hasToken = token
@ -44,6 +43,7 @@ router.beforeEach(async (to, from, next) => {
accessRoutes.forEach((item) => { accessRoutes.forEach((item) => {
router.addRoute(item) router.addRoute(item)
}) })
console.log('验证白名单', routesWhiteList)
if (routesWhiteList.indexOf(to.path) !== -1) { if (routesWhiteList.indexOf(to.path) !== -1) {
debugger debugger
next() next()

View File

@ -2,7 +2,11 @@
<div class="ability-to-apply-for" :class="{ all: falg }"> <div class="ability-to-apply-for" :class="{ all: falg }">
<div class="title"> <div class="title">
<span>申请能力</span> <span>申请能力</span>
<div class="btnBox" v-show="!falg"> <div
class="btnBox"
v-show="!falg"
v-if="dataForm[0].arr.length > 1 || dataForm.length > 1"
>
<svg <svg
t="1659419933164" t="1659419933164"
class="btn" class="btn"
@ -97,7 +101,10 @@
{{ {{
val.description || val.description ||
((val.note1 || '') && ((val.note1 || '') &&
(JSON.parse(val.note1) && JSON.parse(val.note1)[0] && JSON.parse(val.note1)[0].channelName || '--') + ((JSON.parse(val.note1) &&
JSON.parse(val.note1)[0] &&
JSON.parse(val.note1)[0].channelName) ||
'--') +
'等' + '等' +
JSON.parse(val.note1).length + JSON.parse(val.note1).length +
'个摄像头') || '个摄像头') ||
@ -105,7 +112,11 @@
}} }}
</div> </div>
</div> </div>
<div class="remove" v-if="item.arr.length>1" @click="removeFunction(val)"></div> <div
class="remove"
v-if="item.arr.length > 1"
@click="removeFunction(val)"
></div>
</div> </div>
</template> </template>
</div> </div>
@ -181,7 +192,10 @@
let arr = JSON.parse(note1) let arr = JSON.parse(note1)
xVideoList.value = [] xVideoList.value = []
arr.map((val) => { arr.map((val) => {
xVideoList.value.push({ name: val.channelName || '', key: val.channelId }) xVideoList.value.push({
name: val.channelName || '',
key: val.channelId,
})
}) })
videoVisible.value = true videoVisible.value = true
} else { } else {

View File

@ -157,7 +157,7 @@
password: Encrypt(this.form.password), password: Encrypt(this.form.password),
username: this.form.username, username: this.form.username,
}) })
window.localStorage.setItem('tokenStartTime', new Date().getTime()) // window.localStorage.setItem('tokenStartTime', new Date().getTime())
window.sessionStorage.setItem('visits', JSON.stringify([])) window.sessionStorage.setItem('visits', JSON.stringify([]))
console.log( console.log(
'添加visits========================================>', '添加visits========================================>',

View File

@ -1,9 +1,21 @@
<template> <template>
<DeviceApplyDetail v-if="showType === '设备申请'" :refObj="refObj"></DeviceApplyDetail> <DeviceApplyDetail
v-if="showType === '设备申请'"
:refObj="refObj"
></DeviceApplyDetail>
<div class="form-container" v-else> <div class="form-container" v-else>
<AbilityApplication :refObj="refObj" v-if="showType === '能力申请'"></AbilityApplication> <AbilityApplication
<PutOnTheShelf :refObj="refObj" v-else-if="showType === '能力上架'"></PutOnTheShelf> :refObj="refObj"
<OffTheShelf :refObj="refObj" v-else-if="showType === '能力下架'"></OffTheShelf> v-if="showType === '能力申请'"
></AbilityApplication>
<PutOnTheShelf
:refObj="refObj"
v-else-if="showType === '能力上架'"
></PutOnTheShelf>
<OffTheShelf
:refObj="refObj"
v-else-if="showType === '能力下架'"
></OffTheShelf>
<Demand :refObj="refObj" v-else-if="showType === '能力需求'"></Demand> <Demand :refObj="refObj" v-else-if="showType === '能力需求'"></Demand>
<Comment :refObj="refObj" v-else-if="showType === '需求评论'"></Comment> <Comment :refObj="refObj" v-else-if="showType === '需求评论'"></Comment>
<OtherApplications :refObj="refObj" v-else></OtherApplications> <OtherApplications :refObj="refObj" v-else></OtherApplications>
@ -23,46 +35,46 @@
</div> </div>
</template> </template>
<script setup> <script setup>
import AbilityApplication from './AbilityApplication.vue' import AbilityApplication from './AbilityApplication.vue'
import PutOnTheShelf from './PutOnTheShelf .vue' import PutOnTheShelf from './PutOnTheShelf .vue'
import OffTheShelf from './OffTheShelf.vue' import OffTheShelf from './OffTheShelf.vue'
import Demand from './Demand.vue' import Demand from './Demand.vue'
import Comment from './Comment.vue' import Comment from './Comment.vue'
import DeviceApplyDetail from './DeviceApplyDetail.vue' import DeviceApplyDetail from './DeviceApplyDetail.vue'
import OtherApplications from '@/views/personalCenter/components/OtherApplications ' import OtherApplications from '@/views/personalCenter/components/OtherApplications '
import { onMounted, reactive, defineProps, ref } from 'vue' import { onMounted, reactive, defineProps, ref } from 'vue'
import Cookies from 'js-cookie' import Cookies from 'js-cookie'
// import { baseURL } from '@/config' // import { baseURL } from '@/config'
import qs from 'qs' import qs from 'qs'
import { import {
getApplyForm, getApplyForm,
getTaskHandleDetailInfo, getTaskHandleDetailInfo,
getDemandForm, getDemandForm,
nengliziyuanshangjiaapply, nengliziyuanshangjiaapply,
getTaskVariables, getTaskVariables,
} from '@/api/personalCenter' } from '@/api/personalCenter'
import { selectOneDel } from '@/api/home' import { selectOneDel } from '@/api/home'
const props = defineProps({ const props = defineProps({
processDefinitionName: { type: String, default: null }, processDefinitionName: { type: String, default: null },
businessKey: { type: String, default: null }, businessKey: { type: String, default: null },
processInstanceId: { type: String, default: null }, processInstanceId: { type: String, default: null },
resourceId: { type: String, default: null }, resourceId: { type: String, default: null },
refObj: { type: Object, default: null }, refObj: { type: Object, default: null },
showType: { type: String, default: null }, showType: { type: String, default: null },
}) })
const refObj = ref({}) const refObj = ref({})
const showType = ref('') const showType = ref('')
// eslint-disable-next-line vue/no-setup-props-destructure // eslint-disable-next-line vue/no-setup-props-destructure
refObj.value = props.refObj refObj.value = props.refObj
// eslint-disable-next-line vue/no-setup-props-destructure // eslint-disable-next-line vue/no-setup-props-destructure
showType.value = props.showType showType.value = props.showType
// //
const dataSource = reactive({ data: [] }) const dataSource = reactive({ data: [] })
console.log('refObj------------>', refObj); console.log('refObj------------>', refObj)
// console.log(props.refObj, '---------------------------------------') // console.log(props.refObj, '---------------------------------------')
const downloadFile = (path, name) => { const downloadFile = (path, name) => {
const xhr = new XMLHttpRequest() const xhr = new XMLHttpRequest()
xhr.open('get', path) xhr.open('get', path)
xhr.responseType = 'blob' xhr.responseType = 'blob'
@ -87,9 +99,9 @@ const downloadFile = (path, name) => {
URL.revokeObjectURL(url) URL.revokeObjectURL(url)
} }
} }
} }
// //
const formName = reactive({ const formName = reactive({
user: '', user: '',
phone: '', phone: '',
unit: '', unit: '',
@ -98,17 +110,22 @@ const formName = reactive({
scene: '', scene: '',
basis: '', basis: '',
id: '', id: '',
}) })
let shifoushizujian = ref('') let shifoushizujian = ref('')
let nameNotShow = ref('') let nameNotShow = ref('')
let algorithmShow = ref('') let algorithmShow = ref('')
const dataForm = reactive({ data: {} }) const dataForm = reactive({ data: {} })
const columns = [ const columns = [
{ {
title: '任务名称', title: '任务名称',
dataIndex: 'activityName', dataIndex: 'activityName',
key: 'activityName', key: 'activityName',
}, },
{
title: '处理部门',
dataIndex: 'assigneeDeptName',
key: 'assigneeDeptName',
},
{ {
title: '处理人', title: '处理人',
dataIndex: 'assigneeName', dataIndex: 'assigneeName',
@ -134,8 +151,8 @@ const columns = [
dataIndex: 'duration', dataIndex: 'duration',
key: 'duration', key: 'duration',
}, },
] ]
const getInfo = () => { const getInfo = () => {
console.log(props.processInstanceId, '============================') console.log(props.processInstanceId, '============================')
if (props.processDefinitionName == '能力申请') { if (props.processDefinitionName == '能力申请') {
// getTaskVariables({ taskId: props.processInstanceId }).then((res) => { // getTaskVariables({ taskId: props.processInstanceId }).then((res) => {
@ -199,9 +216,9 @@ const getInfo = () => {
dataForm.data = res.data.data dataForm.data = res.data.data
}) })
} }
} }
const getLiuZhuanInfo = () => { const getLiuZhuanInfo = () => {
const params = qs.stringify({ const params = qs.stringify({
processInstanceId: props.processInstanceId, processInstanceId: props.processInstanceId,
}) })
@ -212,9 +229,9 @@ const getLiuZhuanInfo = () => {
}) })
dataSource.data.push([props.processInstanceId, arr]) dataSource.data.push([props.processInstanceId, arr])
}) })
} }
onMounted(() => { onMounted(() => {
// getInfo() // getInfo()
if (props.refObj.resourceApplication) { if (props.refObj.resourceApplication) {
dataSource.data = [] dataSource.data = []
@ -228,9 +245,9 @@ onMounted(() => {
} else { } else {
getLiuZhuanInfo() getLiuZhuanInfo()
} }
}) })
const getResourceURL = () => { const getResourceURL = () => {
console.log('111111111111111111111111111111', Cookies.get('token')) console.log('111111111111111111111111111111', Cookies.get('token'))
const params = qs.stringify({ const params = qs.stringify({
token: Cookies.get('token'), token: Cookies.get('token'),
@ -238,11 +255,11 @@ const getResourceURL = () => {
processInstanceId: props.processInstanceId, processInstanceId: props.processInstanceId,
}) })
return `${window.SITE_CONFIG.apiURL}/act/his/getInstImage?${params}` return `${window.SITE_CONFIG.apiURL}/act/his/getInstImage?${params}`
} }
</script> </script>
<style scoped lang="less"> <style scoped lang="less">
.form-container { .form-container {
height: 6rem; height: 6rem;
overflow-y: scroll; overflow-y: scroll;
padding: 20px 20px 30px 20px; padding: 20px 20px 30px 20px;
@ -256,25 +273,25 @@ const getResourceURL = () => {
margin-top: 10px; margin-top: 10px;
border-left: 6px #0058e1 solid; border-left: 6px #0058e1 solid;
} }
} }
:deep(.ant-table-thead)>tr>.ant-table-cell { :deep(.ant-table-thead) > tr > .ant-table-cell {
background: #0087ff; background: #0087ff;
color: #fff; color: #fff;
border: none; border: none;
text-align: center; text-align: center;
font-size: 16px; font-size: 16px;
} }
:deep(.ant-table-tbody)>tr>.ant-table-cell:nth-child(5) { :deep(.ant-table-tbody) > tr > .ant-table-cell:nth-child(5) {
// width: 110px; // width: 110px;
// display: inline-block; // display: inline-block;
// white-space: nowrap; // white-space: nowrap;
// overflow: hidden; // overflow: hidden;
// text-overflow: ellipsis; // text-overflow: ellipsis;
} }
.oddNumbers { .oddNumbers {
margin-bottom: 0.05rem; margin-bottom: 0.05rem;
} }
</style> </style>

View File

@ -87,8 +87,8 @@
</div> </div>
</div> </div>
<a-empty v-else /> <a-empty v-else />
<a-modal bodyStyle="padding:0.1rem 0" v-model:visible="detailsVisible" style="width: 900px" :footer="null" <a-modal bodyStyle="padding:0.1rem 0" v-model:visible="detailsVisible"
destroyOnClose="true" :maskClosable="false"> style="width: 900px" :footer="null" destroyOnClose="true" :maskClosable="false">
<template v-slot:title>{{refObj.description && itShowXiHaiAn ? refObj.description + '申请详情' : '申请详情'}}</template> <template v-slot:title>{{refObj.description && itShowXiHaiAn ? refObj.description + '申请详情' : '申请详情'}}</template>
<apply-details :processDefinitionName="processDefinitionName" :businessKey="businessKey" <apply-details :processDefinitionName="processDefinitionName" :businessKey="businessKey"
:processInstanceId="processInstanceId" :resourceId="resourceId" :refObj="refObj" :showType="showType"> :processInstanceId="processInstanceId" :resourceId="resourceId" :refObj="refObj" :showType="showType">
@ -100,6 +100,9 @@
<a-modal v-model:visible="videoVisible" title="已申请摄像头列表" @ok="videoVisible = false"> <a-modal v-model:visible="videoVisible" title="已申请摄像头列表" @ok="videoVisible = false">
<a-table :columns="columns" :data-source="xVideoList" bordered :pagination="{ defaultPageSize: 6 }"> <a-table :columns="columns" :data-source="xVideoList" bordered :pagination="{ defaultPageSize: 6 }">
<template #bodyCell="{ column, text }"> <template #bodyCell="{ column, text }">
<!-- <template>
<a>{{ text }}</a>
</template> -->
</template> </template>
</a-table> </a-table>
</a-modal> </a-modal>
@ -151,7 +154,7 @@ let typeList = ref([
]) ])
// 西- // 西-
let isXiHaiAn = whoShow.itShowXiHaiAn let isXiHaiAn = whoShow.itShowXiHaiAn
let itShowXiHaiAn = ref(isXiHaiAn) const itShowXiHaiAn = ref(isXiHaiAn)
const phoneSate = ref([2, 3]) const phoneSate = ref([2, 3])
if (isXiHaiAn) { if (isXiHaiAn) {
typeList.value.push('设备申请') typeList.value.push('设备申请')
@ -237,7 +240,9 @@ function changeApplyState(item, index) {
} }
} }
const cilckRowData = ref({})
const showDetail = (item) => { const showDetail = (item) => {
cilckRowData.value = item;
// 西- // 西-
if (isXiHaiAn) { if (isXiHaiAn) {
if (item.expireDate) { if (item.expireDate) {
@ -263,12 +268,9 @@ const showDetail = (item) => {
} else if (typeName.value == '设备申请') { } else if (typeName.value == '设备申请') {
getDeviceDetailInfo(item.deviceId) getDeviceDetailInfo(item.deviceId)
.then((res) => { .then((res) => {
console.log('res---设备申请--------->', res);
if (res.data.code == 0) { if (res.data.code == 0) {
refObj.value = res.data.data refObj.value = res.data.data
detailsVisible.value = true detailsVisible.value = true
// processDefinitionName.value = item.processDefinitionName
} }
}) })
.catch((err) => { }) .catch((err) => { })