合并冲突
This commit is contained in:
commit
ea2afd08c9
|
@ -116,7 +116,6 @@ import CommonQuestion from '../components/common-question.vue'
|
|||
import InfrastructureModal from './components/infrastructure-modal.vue'
|
||||
import Cookies from 'js-cookie'
|
||||
import upload from '@/views/modules/components/upload'
|
||||
|
||||
const btnArray = ['基本信息', '场景痛点', '解决方案', '组合能力', '更多能力', '使用步骤']
|
||||
// 数据资源\组件服务
|
||||
export const getJson = (type) => {
|
||||
|
@ -163,7 +162,6 @@ export const modalTypeText = {
|
|||
}
|
||||
|
||||
export const getFuseResourceList = (abilityListObj) => {
|
||||
console.log('abilityListObjabilityListObj',abilityListObj);
|
||||
const arr = []
|
||||
let length = 0
|
||||
for (const key in abilityListObj) {
|
||||
|
@ -176,7 +174,7 @@ export const getFuseResourceList = (abilityListObj) => {
|
|||
resourceId: v.id,
|
||||
type: key,
|
||||
sequence: index,
|
||||
resourceName:v.resourceName,
|
||||
resourceName:v.resourceName|| v.name ,
|
||||
deptName:v.deptName,
|
||||
})
|
||||
})
|
||||
|
@ -331,9 +329,10 @@ export default {
|
|||
},
|
||||
// 更新表单
|
||||
updateDataForm (data) {
|
||||
console.log('datadatadata',data);
|
||||
//console.log('datadatadata',data);
|
||||
if (Object.keys(this.getListParams).includes(data.title)) {
|
||||
this.abilityListObj[data.title] = data.list
|
||||
console.log(' this.abilityListObj[data.title]3333', this.abilityListObj[data.title]);
|
||||
} else {
|
||||
// 更多能力、使用步骤
|
||||
this.operateFuseAttrList(data.title, data)
|
||||
|
@ -363,6 +362,7 @@ export default {
|
|||
// 表单提交
|
||||
dataFormSubmitHandle: debounce(
|
||||
function () {
|
||||
console.log('this.dataForm------表单提交------>111111', this.dataForm)
|
||||
this.$refs.dataForm.validate((valid) => {
|
||||
if (!valid) {
|
||||
this.$message.error('请检查表单是否填写完整')
|
||||
|
|
|
@ -16,19 +16,20 @@
|
|||
</el-transfer>
|
||||
</div>
|
||||
<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="{
|
||||
key: 'id',
|
||||
label: 'name',
|
||||
}" :data="transferData">
|
||||
</el-transfer>
|
||||
<!-- <el-input
|
||||
<el-input
|
||||
v-model="searchValue"
|
||||
placeholder="请输入名称"
|
||||
></el-input>
|
||||
<el-button @click="rest" class="restClick">重置</el-button> -->
|
||||
<data-resource-tranfer @updateData="updateResourceDataForm" :selected-data="selectedData" :type="type"></data-resource-tranfer>
|
||||
</div>
|
||||
<el-pagination
|
||||
<!-- <el-pagination
|
||||
v-if="type==='数据资源'"
|
||||
:current-page="currentPage"
|
||||
:page-size="15"
|
||||
|
@ -36,7 +37,7 @@
|
|||
:total="total"
|
||||
@current-change="pageCurrentChangeHandle"
|
||||
>
|
||||
</el-pagination>
|
||||
</el-pagination> -->
|
||||
<template slot="footer">
|
||||
<el-button @click="showModal = false">{{ $t("cancel") }}</el-button>
|
||||
<el-button type="primary" @click="confirmSubmitHandle()">{{
|
||||
|
@ -52,7 +53,7 @@
|
|||
<script>
|
||||
import InfrastructureModal from '../assignedScene/components/infrastructure-modal.vue'
|
||||
import DisplayList from '../assignedScene/components/display-list.vue'
|
||||
|
||||
import dataResourceTranfer from './data-resource-tranfer.vue'
|
||||
const sjzyArray = [
|
||||
{
|
||||
zyname: '城阳区图书馆总分馆、社区图书室明细信息',
|
||||
|
@ -199,7 +200,9 @@ export default {
|
|||
total: 0,
|
||||
currentPage: 1,
|
||||
newNum: 1,
|
||||
searchValue: ''
|
||||
searchValue: '',
|
||||
selectedData:[],
|
||||
newResourceData:[]
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
|
@ -223,10 +226,12 @@ export default {
|
|||
},
|
||||
methods: {
|
||||
async getDataInfo (dataForm) {
|
||||
console.log('dataForm-----====',dataForm);
|
||||
console.log('this.type',this.type);
|
||||
await this.getData()
|
||||
const arr = []
|
||||
const attrValue = dataForm.fuseResourceList.filter(v => v.type == this.type);
|
||||
console.log('attrValue22',attrValue);
|
||||
this.selectedData = attrValue;
|
||||
if (attrValue.length > 0) {
|
||||
attrValue.map(val => {
|
||||
if(val.type==="数据资源"){
|
||||
|
@ -248,6 +253,7 @@ export default {
|
|||
}
|
||||
// 展示
|
||||
this.displayList = JSON.parse(JSON.stringify(arr));
|
||||
this.displayList = Array.from(new Set(this.displayList))
|
||||
// 已选中
|
||||
this.selectedArray = arr.map(v => v.id)
|
||||
this.$nextTick(() => {
|
||||
|
@ -286,7 +292,7 @@ export default {
|
|||
this.$http[this.getDataParams.methods](this.getDataParams.url,
|
||||
this.getDataParams.postData
|
||||
).then(res => {
|
||||
console.log('res.data----获取列表-------->', res.data)
|
||||
console.log('res.data----数据资源获取列表-------->', res.data)
|
||||
this.total = Number(res.data.data.rows)
|
||||
if (res.data.code !== 0) {
|
||||
return this.$message.error(res.msg)
|
||||
|
@ -302,37 +308,56 @@ export default {
|
|||
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 => {
|
||||
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) {
|
||||
console.log('1111111111111111111111111')
|
||||
return item.name && item.name.indexOf(query) > -1
|
||||
},
|
||||
confirmSubmitHandle () {
|
||||
console.log('tttttt',this.selectedArray)
|
||||
if(this.type === "数据资源"){
|
||||
//通过选中的数据去查找原始列表数据
|
||||
let selectedObjectList = [];
|
||||
this.selectedArray.forEach((item)=>{
|
||||
let filterData = [];
|
||||
filterData = this.allData.filter(v => v.id == item);
|
||||
//console.log('filterDatafilterData',filterData);
|
||||
selectedObjectList.push(filterData[0]);
|
||||
});
|
||||
// let selectedObjectList = [];
|
||||
// this.selectedArray.forEach((item)=>{
|
||||
// let filterData = [];
|
||||
// filterData = this.allData.filter(v => v.id == item);
|
||||
// //console.log('filterDatafilterData',filterData);
|
||||
// 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', {
|
||||
title: this.type,
|
||||
list: selectedObjectList
|
||||
})
|
||||
list: this.newResourceData
|
||||
});
|
||||
this.displayList = this.newResourceData;
|
||||
this.showModal = false
|
||||
}else{
|
||||
this.$emit('update', {
|
||||
title: this.type,
|
||||
list: this.selectedArray
|
||||
})
|
||||
}
|
||||
if (this.selectedArray.length > this.maxNum) {
|
||||
return this.$message.error('最多选择十条数据!')
|
||||
}
|
||||
|
@ -343,7 +368,9 @@ export default {
|
|||
this.displayList.push(v)
|
||||
}
|
||||
})
|
||||
this.displayList = Array.from(new Set(this.displayList))
|
||||
console.log(this.selectedArray, this.displayList, 'this.displayList')
|
||||
}
|
||||
},
|
||||
handleChange(){
|
||||
//console.log('222222',this.selectedArray);
|
||||
|
@ -376,9 +403,10 @@ export default {
|
|||
this.getData()
|
||||
}
|
||||
},
|
||||
components: { InfrastructureModal, DisplayList },
|
||||
components: { InfrastructureModal, DisplayList,dataResourceTranfer },
|
||||
mounted () {
|
||||
console.log(this.type, 'this.type')
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
@ -493,7 +521,7 @@ export default {
|
|||
position: absolute;
|
||||
font-size: 14px;
|
||||
display: inline-block;
|
||||
width: 80%;
|
||||
width: 30%;
|
||||
top: 52px;
|
||||
left: 12px;
|
||||
}
|
||||
|
|
|
@ -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>
|
|
@ -1,8 +1,8 @@
|
|||
/*
|
||||
* @Author: hisense.wuhongjian
|
||||
* @Date: 2022-04-01 17:23:11
|
||||
* @LastEditors: hisense.wuhongjian
|
||||
* @LastEditTime: 2022-10-11 13:59:18
|
||||
* @LastEditors: Light
|
||||
* @LastEditTime: 2022-10-17 09:25:32
|
||||
* @Description: 告诉大家这是什么
|
||||
*/
|
||||
/**
|
||||
|
@ -26,7 +26,6 @@ router.beforeEach(async (to, from, next) => {
|
|||
// if (SSOTOKEN) {
|
||||
// setAccessToken(SSOTOKEN)
|
||||
// }
|
||||
console.log('验证白名单', routesWhiteList)
|
||||
const token = getAccessToken()
|
||||
console.log('token', token)
|
||||
let hasToken = token
|
||||
|
@ -44,6 +43,7 @@ router.beforeEach(async (to, from, next) => {
|
|||
accessRoutes.forEach((item) => {
|
||||
router.addRoute(item)
|
||||
})
|
||||
console.log('验证白名单', routesWhiteList)
|
||||
if (routesWhiteList.indexOf(to.path) !== -1) {
|
||||
debugger
|
||||
next()
|
||||
|
|
|
@ -2,7 +2,11 @@
|
|||
<div class="ability-to-apply-for" :class="{ all: falg }">
|
||||
<div class="title">
|
||||
<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
|
||||
t="1659419933164"
|
||||
class="btn"
|
||||
|
@ -97,7 +101,10 @@
|
|||
{{
|
||||
val.description ||
|
||||
((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 +
|
||||
'个摄像头') ||
|
||||
|
@ -105,7 +112,11 @@
|
|||
}}
|
||||
</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>
|
||||
</template>
|
||||
</div>
|
||||
|
@ -181,7 +192,10 @@
|
|||
let arr = JSON.parse(note1)
|
||||
xVideoList.value = []
|
||||
arr.map((val) => {
|
||||
xVideoList.value.push({ name: val.channelName || '', key: val.channelId })
|
||||
xVideoList.value.push({
|
||||
name: val.channelName || '',
|
||||
key: val.channelId,
|
||||
})
|
||||
})
|
||||
videoVisible.value = true
|
||||
} else {
|
||||
|
|
|
@ -157,7 +157,7 @@
|
|||
password: Encrypt(this.form.password),
|
||||
username: this.form.username,
|
||||
})
|
||||
window.localStorage.setItem('tokenStartTime', new Date().getTime())
|
||||
// window.localStorage.setItem('tokenStartTime', new Date().getTime())
|
||||
window.sessionStorage.setItem('visits', JSON.stringify([]))
|
||||
console.log(
|
||||
'添加visits========================================>',
|
||||
|
|
|
@ -1,9 +1,21 @@
|
|||
<template>
|
||||
<DeviceApplyDetail v-if="showType === '设备申请'" :refObj="refObj"></DeviceApplyDetail>
|
||||
<DeviceApplyDetail
|
||||
v-if="showType === '设备申请'"
|
||||
:refObj="refObj"
|
||||
></DeviceApplyDetail>
|
||||
<div class="form-container" v-else>
|
||||
<AbilityApplication :refObj="refObj" v-if="showType === '能力申请'"></AbilityApplication>
|
||||
<PutOnTheShelf :refObj="refObj" v-else-if="showType === '能力上架'"></PutOnTheShelf>
|
||||
<OffTheShelf :refObj="refObj" v-else-if="showType === '能力下架'"></OffTheShelf>
|
||||
<AbilityApplication
|
||||
:refObj="refObj"
|
||||
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>
|
||||
<Comment :refObj="refObj" v-else-if="showType === '需求评论'"></Comment>
|
||||
<OtherApplications :refObj="refObj" v-else></OtherApplications>
|
||||
|
@ -23,46 +35,46 @@
|
|||
</div>
|
||||
</template>
|
||||
<script setup>
|
||||
import AbilityApplication from './AbilityApplication.vue'
|
||||
import PutOnTheShelf from './PutOnTheShelf .vue'
|
||||
import OffTheShelf from './OffTheShelf.vue'
|
||||
import Demand from './Demand.vue'
|
||||
import Comment from './Comment.vue'
|
||||
import DeviceApplyDetail from './DeviceApplyDetail.vue'
|
||||
import OtherApplications from '@/views/personalCenter/components/OtherApplications '
|
||||
import { onMounted, reactive, defineProps, ref } from 'vue'
|
||||
import Cookies from 'js-cookie'
|
||||
// import { baseURL } from '@/config'
|
||||
import qs from 'qs'
|
||||
import {
|
||||
import AbilityApplication from './AbilityApplication.vue'
|
||||
import PutOnTheShelf from './PutOnTheShelf .vue'
|
||||
import OffTheShelf from './OffTheShelf.vue'
|
||||
import Demand from './Demand.vue'
|
||||
import Comment from './Comment.vue'
|
||||
import DeviceApplyDetail from './DeviceApplyDetail.vue'
|
||||
import OtherApplications from '@/views/personalCenter/components/OtherApplications '
|
||||
import { onMounted, reactive, defineProps, ref } from 'vue'
|
||||
import Cookies from 'js-cookie'
|
||||
// import { baseURL } from '@/config'
|
||||
import qs from 'qs'
|
||||
import {
|
||||
getApplyForm,
|
||||
getTaskHandleDetailInfo,
|
||||
getDemandForm,
|
||||
nengliziyuanshangjiaapply,
|
||||
getTaskVariables,
|
||||
} from '@/api/personalCenter'
|
||||
import { selectOneDel } from '@/api/home'
|
||||
const props = defineProps({
|
||||
} from '@/api/personalCenter'
|
||||
import { selectOneDel } from '@/api/home'
|
||||
const props = defineProps({
|
||||
processDefinitionName: { type: String, default: null },
|
||||
businessKey: { type: String, default: null },
|
||||
processInstanceId: { type: String, default: null },
|
||||
resourceId: { type: String, default: null },
|
||||
refObj: { type: Object, default: null },
|
||||
showType: { type: String, default: null },
|
||||
})
|
||||
const refObj = ref({})
|
||||
const showType = ref('')
|
||||
// eslint-disable-next-line vue/no-setup-props-destructure
|
||||
refObj.value = props.refObj
|
||||
// eslint-disable-next-line vue/no-setup-props-destructure
|
||||
showType.value = props.showType
|
||||
//流转详情
|
||||
const dataSource = reactive({ data: [] })
|
||||
console.log('refObj------------>', refObj);
|
||||
})
|
||||
const refObj = ref({})
|
||||
const showType = ref('')
|
||||
// eslint-disable-next-line vue/no-setup-props-destructure
|
||||
refObj.value = props.refObj
|
||||
// eslint-disable-next-line vue/no-setup-props-destructure
|
||||
showType.value = props.showType
|
||||
//流转详情
|
||||
const dataSource = reactive({ data: [] })
|
||||
console.log('refObj------------>', refObj)
|
||||
|
||||
// console.log(props.refObj, '---------------------------------------')
|
||||
// console.log(props.refObj, '---------------------------------------')
|
||||
|
||||
const downloadFile = (path, name) => {
|
||||
const downloadFile = (path, name) => {
|
||||
const xhr = new XMLHttpRequest()
|
||||
xhr.open('get', path)
|
||||
xhr.responseType = 'blob'
|
||||
|
@ -87,9 +99,9 @@ const downloadFile = (path, name) => {
|
|||
URL.revokeObjectURL(url)
|
||||
}
|
||||
}
|
||||
}
|
||||
//表单信息
|
||||
const formName = reactive({
|
||||
}
|
||||
//表单信息
|
||||
const formName = reactive({
|
||||
user: '',
|
||||
phone: '',
|
||||
unit: '',
|
||||
|
@ -98,17 +110,22 @@ const formName = reactive({
|
|||
scene: '',
|
||||
basis: '',
|
||||
id: '',
|
||||
})
|
||||
let shifoushizujian = ref('')
|
||||
let nameNotShow = ref('')
|
||||
let algorithmShow = ref('')
|
||||
const dataForm = reactive({ data: {} })
|
||||
const columns = [
|
||||
})
|
||||
let shifoushizujian = ref('')
|
||||
let nameNotShow = ref('')
|
||||
let algorithmShow = ref('')
|
||||
const dataForm = reactive({ data: {} })
|
||||
const columns = [
|
||||
{
|
||||
title: '任务名称',
|
||||
dataIndex: 'activityName',
|
||||
key: 'activityName',
|
||||
},
|
||||
{
|
||||
title: '处理部门',
|
||||
dataIndex: 'assigneeDeptName',
|
||||
key: 'assigneeDeptName',
|
||||
},
|
||||
{
|
||||
title: '处理人',
|
||||
dataIndex: 'assigneeName',
|
||||
|
@ -134,8 +151,8 @@ const columns = [
|
|||
dataIndex: 'duration',
|
||||
key: 'duration',
|
||||
},
|
||||
]
|
||||
const getInfo = () => {
|
||||
]
|
||||
const getInfo = () => {
|
||||
console.log(props.processInstanceId, '============================')
|
||||
if (props.processDefinitionName == '能力申请') {
|
||||
// getTaskVariables({ taskId: props.processInstanceId }).then((res) => {
|
||||
|
@ -199,9 +216,9 @@ const getInfo = () => {
|
|||
dataForm.data = res.data.data
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
const getLiuZhuanInfo = () => {
|
||||
const getLiuZhuanInfo = () => {
|
||||
const params = qs.stringify({
|
||||
processInstanceId: props.processInstanceId,
|
||||
})
|
||||
|
@ -212,9 +229,9 @@ const getLiuZhuanInfo = () => {
|
|||
})
|
||||
dataSource.data.push([props.processInstanceId, arr])
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
onMounted(() => {
|
||||
onMounted(() => {
|
||||
// getInfo()
|
||||
if (props.refObj.resourceApplication) {
|
||||
dataSource.data = []
|
||||
|
@ -228,9 +245,9 @@ onMounted(() => {
|
|||
} else {
|
||||
getLiuZhuanInfo()
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
const getResourceURL = () => {
|
||||
const getResourceURL = () => {
|
||||
console.log('111111111111111111111111111111', Cookies.get('token'))
|
||||
const params = qs.stringify({
|
||||
token: Cookies.get('token'),
|
||||
|
@ -238,11 +255,11 @@ const getResourceURL = () => {
|
|||
processInstanceId: props.processInstanceId,
|
||||
})
|
||||
return `${window.SITE_CONFIG.apiURL}/act/his/getInstImage?${params}`
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="less">
|
||||
.form-container {
|
||||
.form-container {
|
||||
height: 6rem;
|
||||
overflow-y: scroll;
|
||||
padding: 20px 20px 30px 20px;
|
||||
|
@ -256,25 +273,25 @@ const getResourceURL = () => {
|
|||
margin-top: 10px;
|
||||
border-left: 6px #0058e1 solid;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
:deep(.ant-table-thead)>tr>.ant-table-cell {
|
||||
:deep(.ant-table-thead) > tr > .ant-table-cell {
|
||||
background: #0087ff;
|
||||
color: #fff;
|
||||
border: none;
|
||||
text-align: center;
|
||||
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;
|
||||
// display: inline-block;
|
||||
// white-space: nowrap;
|
||||
// overflow: hidden;
|
||||
// text-overflow: ellipsis;
|
||||
}
|
||||
}
|
||||
|
||||
.oddNumbers {
|
||||
.oddNumbers {
|
||||
margin-bottom: 0.05rem;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -87,8 +87,8 @@
|
|||
</div>
|
||||
</div>
|
||||
<a-empty v-else />
|
||||
<a-modal bodyStyle="padding:0.1rem 0" v-model:visible="detailsVisible" style="width: 900px" :footer="null"
|
||||
destroyOnClose="true" :maskClosable="false">
|
||||
<a-modal bodyStyle="padding:0.1rem 0" v-model:visible="detailsVisible"
|
||||
style="width: 900px" :footer="null" destroyOnClose="true" :maskClosable="false">
|
||||
<template v-slot:title>{{refObj.description && itShowXiHaiAn ? refObj.description + '申请详情' : '申请详情'}}</template>
|
||||
<apply-details :processDefinitionName="processDefinitionName" :businessKey="businessKey"
|
||||
:processInstanceId="processInstanceId" :resourceId="resourceId" :refObj="refObj" :showType="showType">
|
||||
|
@ -100,6 +100,9 @@
|
|||
<a-modal v-model:visible="videoVisible" title="已申请摄像头列表" @ok="videoVisible = false">
|
||||
<a-table :columns="columns" :data-source="xVideoList" bordered :pagination="{ defaultPageSize: 6 }">
|
||||
<template #bodyCell="{ column, text }">
|
||||
<!-- <template>
|
||||
<a>{{ text }}</a>
|
||||
</template> -->
|
||||
</template>
|
||||
</a-table>
|
||||
</a-modal>
|
||||
|
@ -151,7 +154,7 @@ let typeList = ref([
|
|||
])
|
||||
// 西海岸-设备申请
|
||||
let isXiHaiAn = whoShow.itShowXiHaiAn
|
||||
let itShowXiHaiAn = ref(isXiHaiAn)
|
||||
const itShowXiHaiAn = ref(isXiHaiAn)
|
||||
const phoneSate = ref([2, 3])
|
||||
if (isXiHaiAn) {
|
||||
typeList.value.push('设备申请')
|
||||
|
@ -237,7 +240,9 @@ function changeApplyState(item, index) {
|
|||
}
|
||||
}
|
||||
|
||||
const cilckRowData = ref({})
|
||||
const showDetail = (item) => {
|
||||
cilckRowData.value = item;
|
||||
// 西海岸-申请时间过期,提示
|
||||
if (isXiHaiAn) {
|
||||
if (item.expireDate) {
|
||||
|
@ -263,12 +268,9 @@ const showDetail = (item) => {
|
|||
} else if (typeName.value == '设备申请') {
|
||||
getDeviceDetailInfo(item.deviceId)
|
||||
.then((res) => {
|
||||
console.log('res---设备申请--------->', res);
|
||||
|
||||
if (res.data.code == 0) {
|
||||
refObj.value = res.data.data
|
||||
detailsVisible.value = true
|
||||
// processDefinitionName.value = item.processDefinitionName
|
||||
}
|
||||
})
|
||||
.catch((err) => { })
|
||||
|
|
Loading…
Reference in New Issue