合并版本v0.8.2.3

This commit is contained in:
wuhongjian 2022-07-16 16:44:00 +08:00
commit c817f9eefc
59 changed files with 1661 additions and 948 deletions

View File

@ -1,8 +1,8 @@
<!--
* @Author: hisense.wuhongjian
* @Date: 2022-04-11 10:11:40
* @LastEditors: hisense.wuhongjian
* @LastEditTime: 2022-07-12 15:10:54
* @LastEditors: hisense.liangjunhua
* @LastEditTime: 2022-07-15 18:41:00
* @Description: 告诉大家这是什么
-->
<!DOCTYPE html>
@ -44,7 +44,7 @@
// window.SITE_CONFIG['apiURL'] = 'http://15.2.21.166:8888/renren-admin';
// window.SITE_CONFIG['apiURL'] = 'http://124.222.94.39:8888/renren-admin';
// window.SITE_CONFIG['apiURL'] = 'http://10.16.5.35:8888/renren-admin';
window.SITE_CONFIG['apiURL'] = 'http://15.2.21.239:8888/renren-admin';
window.SITE_CONFIG['apiURL'] = 'http://15.2.21.238:8888/renren-admin';
window.SITE_CONFIG['previewUrl'] = 'http://15.2.21.238:9796/';
// window.SITE_CONFIG['apiURL'] = 'http://15.2.23.141:8000/renren-admin';
// WebSocket地址
@ -72,7 +72,7 @@
<script>
// window.SITE_CONFIG['apiURL'] = 'http://124.222.94.39:8888/renren-admin';
window.SITE_CONFIG['previewUrl'] = 'http://15.2.21.243:9796/';
// window.SITE_CONFIG['apiURL'] = 'http://15.2.21.238:8888/renren-admin';
window.SITE_CONFIG['apiURL'] = 'http://15.2.21.243:8888/renren-admin';
// window.SITE_CONFIG['apiURL'] = 'http://15.72.183.90:8000/renren-admin';

View File

@ -1,15 +1,15 @@
<!--
* @Author: hisense.wuhongjian
* @Date: 2022-04-11 16:30:04
* @LastEditors: hisense.wuhongjian
* @LastEditTime: 2022-06-06 13:14:02
* @LastEditors: hisense.liangjunhua
* @LastEditTime: 2022-07-16 15:07:44
* @Description: 告诉大家这是什么
-->
<template>
<el-card shadow="never" class="aui-card--fill">
<!-- 流程图 -->
<h4>{{ $t('process.flowImage') }}</h4>
<img :src="getResourceURL()" class="image">
<!-- <h4>{{ $t('process.flowImage') }}</h4>
<img :src="getResourceURL()" class="image"> -->
<!-- 流转详情 -->
<h4>{{ $t('process.circulation') }}</h4>
<div class="mod-sys__dict">

View File

@ -109,6 +109,11 @@ export default {
}
console.log('数据列表', this.dataList, this.mixinViewModuleOptions.getDataListURL)
if (this.dataList[0].type === '组件服务') {
this.dataList.map(val => {
val.infoList = val.infoList.filter(item => item.attrType === '部署位置' || item.attrType === '组件类型' || item.attrType === '应用领域')
})
}
if (this.mixinViewModuleOptions.requestCallback) {
this.mixinViewModuleOptions.requestCallback(res.data)
}

View File

@ -2,7 +2,7 @@
<div>
<el-dialog :visible.sync="addOrUpdateVisibleCopy" :title="modalType === 'display' ? '能力展示' : '挂接'"
@close="closeModal" :close-on-click-modal="false" :close-on-press-escape="false">
<div v-if="modalType !== 'display'" style="
<div v-show="modalType !== 'display'" style="
text-align: center;
font-weight: 600;
font-size: 18px;
@ -10,7 +10,7 @@
">
填写字段
</div>
<el-checkbox-group v-if="modalType !== 'display'" v-model="checkList" @change="changeBtn"
<el-checkbox-group v-show="modalType !== 'display'" v-model="checkList" @change="changeBtn"
style="margin-bottom: 20px">
<el-checkbox-button v-for="(item, i) in btnList" :label="item.name" :key="i">{{ item.name }}
</el-checkbox-button>
@ -21,7 +21,7 @@
<el-form :model="dataForm" :rules="rules" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()"
:label-width="$i18n.locale === 'en-US' ? '120px' : 'auto'">
<!-- 基本信息 -->
<div style="margin-bottom:20px" v-if="checkList.includes('基本信息')">
<div style="margin-bottom:20px" v-show="checkList.includes('基本信息')">
<div style="
text-align: center;
font-weight: 600;
@ -31,10 +31,10 @@
基本信息
</div>
<el-form-item label="融合服务名称" prop="name">
<el-input v-model="dataForm.name" placeholder="请输入融合服务名称"></el-input>
<el-input class="input-box" v-model="dataForm.name" placeholder="请输入融合服务名称"></el-input>
</el-form-item>
<el-form-item label="融合服务描述" prop="description">
<el-input v-model="dataForm.description" placeholder="请输入融合服务描述"></el-input>
<el-input class="input-box" v-model="dataForm.description" placeholder="请输入融合服务描述"></el-input>
</el-form-item>
<el-form-item label="应用领域" prop="applicationArea">
<el-select v-model="dataForm.applicationArea" placeholder="请选择应用领域" filterable>
@ -43,30 +43,32 @@
</el-select>
</el-form-item>
<el-form-item label="部门联系人" prop="deptUser">
<el-input v-model="dataForm.deptUser" placeholder="请输入部门联系人"></el-input>
<el-input class="input-box" v-model="dataForm.deptUser" placeholder="请输入部门联系人"></el-input>
</el-form-item>
<el-form-item label="部门联系人电话" prop="mobile">
<el-input v-model="dataForm.mobile" placeholder="请输入部门联系人电话"></el-input>
<el-input class="input-box" v-model="dataForm.mobile" placeholder="请输入部门联系人电话"></el-input>
</el-form-item>
<el-form-item label="服务商" prop="provider">
<el-input v-model="dataForm.provider" placeholder="请输入服务商"></el-input>
<el-input class="input-box" v-model="dataForm.provider" placeholder="请输入服务商"></el-input>
</el-form-item>
<el-form-item label="服务商联系人" prop="providerUser">
<el-input v-model="dataForm.providerUser" placeholder="请输入服务商联系人"></el-input>
<el-input class="input-box" v-model="dataForm.providerUser" placeholder="请输入服务商联系人"></el-input>
</el-form-item>
<el-form-item label="服务商联系人电话" prop="providerMobile">
<el-input v-model="dataForm.providerMobile" placeholder="请输入服务商联系人电话"></el-input>
<el-input class="input-box" v-model="dataForm.providerMobile" placeholder="请输入服务商联系人电话"></el-input>
</el-form-item>
</div>
<!-- 组合能力 -->
<div class="" v-if="checkList.includes('组合能力')">
<integrated-combine-ability v-model="dataForm" :dataForm="dataForm" @update="updateDataForm">
<div class="" style="marigin-bottom:40px" v-show="checkList.includes('组合能力')">
<integrated-combine-ability v-model="dataForm" :dataForm="dataForm" @update="updateDataForm" title="组合能力"
ref="combineAbility" :disabledType="modalType === 'display'">
</integrated-combine-ability>
</div>
<!-- 技术文档 -->
<div style="margin-bottom:20px" v-if="checkList.includes('技术文档')">
<div style="margin-bottom:20px" v-show="checkList.includes('技术文档')">
<div style="
text-align: center;
font-weight: 600;
@ -92,8 +94,8 @@
</div>
</div>
<!-- 常见问题 -->
<div v-if="checkList.includes('常见问题')">
<common-question :dataForm="dataForm" @update="updateDataForm"></common-question>
<div v-show="checkList.includes('常见问题')">
<common-question :dataForm="dataForm" @update="updateDataForm" ref="commonQuestion"></common-question>
</div>
</el-form>
</div>
@ -138,6 +140,7 @@ import qs from "qs";
import CommonQuestion from './components/common-question.vue';
import IntegratedCombineAbility from './components/integrated-combine-ability.vue';
import Cookies from 'js-cookie'
import { tableColumns } from './IntegratedServices.vue';
export default {
components: {
@ -158,7 +161,7 @@ export default {
},
{
"attrType": "常见问题",
"attrValue": [{ question: "", answer: "" }],
"attrValue": '[{ question: "", answer: "" }]',
}
],
"fuseResourceList": [
@ -172,11 +175,8 @@ export default {
"provider": "",
"providerMobile": "",
"providerUser": "",
// "updateDate": "",
// "updater": 0,
// "createDate": "",
// "creator": 0,
"deptUser": "",
type: '融合服务'
},
rules: {
name: [
@ -220,16 +220,7 @@ export default {
areaList: [],
fileNameList: [],
addOrUpdateVisibleCopy: this.addOrUpdateVisible,
displayInfo: {
'name': '融合服务名称',
'description': '融合服务描述',
'applicationArea': '应用领域',
'deptUser': '部门联系人',
'mobile': '部门联系人电话',
'provider': '服务商',
'providerMobile': '服务商联系人',
'providerMobile': '服务商联系人电话',
},
displayInfo: tableColumns,
displayListInfo: {
'常见问题': [],
'组合能力': []
@ -257,9 +248,12 @@ export default {
addOrUpdateVisible: {
handler(newVal) {
this.addOrUpdateVisibleCopy = newVal;
if (this.modalType == 'add' && newVal) {
this.getDetail(this.dataForm)
}
},
immediate: true,
}
},
},
mounted() {
//
@ -365,21 +359,24 @@ export default {
getDetail(data) {
this.dataForm = data;
this.$nextTick(() => {
this.$refs.combineAbility && this.$refs.combineAbility.getDataInfo(data)
this.$refs.commonQuestion && this.$refs.commonQuestion.getDataInfo(data)
console.log('this.dataForm----详情-------->', this.dataForm);
})
},
//
getDisPlayData() {
this.$nextTick(() => {
console.log('this.dataForm----重组数据-------->', this.dataForm);
const questionObj = this.dataForm.fuseAttrList.find(v => v.attrType == '常见问题') || {};
let fuseResourceList = this.dataForm.fuseResourceList || [];
let arr = []
fuseResourceList.map(v => {
arr.push({
name: v.resource.name,
type: v.resource.type,
})
if (v.resource) {
arr.push({
name: v.resource.name,
type: v.resource.type,
})
}
})
this.displayListInfo['常见问题'] = JSON.parse(questionObj.attrValue || '[]')
this.displayListInfo['组合能力'] = arr
@ -496,4 +493,8 @@ export default {
color: #606266;
line-height: 32px;
}
.input-box {
width: 90%;
}
</style>

View File

@ -21,26 +21,9 @@
</el-form>
<el-table v-loading="dataListLoading" :data="dataList" border @selection-change="dataListSelectionChangeHandle"
style="width: 100%" :height="qp ? '810px' : '650px'">
<el-table-column prop="name" label="融合服务名称" header-align="center" align="center"></el-table-column>
<el-table-column prop="description" label="融合服务描述" header-align="center" align="center"></el-table-column>
<el-table-column prop="provider" label="服务商" header-align="center" align="center"></el-table-column>
<el-table-column prop="providerUser" label="服务商联系人" header-align="center" align="center"></el-table-column>
<el-table-column prop="providerMobile" label="服务商联系人电话" header-align="center" align="center"></el-table-column>
<el-table-column prop="applicationArea" label="应用领域" header-align="center" align="center"></el-table-column>
<el-table-column prop="deptId" label="所属部门" header-align="center" align="center"></el-table-column>
<el-table-column prop="deptUser" label="部门联系人" header-align="center" align="center"></el-table-column>
<el-table-column prop="mobile" label="部门联系人电话" header-align="center" align="center"></el-table-column>
<el-table-column :label="$t('handle')" fixed="right" header-align="center" align="center" width="94" right="0">
<el-table-column v-for="(item) in Object.keys(tableColumns)" :key="item" :prop="item" label="融合服务名称"
header-align="center" align="center"></el-table-column>
<el-table-column :label="$t('handle')" fixed="right" header-align="center" align="center" width="240" right="0">
<template slot-scope="scope">
<el-button v-if="$hasPermission('ability:bsabilityai:update')" type="text" size="small"
@click="handleUpdate(scope.row)">{{ $t("update") }}</el-button>
@ -61,9 +44,7 @@
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="query" @closeModal="closeModal"
:addOrUpdateVisible="addOrUpdateVisible" :modalType="modalType">
</add-or-update>
<relate-application v-if="relateApplicationResourceVisible" ref="relateApplication" :relateInfo="relationData"
:nameArray="topNameArray" @isShowRelatePopup="handleIsShowRelatePopupApply"></relate-application>
<show-child v-if="showData" :tableData="tableData" :childName="childName" :isShow="showData"></show-child>
</div>
</el-card>
</template>
@ -71,20 +52,28 @@
<script>
import mixinViewModule from "@/mixins/view-module";
import AddOrUpdate from "./IntegratedServices-add";
import dictionaries from "@/utils/dictionaries";
import RelateApplication from "./bsabilityai-relate-application.vue";
import showChild from './showChild.vue'
import qs from "qs";
import { type } from "os";
export const tableColumns = {
'name': '融合服务名称',
'description': '融合服务描述',
'provider': '服务商',
'providerUser': '服务商联系人',
'providerMobile': '服务商联系人电话',
'applicationArea': '应用领域',
'deptId': '所属部门',
'deptUser': '部门联系人',
'mobile': '部门联系人电话',
}
export default {
mixins: [mixinViewModule],
data() {
return {
// --
tableColumns: tableColumns,
tableData: [],
showData: false,
childName: '',
mixinViewModuleOptions: {
getDataListURL: "/fuse/page",
exportURL: "/ability/bsabilityai/export",
@ -92,27 +81,18 @@ export default {
getDataListIsPage: true,
deleteIsBatch: false,
},
disabled: false,
sceneArr: dictionaries.sceneArr,
fieldArr: dictionaries.fieldArr,
shareFormArr: dictionaries.shareFormArr,
dataForm: {
name: "",
order: 'desc',
orderField: 'create_date',
type: '融合服务'
},
qp: false,
relateApplicationResourceVisible: false,
relationData: {}, //穿
topNameArray: [], //
modalType: 'add',
};
},
watch: {},
components: {
AddOrUpdate,
RelateApplication,
showChild,
},
mounted() {
window.addEventListener("resize", this.a);
@ -121,7 +101,7 @@ export default {
methods: {
deleteRow(id) {
this.$http.delete('/fuse/delete', {
data: [id]
data: [id]
}).then(res => {
console.log('删除成功', res)
if (res.data.code !== 0) {
@ -154,7 +134,6 @@ export default {
this.modalType = 'update';
const cloneVal = JSON.parse(JSON.stringify(val))
this.$nextTick(() => {
// this.$refs.addOrUpdate.dataForm = cloneVal;
this.$refs.addOrUpdate.getDetail(cloneVal)
})
},
@ -183,50 +162,26 @@ export default {
"_blank"
);
},
// findValue(list, type) {
// const found = list.find((item) => item.attrType === type);
// if (found) {
// return found.attrValue;
// } else {
// return "";
// }
// },
fullScreen() {
if (window.outerHeight === screen.availHeight) {
if (window.outerWidth === screen.availWidth) {
console.log(
"全屏1",
window.outerHeight,
screen.availHeight,
window.outerWidth,
screen.availWidth
);
this.qp = false;
} else {
console.log(
"不是全屏2",
window.outerHeight,
screen.availHeight,
window.outerWidth,
screen.availWidth
);
this.qp = true;
}
} else {
console.log(
"不是全屏3",
window.outerHeight,
screen.availHeight,
window.outerWidth,
screen.availWidth
);
this.qp = true;
}
},
//
handleIsShowRelatePopupApply(type) {
this.relateApplicationResourceVisible = type;
},
},
};
</script>

View File

@ -1,7 +1,7 @@
<template>
<div>
<el-dialog :visible.sync="addOrUpdateVisibleCopy" :title="modalType === 'display' ? '能力展示' : '挂接'"
@close="closeModal" :close-on-click-modal="false" :close-on-press-escape="false">
<el-dialog :visible.sync="addOrUpdateVisibleCopy" :title="modalTypeText[modalType]" @close="closeModal"
:close-on-click-modal="false" :close-on-press-escape="false">
<div v-if="modalType !== 'display'" style="
text-align: center;
font-weight: 600;
@ -16,12 +16,12 @@
</el-checkbox-button>
</el-checkbox-group>
<!-- 挂载和修改-->
<div key="1" v-if="modalType !== 'display'">
<el-form :model="dataForm" :rules="rules" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()"
:label-width="$i18n.locale === 'en-US' ? '120px' : 'auto'">
<!-- 挂载和修改 -->
<div key="1">
<el-form v-if="modalType !== 'display'" :model="dataForm" :rules="rules" ref="dataForm"
@keyup.enter.native="dataFormSubmitHandle()" :label-width="$i18n.locale === 'en-US' ? '120px' : 'auto'">
<!-- 基本信息 -->
<div style="margin-bottom:20px" v-if="checkList.includes('基本信息')">
<div style="margin-bottom:40px" v-show="checkList.includes('基本信息')">
<div style="
text-align: center;
font-weight: 600;
@ -30,62 +30,46 @@
">
基本信息
</div>
<el-form-item label="融合服务名称" prop="name">
<el-input v-model="dataForm.name" placeholder="请输入融合服务名称"></el-input>
<el-form-item label="名称" prop="name">
<el-input v-model="dataForm.name" placeholder="请输入名称" :disabled="modalType === 'display'" style="width:90%"></el-input>
</el-form-item>
<el-form-item label="融合服务描述" prop="description">
<el-input v-model="dataForm.description" placeholder="请输入融合服务描述"></el-input>
</el-form-item>
<el-form-item label="应用领域" prop="applicationArea">
<el-select v-model="dataForm.applicationArea" placeholder="请选择应用领域" filterable>
<el-option v-for="item in areaList" :key="item.value" :label="item.label" :value="item.value">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="部门联系人" prop="deptUser">
<el-input v-model="dataForm.deptUser" placeholder="请输入部门联系人"></el-input>
</el-form-item>
<el-form-item label="部门联系人电话" prop="mobile">
<el-input v-model="dataForm.mobile" placeholder="请输入部门联系人电话"></el-input>
</el-form-item>
<el-form-item label="服务商" prop="provider">
<el-input v-model="dataForm.provider" placeholder="请输入服务商"></el-input>
</el-form-item>
<el-form-item label="服务商联系人" prop="providerUser">
<el-input v-model="dataForm.providerUser" placeholder="请输入服务商联系人"></el-input>
</el-form-item>
<el-form-item label="服务商联系人电话" prop="providerMobile">
<el-input v-model="dataForm.providerMobile" placeholder="请输入服务商联系人电话"></el-input>
<el-form-item label="描述" prop="description">
<el-input type="textarea" :rows="3" v-model="dataForm.description" placeholder="请输入描述" style="width:90%"
:disabled="modalType === 'display'"></el-input>
</el-form-item>
</div>
<!-- 关联能力 -->
<div class="" v-if="checkList.includes('关联能力')">
<integrated-combine-ability v-model="dataForm" :dataForm="dataForm" @update="updateDataForm">
<div class="" style="marigin-bottom:40px" v-show="checkList.includes('关联能力')">
<integrated-combine-ability v-model="dataForm" :dataForm="dataForm" @update="updateDataForm" title="关联能力"
ref="combineAbility" :disabledType="modalType === 'display'">
</integrated-combine-ability>
</div>
<!-- 使用步骤 -->
<div v-if="checkList.includes('使用步骤')">
<common-question :dataForm="dataForm" @update="updateDataForm"></common-question>
<div style="marigin-bottom:20px" v-show="checkList.includes('使用步骤')">
<scene-use-step :dataForm="dataForm" @update="updateDataForm" :disabledType="modalType === 'display'"
ref="sceneUseUp">
</scene-use-step>
</div>
</el-form>
</div>
<!-- 展示 -->
<el-form key="2" class="detial-form" v-else :label-width="$i18n.locale === 'en-US' ? '120px' : 'auto'">
<el-form key="2" v-if="modalType === 'display'" class="detial-form"
:label-width="$i18n.locale === 'en-US' ? '120px' : 'auto'">
<el-form-item :label="displayInfo[data]" v-for="(data, i) in Object.keys(displayInfo)" :key="i" :prop="data">
{{ dataForm[data] || "--" }}
</el-form-item>
<div v-for="(data, i) in displayListInfo['使用步骤']" :key="`${i}${JSON.stringify(data)}`">
<el-form-item :label="`使用步骤${i + 1}`">
<div class="group-box" v-for="(data, i) in displayListInfo['使用步骤']" :key="`${i}${JSON.stringify(data)}`">
<el-form-item :label="`使用步骤标题${i + 1}`">
{{ `${data['question']}` }}
</el-form-item>
<el-form-item :label="`问题描述${i + 1}`">
<el-form-item :label="`描述${i + 1}`">
{{ `${data['answer']} ` }}
</el-form-item>
</div>
<div v-for="(data, i) in displayListInfo['关联能力']" :key="`${i}${JSON.stringify(data)}`">
<div class="group-box" v-for="(data, i) in displayListInfo['关联能力']" :key="`${i}${JSON.stringify(data)}`">
<el-form-item :label="`能力类别${i + 1}`">
{{ `${data['type']}` }}
</el-form-item>
@ -109,13 +93,13 @@
<script>
import debounce from "lodash/debounce";
import qs from "qs";
import CommonQuestion from '../components/common-question.vue';
import SceneUseStep from '../components/scene-use-step.vue';
import IntegratedCombineAbility from '../components/integrated-combine-ability.vue';
import Cookies from 'js-cookie'
export default {
components: {
CommonQuestion,
SceneUseStep,
IntegratedCombineAbility,
},
data() {
@ -126,10 +110,6 @@ export default {
"applicationArea": "",
"description": "",
"fuseAttrList": [
// {
// "attrType": "",
// "attrValue": "",
// },
{
"attrType": "使用步骤",
"attrValue": [{ question: "", answer: "" }],
@ -137,7 +117,7 @@ export default {
],
"fuseResourceList": [
{
"resourceId": 0,
"resourceId": '',
"sequence": ""
}
],
@ -183,7 +163,6 @@ export default {
],
checkList: ['基本信息', '关联能力', '使用步骤'],
areaList: [],
fileNameList: [],
addOrUpdateVisibleCopy: this.addOrUpdateVisible,
displayInfo: {
'name': '名称',
@ -193,6 +172,11 @@ export default {
'使用步骤': [],
'关联能力': []
},
modalTypeText: {
add: '挂接',
display: '能力展示',
update: '修改'
}
};
},
props: {
@ -216,6 +200,9 @@ export default {
addOrUpdateVisible: {
handler(newVal) {
this.addOrUpdateVisibleCopy = newVal;
if (this.modalType == 'add' && newVal) {
this.getDetail(this.dataForm)
}
},
immediate: true,
}
@ -244,7 +231,6 @@ export default {
changeBtn(data) {
this.checkList = data;
},
//
dataFormSubmitHandle: debounce(
function () {
@ -293,21 +279,24 @@ export default {
getDetail(data) {
this.dataForm = data;
this.$nextTick(() => {
this.$refs.combineAbility && this.$refs.combineAbility.getDataInfo(data)
this.$refs.sceneUseUp && this.$refs.sceneUseUp.getDataInfo(data)
console.log('this.dataForm----详情-------->', this.dataForm);
})
},
//
getDisPlayData() {
this.$nextTick(() => {
console.log('this.dataForm----重组数据-------->', this.dataForm);
const questionObj = this.dataForm.fuseAttrList.find(v => v.attrType == '使用步骤') || {};
let fuseResourceList = this.dataForm.fuseResourceList || [];
let arr = []
fuseResourceList.map(v => {
arr.push({
name: v.resource.name,
type: v.resource.type,
})
if (v.resource) {
arr.push({
name: v.resource.name,
type: v.resource.type,
})
}
})
this.displayListInfo['使用步骤'] = JSON.parse(questionObj.attrValue || '[]')
this.displayListInfo['关联能力'] = arr
@ -424,4 +413,8 @@ export default {
color: #606266;
line-height: 32px;
}
.group-box {
// margin-bottom: 10px;
}
</style>

View File

@ -26,18 +26,16 @@
<el-table-column prop="description" label="描述" header-align="center" align="center"></el-table-column>
<el-table-column :label="$t('handle')" fixed="right" header-align="center" align="center" width="94" right="0">
<el-table-column :label="$t('handle')" fixed="right" header-align="center" align="center" width="300" right="0">
<template slot-scope="scope">
<el-button v-if="$hasPermission('ability:bsabilityai:update')" type="text" size="small"
@click="handleUpdate(scope.row)">{{ $t("update") }}</el-button>
<el-button v-if="$hasPermission('ability:bsabilityai:delete')" type="text" size="small"
@click="deleteRow(scope.row.id)">{{ $t("delete") }}</el-button>
<el-button type="text" size="small" @click="showDetail(scope.row)">能力展示</el-button>
<el-button type="text" size="small" @click="showDocument(scope.row)">技术文档</el-button>
</template>
</el-table-column>
</el-table>
<el-pagination :current-page="page" :page-sizes="[10, 20, 50, 100]" :page-size="limit" :total="Number(total)"
layout="total, sizes, prev, pager, next, jumper" @size-change="pageSizeChangeHandle"
@current-change="pageCurrentChangeHandle">
@ -54,7 +52,6 @@
<script>
import mixinViewModule from "@/mixins/view-module";
import AddUpdateScene from "./add-update-scene";
// import dictionaries from "@/utils/dictionaries";
export default {
mixins: [mixinViewModule],
@ -70,9 +67,6 @@ export default {
deleteIsBatch: false,
},
disabled: false,
// sceneArr: dictionaries.sceneArr,
// fieldArr: dictionaries.fieldArr,
// shareFormArr: dictionaries.shareFormArr,
dataForm: {
name: "",
order: 'desc',
@ -80,13 +74,9 @@ export default {
type: '赋能场景'
},
qp: false,
// relateApplicationResourceVisible: false,
// relationData: {}, //穿
// topNameArray: [], //
modalType: 'add',
};
},
watch: {},
components: {
AddUpdateScene,
},
@ -97,7 +87,7 @@ export default {
methods: {
deleteRow(id) {
this.$http.delete('/fuse/delete', {
data: [id]
data: [id]
}).then(res => {
console.log('删除成功', res)
if (res.data.code !== 0) {
@ -130,7 +120,6 @@ export default {
this.modalType = 'update';
const cloneVal = JSON.parse(JSON.stringify(val))
this.$nextTick(() => {
// this.$refs.addOrUpdate.dataForm = cloneVal;
this.$refs.addOrUpdate.getDetail(cloneVal)
})
},
@ -152,41 +141,22 @@ export default {
this.$refs.addOrUpdate.getDisPlayData()
})
},
showDocument(val) {
console.log(val);
window.open(
window.SITE_CONFIG.frontUrl + "?id=" + val.id + "&&type=" + val.type,
"_blank"
);
},
fullScreen() {
if (window.outerHeight === screen.availHeight) {
if (window.outerWidth === screen.availWidth) {
console.log(
"全屏1",
window.outerHeight,
screen.availHeight,
window.outerWidth,
screen.availWidth
);
this.qp = false;
} else {
console.log(
"不是全屏2",
window.outerHeight,
screen.availHeight,
window.outerWidth,
screen.availWidth
);
this.qp = true;
}
} else {
console.log(
"不是全屏3",
window.outerHeight,
screen.availHeight,
window.outerWidth,
screen.availWidth
);
this.qp = true;
}

View File

@ -69,6 +69,14 @@
header-align="center"
align="center"
></af-table-column>
<af-table-column
:show-overflow-tooltip="true"
width="280"
prop="shareCondition"
label="共享条件"
header-align="center"
align="center"
></af-table-column>
<af-table-column
:show-overflow-tooltip="true"
width="300"
@ -273,6 +281,7 @@ export default {
this.dataList = this.mixinViewModuleOptions.getDataListIsPage
? res.data.list
: res.data
console.log('this.dataList', this.dataList)
this.total = this.mixinViewModuleOptions.getDataListIsPage
? res.data.total
: 0
@ -510,45 +519,45 @@ export default {
})
})
this.submitFrom.infoList = this.submitFrom.infoList.sort((a, b) => arr.indexOf(a.attrType) - arr.indexOf(b.attrType))
// if (this.submitFrom.id) {
// //
// this.submitFrom.infoList.map(val => {
// if (val.attrType === '') {
// val.attrValue = this.radio
// }
// })
// console.log('===============>', this.submitFrom)
// console.log(this.submitFrom.infoList, '===============abc')
// //
// const newArr = this.submitFrom.infoList.filter((element, index, self) => {
// return self.findIndex(x => x.attrType === element.attrType) === index
// })
// this.submitFrom.infoList = newArr
// console.log(this.submitFrom.infoList, '====================================wpwpwp')
// this.$http
// .put('/resource/update', this.submitFrom)
// .then(({ data: res }) => {
// if (res.code !== 0) {
// this.$message.error('!')
// } else {
// this.$message.success('')
// this.clear()
// }
// })
// .catch(() => {})
// } else {
// this.$http
// .post('/resource/insert?source= b', this.submitFrom)
// .then(({ data: res }) => {
// if (res.code !== 0) {
// this.$message.error('!')
// } else {
// this.$message.success('')
// this.clear()
// }
// })
// .catch(() => {})
// }
if (this.submitFrom.id) {
//
this.submitFrom.infoList.map(val => {
if (val.attrType === '组件类型') {
val.attrValue = this.radio
}
})
console.log('编辑===============>', this.submitFrom)
console.log(this.submitFrom.infoList, '===============abc')
//
const newArr = this.submitFrom.infoList.filter((element, index, self) => {
return self.findIndex(x => x.attrType === element.attrType) === index
})
this.submitFrom.infoList = newArr
console.log(this.submitFrom.infoList, '====================================wpwpwp')
this.$http
.put('/resource/update', this.submitFrom)
.then(({ data: res }) => {
if (res.code !== 0) {
this.$message.error('修改失败!')
} else {
this.$message.success('修改成功!')
this.clear()
}
})
.catch(() => {})
} else {
this.$http
.post('/resource/insert?source= b', this.submitFrom)
.then(({ data: res }) => {
if (res.code !== 0) {
this.$message.error('上架失败!')
} else {
this.$message.success('上架成功!')
this.clear()
}
})
.catch(() => {})
}
},
//
UpdateData (item) {

View File

@ -8,11 +8,13 @@
<el-input v-model="item.question" placeholder="请输入问题名称" style="width:90%"></el-input>
</el-form-item>
<el-form-item label="问题描述" prop="question">
<el-input v-model="item.answer" placeholder="请输入问题描述" style="width:90%"></el-input>
<el-button style="margin-left:10px" @click="deleteItem(index)" type="danger" size="small">删除
<el-input type="textarea" :rows="2" v-model="item.answer" placeholder="请输入问题描述" style="width:90%">
</el-input>
<el-button style="margin-left:10px" @click="deleteItem(index)" type="danger" size="small"
v-if="dataInfo.length > 1">删除
</el-button>
</el-form-item>
<el-button style="margin-left:120px" size="small" v-if="index == dataInfo.length - 1" @click="addItem"
<el-button style="margin-left:70px" size="small" v-if="index == dataInfo.length - 1" @click="addItem"
type="primary">添加
</el-button>
</div>
@ -43,33 +45,22 @@ export default {
deep: true,
immediate: true,
},
dataForm: {
handler(newVal, oldVal) {
//
if (JSON.stringify(newVal) != JSON.stringify(oldVal)) {
this.dataForm = newVal;
this.getDataInfo();
}
},
deep: true,
immediate: true,
}
},
methods: {
getDataInfo() {
getDataInfo(dataForm) {
let arr = []
let fuseAttrList = this.dataForm.fuseAttrList || [];
let obj = fuseAttrList.find(v => v.attrType === '常见问题') || {}
console.log('obj-------常见问题----->', obj);
let attrValue = JSON.parse(obj.attrValue)
if (attrValue.length > 0) {
attrValue.map(v => {
arr.push({
question: v.question,
answer: v.answer,
if (dataForm && (dataForm.id || dataForm.id === 0)) {
let fuseAttrList = dataForm.fuseAttrList || [];
let obj = fuseAttrList.find(v => v.attrType === '常见问题') || {}
let attrValue = JSON.parse(obj.attrValue || "[]")
if (attrValue.length > 0) {
attrValue.map(v => {
arr.push({
question: v.question,
answer: v.answer,
})
})
})
}
} else {
arr = []
arr.push({
@ -95,8 +86,6 @@ export default {
</script>
<style lang="scss" scoped>
.question-box {
margin-bottom: 20px;
.title {
text-align: center;
font-weight: 600;

View File

@ -2,25 +2,32 @@
<template>
<div class="content-box">
<div class="title">
组合能力
{{ title }}
</div>
<div v-for="(item, index) in dataInfo" :key="index">
<el-form-item label="能力类别" prop="">
<el-select v-model="item.type" placeholder="请选择能力类别" @change="(data) => changeType(data, item, index)">
<el-option v-for="val in typeOptions" :key="val.value" :label="val.value" :value="val.value">
</el-option>
</el-select>
<el-select style="margin-left: 20px" v-model="item.name" placeholder="请选择能力" filterable>
<el-option v-for="val in item.abilityOptions" :key="val.id" :label="val.name" :value="val.id">
</el-option>
</el-select>
<el-button style="margin-left:10px" @click="deleteItem(dataInfo, index)" type="danger" size="small">删除
</el-button>
<el-button style="margin-left:10px" size="small" v-if="index == dataInfo.length - 1"
<div class="no-data loading-box" v-loading="loading" v-if="loading">
</div>
<div v-if="!loading">
<div v-for="(item, index) in dataInfo" :key="index">
<el-form-item label="能力类别" prop="">
<el-select v-model="item.type" placeholder="请选择能力类别" @change="(data) => filterSelect(data, item)"
:disabled="disabledType">
<el-option v-for="val in typeOptions" :key="val.value" :label="val.value" :value="val.value">
</el-option>
</el-select>
<el-select class="ability-input" style="margin-left: 20px;max-width:530px" v-model="item.resourceId"
placeholder="请选择能力" filterable :disabled="disabledType">
<el-option style="max-width:530px" v-for="val in item.abilityOptions" :key="val.id"
:label="val.name || '--'" :value="val.id">
</el-option>
</el-select>
<el-button style="margin-left:10px" @click="deleteItem(dataInfo, index)" type="danger" size="small"
v-if="!disabledType && dataInfo.length > 1">删除
</el-button>
</el-form-item>
<el-button style="margin-left:70px" size="small" v-if="!disabledType && index == dataInfo.length - 1"
@click="addItem(dataInfo, 0)" type="primary">添加
</el-button>
</el-form-item>
</div>
</div>
</div>
</template>
@ -31,6 +38,15 @@ export default {
type: Object,
default: () => { }
},
title: {
type: String,
default: '组合能力'
},
//
disabledType: {
type: Boolean,
default: false
},
},
data() {
return {
@ -51,7 +67,9 @@ export default {
value: '知识库',
},
],
dataInfo: []
dataInfo: [],
abilityArrayCopy: [],
loading: false,
}
},
watch: {
@ -61,56 +79,52 @@ export default {
let arr = newVal.map((v, index) => {
return {
sequence: index,
resourceId: v.name
resourceId: v.resourceId,
}
})
this.$emit('update', {
title: '组合能力',
title: this.title,
list: arr
})
},
deep: true,
immediate: true,
},
dataForm: {
handler(newVal, oldVal) {
//
if (JSON.stringify(newVal) !== JSON.stringify(oldVal)) {
this.dataForm = newVal;
this.getDataInfo();
}
},
deep: true,
immediate: true,
}
},
mounted() {
},
methods: {
getDataInfo() {
async getDataInfo(dataForm) {
await this.getAbility()
let arr = []
let attrValue = this.dataForm.fuseResourceList || []
let attrValue = dataForm.fuseResourceList || []
if (attrValue.length > 0) {
attrValue.map(v => {
arr.push({
let _obj = {
type: v.resource && v.resource.type,
name: v.resourceId,
abilityOptions: []
})
resourceId: v.resourceId,
}
this.filterSelect(v.resource && v.resource.type, _obj)
arr.push(_obj)
})
} else {
arr = []
arr.push({
type: "",
name: "",
resourceId: "",
abilityOptions: []
})
}
this.dataInfo = arr;
this.$nextTick(() => {
console.log(999, this.dataInfo)
})
},
//
addItem(list) {
list.push({
type: "",
name: "",
resourceId: "",
abilityOptions: []
})
},
@ -119,27 +133,32 @@ export default {
list.splice(index, 1)
},
//
getAbility(type = '', item) {
this.$http.get(`/resource/list`, {
params: {
type: type
}
}).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
let arr = res.data || []
let selectArray = this.dataInfo.map(v => v.name) || [];
//
item.abilityOptions = arr.filter(v => !selectArray.includes(v.id))
}).catch((err) => {
this.$message.error(err)
getAbility() {
return new Promise((resolve, reject) => {
this.abilityArrayCopy = []
this.loading = true;
this.$http.get(`/resource/list`, {}).then(({ data: res }) => {
this.loading = false;
if (res.code !== 0) {
return this.$message.error(res.msg)
}
this.abilityArrayCopy = res.data || []
resolve(res)
}).catch((err) => {
this.loading = false;
this.$message.error(err)
reject(err)
})
})
},
changeType(data, item) {
this.getAbility(data, item)
},
filterSelect(type, item) {
let arr = this.abilityArrayCopy.filter(v => v.type == type)
let selectArray = this.dataInfo.map(v => v.resourceId) || [];
//
item.abilityOptions = arr.filter(v => !selectArray.includes(v.id))
console.log('abilityOptions------------>', item.abilityOptions);
},
}
}
</script>
@ -154,4 +173,13 @@ export default {
margin-bottom: 10px;
}
}
.loading-box {
width: 100%;
height: 100px;
}
.ability-input {
width: calc(100% - 300px);
}
</style>

View File

@ -1,21 +1,34 @@
<template>
<div class="question-box">
<div class="title">
常见问题
能力使用步骤
</div>
<div v-for="(item, index) in dataInfo" :key="index">
<el-form-item label="问题名称" prop="question">
<el-input v-model="item.question" placeholder="请输入问题名称" style="width:90%"></el-input>
<el-form-item label="标题" prop="question">
<el-input v-model="item.question" placeholder="请输入标题" style="width:90%" :disabled="disabledType">
</el-input>
</el-form-item>
<el-form-item label="问题描述" prop="question">
<el-input v-model="item.answer" placeholder="请输入问题描述" style="width:90%"></el-input>
<el-button style="margin-left:10px" @click="deleteItem(index)" type="danger" size="small">删除
<el-form-item label="解释说明" prop="question">
<el-input type="textarea" :rows="3" v-model="item.answer" placeholder="请输入解释说明" style="width:90%"
:disabled="disabledType">
</el-input>
<el-button style="margin-left:10px" @click="deleteItem(index)" type="danger" size="small"
v-if="!disabledType && dataInfo.length > 1">删除
</el-button>
</el-form-item>
<el-button style="margin-left:120px" size="small" v-if="index == dataInfo.length - 1" @click="addItem"
type="primary">添加
<el-button style="margin-left:70px" size="small" v-if="!disabledType && index == dataInfo.length - 1"
@click="addItem" type="primary">添加
</el-button>
</div>
<div class="step-box">
<el-steps :active="2">
<el-step status="finish" :title="item.question || `标题${index + 1}`" v-for="(item, index) in dataInfo"
:key="index">
</el-step>
</el-steps>
</div>
</div>
</template>
<script>
@ -24,7 +37,12 @@ export default {
dataForm: {
type: Object,
default: () => { }
}
},
//
disabledType: {
type: Boolean,
default: false
},
},
data() {
return {
@ -36,32 +54,20 @@ export default {
handler(newVal) {
this.dataInfo = newVal;
this.$emit('update', {
title: '常见问题',
title: '使用步骤',
list: newVal
})
},
deep: true,
immediate: true,
},
dataForm: {
handler(newVal, oldVal) {
//
if (JSON.stringify(newVal) != JSON.stringify(oldVal)) {
this.dataForm = newVal;
this.getDataInfo();
}
},
deep: true,
immediate: true,
}
},
methods: {
getDataInfo() {
getDataInfo(dataForm) {
let arr = []
let fuseAttrList = this.dataForm.fuseAttrList || [];
let obj = fuseAttrList.find(v => v.attrType === '常见问题') || {}
console.log('obj-------常见问题----->', obj);
let attrValue = JSON.parse(obj.attrValue)
let fuseAttrList = dataForm.fuseAttrList || [];
let obj = fuseAttrList.find(v => v.attrType === '使用步骤') || {}
let attrValue = JSON.parse(obj.attrValue || "[]")
if (attrValue.length > 0) {
attrValue.map(v => {
@ -96,6 +102,7 @@ export default {
<style lang="scss" scoped>
.question-box {
margin-bottom: 20px;
margin-top: 40px;
.title {
text-align: center;
@ -104,4 +111,8 @@ export default {
margin-bottom: 10px;
}
}
.step-box {
padding: 20px 10px 10px 10px;
}
</style>

View File

@ -72,16 +72,17 @@ export default {
})
},
getInfo (id) {
this.$http.get('/resourceMountApply/' + id).then(({ data: res }) => {
this.$http.get('/demandComment/' + id).then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
this.dataForm = res.data.resourceDTO
if (this.dataForm.type != '应用资源') {
this.shifoushizujian = false
} else {
this.shifoushizujian = true
}
this.dataForm = res.data
// this.dataForm = res.data.resourceDTO
// if (this.dataForm.type != '') {
// this.shifoushizujian = false
// } else {
// this.shifoushizujian = true
// }
console.log('this.dataForm', this.dataForm)
})
}

View File

@ -1,8 +1,8 @@
<!--
* @Author: hisense.wuhongjian
* @Date: 2022-04-27 19:34:30
* @LastEditors: hisense.wuhongjian
* @LastEditTime: 2022-06-23 21:08:01
* @LastEditors: hisense.liangjunhua
* @LastEditTime: 2022-07-16 11:40:26
* @Description: 告诉大家这是什么
-->
<template>
@ -40,6 +40,17 @@
align="center"
width="50"
></el-table-column>
<!-- <el-table-column label="申请标题" header-align="center" align="center">
<template slot-scope="scope">
<span>{{
(scope.row.params && scope.row.params.tAbilityApplicationDTOList && scope.row.params.tAbilityApplicationDTOList[0].title) ||
(scope.row.params && scope.row.params.comment) ||
(scope.row.params && scope.row.params.userName) ||
(scope.row.params && scope.row.params.undercarriageUserName)||
(scope.row.params && scope.row.params.name)
}}</span>
</template>
</el-table-column> -->
<el-table-column label="申请人" header-align="center" align="center">
<template slot-scope="scope">
<span>{{

View File

@ -19,7 +19,7 @@ js:
<a-input v-if="type == 'input'" v-model:value="data.note1" :placeholder="'请输入' + name" />
<!-- 下拉框 -->
<el-select
v-else-if="(type === 'select' && name !== '归属部门') || type == 'radio'"
v-else-if="(type === 'select' && name !== '归属部门' && name !== '使用方式') || type == 'radio'"
style="width: 240px"
v-model:value="data.note1"
:placeholder="'请选择' + name">
@ -45,6 +45,20 @@ js:
{{ itemSelect.name }}
</el-option>
</el-select>
<el-select
v-else-if="(type === 'select' && name === '使用方式')"
style="width: 240px"
v-model:value="data.note1"
:placeholder="'请选择' + name"
@change="showTypeClick"
>
<el-option
:value="itemSelect.dictLabel"
v-for="(itemSelect, indexSelect) in options"
:key="indexSelect">
{{ itemSelect.dictLabel }}
</el-option>
</el-select>
<!-- 多选 -->
<div
v-else-if="type === 'checkBox'"
@ -89,7 +103,8 @@ export default {
valueCheckBox: [],
//
regionSelect: '',
showKey: 0
showKey: 0,
showType: ''
}
},
methods: {
@ -157,6 +172,11 @@ export default {
}
})
this.data.note1 = str
},
showTypeClick (e) {
this.showType = e
console.log(e)
this.$emit('show-type', this.showType)
}
},
created () {
@ -172,6 +192,7 @@ export default {
},
mounted () {
this.selectOptions()
this.showTypeClick('调用接口')
}
}
</script>

View File

@ -36,8 +36,8 @@
<div class="add">添加更多{{ configure.name }}</div>
<div class="form" v-for="(val, index) in configure.list" :key="'key3' + val.name + index">
<span>{{ val.name }}</span>
<!-- <a-input v-model:value="val.note1" ::maxlength="24" placeholder="'请填写' + val.name + ',不超过24个字符'"
v-if="val.type == 'input'"/> -->
<a-input v-model:value="val.note1" ::maxlength="24" :placeholder="'请填写' + val.name + ',不超过24个字符'"
v-if="val.type == 'input'"/>
<template v-if="val.type == 'input2'">
<a-input
v-model:value="val.note1"

View File

@ -11,7 +11,16 @@
<div v-for='child in parent.children' :key='child.id'>
<template v-if='judgmentType.filter(item => item.name==child.name).length === 0'>
<div class="top">{{child.name}}</div>
<div v-for="item in child.children" :key="item.id" class='item' v-show="item.name != '来源应用' && item.name != '关联组件信息' && item.name != '技术文档'">
<div v-for="item in child.children" :key="item.id" class='item' v-show="(item.name != '来源应用' && item.name != '关联组件信息' && item.name != '技术文档') && !(
(showTypeName == '调用接口' && item.name == '平台地址') ||
(showTypeName == '调用接口' && item.name == 'SDK安装包') ||
(showTypeName == '平台对接' && item.name == 'SDK安装包') ||
(showTypeName == '平台对接' && item.name == '接口请求方式') ||
(showTypeName == '平台对接' && item.name == '服务接口') ||
(showTypeName == 'SDK' && item.name == '平台地址') ||
(showTypeName == 'SDK' && item.name == '接口请求方式') ||
(showTypeName == 'SDK' && item.name == '服务接口')
)">
<span >{{ item.name }}</span>
<!-- <upload :list="[]" v-if="item.type == 'image'" type="图片" btnName="上传图片" :maxCount="1" :data="item"
tip="支持图片类型大小不超过100M"></upload> -->
@ -23,10 +32,12 @@
tip="支持文件类型大小不超过100M"></upload>
<upload @changeInfoList='changeInfoList' :title='item.name' accept='.mp4' :list="item" v-else-if="item.type == 'video'" type="视频" btnName="上传视频" :maxCount="1" :dataList="item"
tip="支持视频类型大小不超过100M"></upload>
<upload @changeInfoList='changeInfoList' :title='item.name' accept='.zip' :list="item" v-else-if="item.type == 'package'" type="安装包" btnName="上传安装包" :maxCount="1" :dataList="item"
tip="支持.zip类型大小不超过100M"></upload>
<input-select-checkbox :list="[]" v-else-if="item.type == 'AbilityType'" type="disabled" :data="item" :name="item.name" :value="typeInput"></input-select-checkbox>
<input-select-checkbox :list="[]" v-else-if="item.type == 'ComponentType'" type="disabled" :data="item" :name="item.name" :value="type"></input-select-checkbox>
<input-select-checkbox :list="[]" v-else-if="item.type == 'input'" type="input" :data="item" :name="item.name"></input-select-checkbox>
<input-select-checkbox :list="[]" v-else-if="item.type == 'select'" type="select" :data="item" :name="item.name" :options="item.options"></input-select-checkbox>
<input-select-checkbox :list="[]" v-else-if="item.type == 'select'" type="select" :data="item" :name="item.name" :options="item.options" @show-type="showType"></input-select-checkbox>
<input-select-checkbox :list="[]" v-else-if="item.type == 'checkBox'" type="checkBox" :data="item" :name="item.name" :options="item.options"></input-select-checkbox>
<input-select-checkbox :list="[]" v-else-if="item.type == 'radio'" type="radio" :data="item" :name="item.name" :options="item.options"></input-select-checkbox>
<input-select-checkbox :list="[]" v-else-if="item.type == 'textArea'" type="textArea" :data="item" :name="item.name"></input-select-checkbox>
@ -163,15 +174,39 @@ export default {
}
]
}
]
],
showTypeName: ''
}
},
mounted () {
this.defaultContent()
},
methods: {
changeInfoList (obj) {
this.$emit('changeInfoList', obj)
},
goToRichText () {
},
// --
defaultContent () {
this.putOnTheShelfList.forEach((item) => {
if (item.name === '部署与使用') {
item.children.forEach((itemChild) => {
if (itemChild.name === '使用方式') {
itemChild.children.forEach((itemChilds) => {
if (itemChilds.name === '使用方式') {
itemChilds.note1 = '调用接口'
}
})
}
})
}
})
},
showType (data) {
this.showTypeName = data
console.log(data, this.showTypeName, '传过来的showType')
}
}
}

View File

@ -2,7 +2,7 @@
* @Author: hisense.wuhongjian
* @Date: 2022-03-29 16:45:25
* @LastEditors: hisense.wuhongjian
* @LastEditTime: 2022-07-15 09:17:23
* @LastEditTime: 2022-07-16 16:41:18
* @Description: 告诉大家这是什么
-->
<!DOCTYPE html>

View File

@ -1,8 +1,8 @@
/*
* @Author: hisense.wuhongjian
* @Date: 2022-03-29 17:48:03
* @LastEditors: hisense.wuhongjian
* @LastEditTime: 2022-04-12 10:07:15
* @LastEditors: hisense.liangjunhua
* @LastEditTime: 2022-07-15 16:42:22
* @Description: 告诉大家这是什么
*/
import request from '@/utils/request'
@ -23,11 +23,22 @@ export async function socialLogin(data) {
})
}
export function getUserInfo() {
export function getUserInfo(redict) {
//mock.js使dataaccessToken使mockheaders
// debugger
return request({
url: '/sys/user/info',
method: 'get',
headers: {
REQUESTURI:redict
}
})
}
export function getDeptAll() {
//mock.js使dataaccessToken使mockheaders
return request({
url: '/sys/dept/all',
method: 'get',
})
}

View File

@ -22,25 +22,11 @@ let loadingInstance
* @param {*} code
* @param {*} msg
*/
const handleCode = (code, msg) => {
debugger
const handleCode = (code, msg, res) => {
// debugger
switch (code) {
case 401:
// message.error(msg || '')
store.dispatch('user/resetAll').catch(() => {})
debugger
// if (res.token) {
// console.log('token', res.token)
// setAccessToken(res.token)
// const token = getAccessToken()
// console.log('token', token)
// }
// // location.reload()
// if (redirect) {
// window.location.href = res.redirect
// }
break
case 403:
router.push({ path: '/401' }).catch(() => {})
@ -72,7 +58,7 @@ const instance = axios.create({
*/
instance.interceptors.request.use(
(config) => {
debugger
// debugger
const token = getAccessToken()
if (token) config.headers[tokenName] = token
if (
@ -84,7 +70,10 @@ instance.interceptors.request.use(
if (debounce.some((item) => config.url.includes(item))) {
//
}
config.headers.REQUESTURI = window.location.href
if (!config.headers.REQUESTURI) {
config.headers.REQUESTURI = window.location.href
}
return config
},
(error) => {
@ -103,17 +92,13 @@ instance.interceptors.response.use(
console.log('接口返回REDIRECT', response.headers.redirect)
response['Access-Control-Expose-Headers'] = 'redirect'
const { code, message } = response.data
debugger
if (code == '0' && response.headers.token) {
if (response.headers.token) {
setAccessToken(response.headers.token)
} else {
const token = getAccessToken()
if (response.headers.redirect && !token) {
// window.location.href = response.headers.redirect
window.location.replace(response.headers.redirect)
return
// location.reload()
}
}
if (response.headers.redirect) {
window.location.replace(response.headers.redirect)
return
}
if (response.headers.redirect === '/#/login') {
var keys = document.cookie.match(/[^ =;]+(?=\=)/g)
@ -158,7 +143,7 @@ instance.interceptors.response.use(
// }
},
(error) => {
debugger
// debugger
console.log('接口error', error)
if (loadingInstance) loadingInstance.close()
@ -167,12 +152,12 @@ instance.interceptors.response.use(
console.log('接口返回', response)
console.log('接口返回headers', response.headers)
console.log('接口返回REDIRECT', response.headers.redirect)
// if (response.headers.token) {
// setAccessToken(response.headers.token)
// }
if (response.headers.token) {
setAccessToken(response.headers.token)
}
if (response.headers.redirect) {
window.location.replace(response.headers.redirect)
// return Promise.resolve()
return Promise.resolve()
}
const { status, data } = response

View File

@ -2,7 +2,7 @@
* @Author: hisense.wuhongjian
* @Date: 2022-04-01 17:23:11
* @LastEditors: hisense.wuhongjian
* @LastEditTime: 2022-07-15 16:36:53
* @LastEditTime: 2022-07-16 16:42:46
* @Description: 告诉大家这是什么
*/
/**
@ -19,23 +19,24 @@ import {
// recordRoute,
routesWhiteList,
} from '@/config'
import { getAccessToken } from '@/utils/accessToken'
import { setAccessToken, getAccessToken } from '@/utils/accessToken'
router.beforeEach(async (to, from, next) => {
// debugger
// const SSOTOKEN = to.query.SSOToken
// if (SSOTOKEN) {
// setAccessToken(SSOTOKEN)
// }
const token = getAccessToken()
console.log('token', token)
let hasToken = token || store.getters['user/accessToken']
let hasToken = token
// debugger
if (!loginInterception) hasToken = true
console.log('hasToken存在巨大问题', hasToken)
if (hasToken) {
// setAccessToken(hasToken)
await store.dispatch('user/getUserInfo')
debugger
// debugger
next()
} else {
let accessRoutes = []
@ -47,17 +48,10 @@ router.beforeEach(async (to, from, next) => {
next()
} else {
//
getUserInfo().then((res) => {
console.log(res)
router.replace('/home')
})
// await store.dispatch('user/getUserInfo')
// next()
// if (recordRoute)
// next({ path: '/login', query: { redirect: to.path }, replace: true })
// else next({ path: '/login', replace: true })
// next()
// window.open('http://www.baidu.com', '_self')
if (to.query.redict) getUserInfo(to.query.redict)
else {
getUserInfo()
}
}
}
})

View File

@ -110,9 +110,24 @@
:pagination="false"
>
<template #bodyCell="{ column, text }">
<template v-if="column.dataIndex !== 'name'">
<template
v-if="
column.dataIndex !== 'name' &&
(column.title === '组件服务' || column.title === '应用资源')
"
>
{{ text || 0 }}
</template>
<template
v-else-if="
column.dataIndex !== 'name' &&
(column.title === '知识库' ||
column.title === '基础设施' ||
column.title === '数据资源')
"
>
--
</template>
</template>
</a-table>
</div>

View File

@ -182,15 +182,15 @@
})
}
let photoBg = ref([
require('../../../assets/abilityStatistics/zhishiku-bg.png'),
require('../../../assets/abilityStatistics/yingyongziyuan-bg.png'),
require('../../../assets/abilityStatistics/zhishiku-bg.png'),
require('../../../assets/abilityStatistics/zujianfuwu-bg.png'),
require('../../../assets/abilityStatistics/shujuziyuan-bg.png'),
require('../../../assets/abilityStatistics/jichujianshe-bg.png'),
])
let photo = ref([
require('../../../assets/abilityStatistics/zhishiku.png'),
require('../../../assets/abilityStatistics/yingyongziyuan.png'),
require('../../../assets/abilityStatistics/zhishiku.png'),
require('../../../assets/abilityStatistics/zujianfuwu.png'),
require('../../../assets/abilityStatistics/shujuziyuan.png'),
require('../../../assets/abilityStatistics/jichujianshe.png'),
@ -202,19 +202,19 @@
// dataLists.value = res.data.data
res.data.data.map((item) => {
switch (item.type) {
case '知识库':
dataLists.value[0] = item
break
case '应用资源':
dataLists.value[1] = item
break
case '组件服务':
case '业务组件':
dataLists.value[0] = item
break
case '图层服务':
dataLists.value[2] = item
break
case '数据资源':
case '开发组件':
dataLists.value[3] = item
break
case '基础设施':
case '智能算法':
dataLists.value[4] = item
break
default:

View File

@ -32,7 +32,7 @@
import { useRouter } from 'vue-router'
const router = useRouter()
const goHome = () => {
router.push('/home')
router.push({path: '/home', query:{redict: window.location.origin + '/#/home'}})
}
</script>
<style lang="less">

View File

@ -2,7 +2,7 @@
* @Author: hisense.liangjunhua
* @Date: 2022-06-13 10:22:27
* @LastEditors: hisense.liangjunhua
* @LastEditTime: 2022-07-15 11:50:22
* @LastEditTime: 2022-07-16 14:27:31
* @Description: 算法上架
-->
<template>
@ -46,6 +46,7 @@
:refData="refData"
:dataFrom="dataFrom"
:fileList="fileList"
:packageList="packageList"
:imgList="imgList"
:externalField="['接口服务', '接口请求方式']"
:configure="bs"
@ -80,6 +81,7 @@
></algorithm-deployment-use> -->
</div>
<div class="btn" :class="showView === '基本信息' ? 'first' : ''">
<button @click="close()">取消</button>
<button v-show="showView !== '基本信息'" @click="back()">上一步</button>
<button v-show="showView === '部署与使用'" @click="preview()">
预览
@ -196,6 +198,7 @@
const navList = ref([])
const navList2 = ref([])
const fileList = ref({})
const packageList = ref({})
const imgList = ref({})
const videoList = ref({})
const data = ref({})
@ -216,6 +219,9 @@
getUser().then((res) => {
dataFrom.value.deptId = res.data.data.deptId
})
const close = () => {
window.close()
}
const back = () => {
navList.value.forEach((val, index) => {
if (val.key === showView.value && index > 0) {
@ -279,7 +285,7 @@
shangjiaapply(params).then((res3) => {
console.log('res3', res3)
if (res3.data.code == 0) {
message.success('上架成功!')
message.success('上架申请提交成功,请注意查看消息通知')
window.setTimeout(() => {
window.close()
submitFlag.value = true
@ -306,6 +312,18 @@
key: val.name,
})
navList2.value.push(val.name)
if (val.name === '部署与使用') {
console.log(val, '部署与使用')
val.children.forEach((valChild) => {
if (valChild.name === '使用方式') {
valChild.children.forEach((valChilds) => {
if (valChilds.name === '使用方式') {
valChilds.note1 = '调用接口'
}
})
}
})
}
})
data.value = res.data.data.children
refData.value = data.value.filter(
@ -338,6 +356,9 @@
mybus.on('chageFileList', (obj) => {
fileList.value = obj
})
mybus.on('chagePackageList', (obj) => {
packageList.value = obj
})
mybus.on('chageImgList', (obj) => {
imgList.value = obj
})
@ -443,11 +464,41 @@
background: #0087ff;
}
}
.btn {
display: flex;
justify-content: space-around;
padding: 10px 350px 0;
button {
cursor: pointer;
width: 80px;
height: 35px;
text-align: center;
color: #fff;
border: 1px solid #9ccefa;
span {
background: #0087ff;
border: 1px solid #0087ff;
}
}
.line {
background: #0087ff;
}
button:nth-of-type(1) {
color: #0087ff;
background: #e1edfa;
}
button:nth-of-type(2) {
background: #01c5dc;
}
}
.first {
justify-content: space-around;
}
}
.btn {
display: flex;
justify-content: space-between;
padding: 10px 400px 0;
padding: 10px 350px 0;
button {
cursor: pointer;
width: 80px;
@ -467,7 +518,7 @@
}
}
.first {
justify-content: center;
justify-content: space-around;
}
}
</style>

View File

@ -2,7 +2,7 @@
* @Author: hisense.liangjunhua
* @Date: 2022-06-13 10:22:27
* @LastEditors: hisense.liangjunhua
* @LastEditTime: 2022-07-14 09:44:49
* @LastEditTime: 2022-07-15 17:39:25
* @Description: 应用上架
-->
<template>
@ -75,6 +75,7 @@
></application-deployment-use> -->
</div>
<div class="btn" :class="showView === '基本信息' ? 'first' : ''">
<button @click="close()">取消</button>
<button v-show="showView !== '基本信息'" @click="back()">上一步</button>
<button v-show="showView === '部署与应用'" @click="preview()">
预览
@ -237,7 +238,7 @@
shangjiaapply(params).then((res3) => {
console.log('res3', res3)
if (res3.data.code == 0) {
message.success('上架成功!')
message.success('上架申请提交成功,请注意查看消息通知')
window.setTimeout(() => {
window.close()
submitFlag.value = true
@ -347,6 +348,10 @@
}
// console.log('dataFrom.value', dataFrom.value)
})
const close = () => {
window.close()
}
onBeforeUnmount(() => {
mybus.off('chageDataFrom')
mybus.off('chageFileList')
@ -426,7 +431,7 @@
.btn {
display: flex;
justify-content: space-between;
padding: 10px 400px 0;
padding: 10px 350px 0;
button {
cursor: pointer;
width: 80px;
@ -446,7 +451,7 @@
}
}
.first {
justify-content: center;
justify-content: space-around;
}
}
</style>

View File

@ -2,7 +2,7 @@
* @Author: hisense.liangjunhua
* @Date: 2022-06-20 09:35:51
* @LastEditors: hisense.liangjunhua
* @LastEditTime: 2022-07-14 09:44:58
* @LastEditTime: 2022-07-15 17:39:35
* @Description: 业务组件
-->
<template>
@ -59,6 +59,7 @@
></put-on-the-shelf>
</div>
<div class="btn" :class="showView === '基本信息' ? 'first' : ''">
<button @click="close()">取消</button>
<button v-show="showView !== '基本信息'" @click="back()">上一步</button>
<button v-show="showView === '部署与使用'" @click="preview()">
预览
@ -195,6 +196,10 @@
type: '组件服务',
deptId: '',
})
const close = () => {
window.close()
}
getUser().then((res) => {
dataFrom.value.deptId = res.data.data.deptId
})
@ -261,7 +266,7 @@
shangjiaapply(params).then((res3) => {
console.log('res3', res3)
if (res3.data.code == 0) {
message.success('上架成功!')
message.success('上架申请提交成功,请注意查看消息通知')
window.setTimeout(() => {
window.close()
submitFlag.value = true
@ -439,7 +444,7 @@
.btn {
display: flex;
justify-content: space-between;
padding: 10px 400px 0;
padding: 10px 350px 0;
button {
cursor: pointer;
width: 80px;
@ -459,7 +464,7 @@
}
}
.first {
justify-content: center;
justify-content: space-around;
}
}
</style>

View File

@ -2,7 +2,7 @@
* @Author: hisense.liangjunhua
* @Date: 2022-06-20 09:35:17
* @LastEditors: hisense.liangjunhua
* @LastEditTime: 2022-07-14 09:45:07
* @LastEditTime: 2022-07-15 17:39:42
* @Description: 开发组件
-->
<template>
@ -59,6 +59,7 @@
></put-on-the-shelf>
</div>
<div class="btn" :class="showView === '基本信息' ? 'first' : ''">
<button @click="close()">取消</button>
<button v-show="showView !== '基本信息'" @click="back()">上一步</button>
<button v-show="showView === '部署与使用'" @click="preview()">
预览
@ -195,6 +196,10 @@
type: '组件服务',
deptId: '',
})
const close = () => {
window.close()
}
getUser().then((res) => {
dataFrom.value.deptId = res.data.data.deptId
})
@ -261,7 +266,7 @@
shangjiaapply(params).then((res3) => {
console.log('res3', res3)
if (res3.data.code == 0) {
message.success('上架成功!')
message.success('上架申请提交成功,请注意查看消息通知')
window.setTimeout(() => {
window.close()
submitFlag.value = true
@ -439,7 +444,7 @@
.btn {
display: flex;
justify-content: space-between;
padding: 10px 400px 0;
padding: 10px 350px 0;
button {
cursor: pointer;
width: 80px;
@ -459,7 +464,7 @@
}
}
.first {
justify-content: center;
justify-content: space-around;
}
}
</style>

View File

@ -2,7 +2,7 @@
* @Author: hisense.liangjunhua
* @Date: 2022-06-20 09:35:17
* @LastEditors: hisense.liangjunhua
* @LastEditTime: 2022-07-14 09:45:18
* @LastEditTime: 2022-07-15 17:39:47
* @Description: 图层服务
-->
<template>
@ -57,6 +57,7 @@
></put-on-the-shelf>
</div>
<div class="btn" :class="showView === '基本信息' ? 'first' : ''">
<button @click="close()">取消</button>
<button v-show="showView !== '基本信息'" @click="back()">上一步</button>
<button v-show="showView === '部署与使用'" @click="preview()">
预览
@ -157,6 +158,10 @@
}
})
}
const close = () => {
window.close()
}
const next = () => {
let i = -1
navList.value.forEach((val, index) => {
@ -209,7 +214,7 @@
shangjiaapply(params).then((res3) => {
console.log('res3', res3)
if (res3.data.code == 0) {
message.success('上架成功!')
message.success('上架申请提交成功,请注意查看消息通知')
window.setTimeout(() => {
window.close()
submitFlag.value = true
@ -387,7 +392,7 @@
.btn {
display: flex;
justify-content: space-between;
padding: 10px 400px 0;
padding: 10px 350px 0;
button {
cursor: pointer;
width: 80px;
@ -407,7 +412,7 @@
}
}
.first {
justify-content: center;
justify-content: space-around;
}
}
</style>

View File

@ -1,8 +1,8 @@
<!--
* @Author: hisense.liangjunhua
* @Date: 2022-06-17 14:11:08
* @LastEditors: hisense.liangjunhua
* @LastEditTime: 2022-07-15 11:51:18
* @LastEditors: hisense.wuhongjian
* @LastEditTime: 2022-07-16 15:05:16
* @Description: 上架
-->
<template>
@ -111,13 +111,31 @@
></upload>
</div>
<div class="submit">
<a-button type="primary" @click="add(title.name)">提交</a-button>
<a-button type="primary" @click="add(title.name)">
添加更多
</a-button>
</div>
</div>
</template>
<template v-else>
<div class="bottom">
<div class="form" v-for="item in title.children" :key="item.id">
<div
class="form"
v-for="item in title.children"
:key="item.id"
v-show="
!(
(showType == '调用接口' && item.name == '平台地址') ||
(showType == '调用接口' && item.name == 'SDK安装包') ||
(showType == '平台对接' && item.name == 'SDK安装包') ||
(showType == '平台对接' && item.name == '接口请求方式') ||
(showType == '平台对接' && item.name == '服务接口') ||
(showType == 'SDK' && item.name == '平台地址') ||
(showType == 'SDK' && item.name == '接口请求方式') ||
(showType == 'SDK' && item.name == '服务接口')
)
"
>
<span>{{ item.name }}</span>
<a-input
v-if="item.type == 'input'"
@ -176,6 +194,15 @@
:list="props.fileList2"
tip="支持文件类型大小不超过100M"
></upload>
<upload
v-else-if="item.type == 'package'"
type="压缩包"
btnName="上传安装包"
:maxCount="1"
:data="item"
:list="props.packageList"
tip="支持.zip类型"
></upload>
<div
class="Technical-text"
v-else-if="item.type == 'richText'"
@ -212,7 +239,22 @@
请选择关联组件
</a-button>
<a-select
v-else-if="item.type == 'select'"
v-else-if="item.type == 'select' && item.name == '使用方式'"
style="width: 240px"
v-model:value="item.note1"
:placeholder="'请选择' + item.name"
@change="showTypeClick"
>
<a-select-option
v-for="(itemSelect, indexSelect) in item.options"
:key="indexSelect"
:value="itemSelect.dictLabel"
>
{{ itemSelect.dictLabel }}
</a-select-option>
</a-select>
<a-select
v-else-if="item.type == 'select' && item.name !== '归属部门'"
style="width: 240px"
v-model:value="item.note1"
:placeholder="'请选择' + item.name"
@ -225,6 +267,18 @@
{{ itemSelect.dictLabel }}
</a-select-option>
</a-select>
<a-select
v-else-if="item.name === '归属部门'"
style="width: 240px"
v-model:value="item.note1"
show-search
placeholder="请输入关键字"
:options="item.options"
:filter-option="filterOption"
@focus="handleFocus"
@blur="handleBlur"
@change="handleChange2"
></a-select>
<div
v-else-if="item.type == 'checkBox'"
class="application-Area"
@ -277,6 +331,7 @@
import mybus from '@/myplugins/mybus'
import upload from '@/views/components/upload'
import { message } from 'ant-design-vue'
import { getUserInfo, getDeptAll } from '@/api/user'
import {
getCategoryTreePage,
queryApplicationRelByResourceId,
@ -296,6 +351,8 @@
//
fileList: { type: Array, default: null },
fileList2: { type: Array, default: null },
//
packageList: { type: Array, default: null },
//
imgList: { type: Array, default: null },
//
@ -348,6 +405,9 @@
// }]
})
// console.log('props==========>', props)
const changeAdd = () => {
console.log('子组件方法触发~')
}
const data = ref({
list: [],
})
@ -409,6 +469,25 @@
}
data.value.list.push(item)
})
} else if (item.name === '归属部门') {
getDeptAll().then((res) => {
const dataList = []
res.data.data.forEach((element) => {
dataList.push({
value: element.id,
label: element.name,
})
})
item.options = dataList
if (!item.note1) {
getUserInfo().then(({ data: res1 }) => {
console.log(res1.data)
item.note1 = res1.data.deptId
console.log('默认部门=========>', item, res1.data)
data.value.list.push(item)
})
}
})
} else {
data.value.list.push(item)
}
@ -521,56 +600,106 @@
const mockData = ref([])
const titles = ref(['未关联的应用名称', '已关联的应用名称'])
const titleName = ref('关联应用')
const targetKeys = ref([])
//
const targetKeysBack = ref([])
const sourceClick = () => {
mockData.value = []
visibleAssociatedApplication.value = true
queryApplicationRelByResourceId({
referenceId: 0,
}).then((res) => {
// console.log(res.data.data.notLinked)
res.data.data.notLinked.forEach((val, index) => {
// console.log(val, index)
mockData.value.push({
key: val.id,
title: val.name,
description: val.id,
props.dataFrom.infoList.forEach((val) => {
if (val.attrType === '来源应用' && val.attrValue != '') {
queryApplicationRelByResourceId({
referenceId: 0,
}).then((res) => {
// console.log(res.data.data.notLinked)
res.data.data.notLinked.forEach((val, index) => {
mockData.value.push({
key: val.id,
title: val.name,
description: val.id,
})
})
})
})
targetKeys.value = []
val.attrValue.split(',').forEach((item) => {
targetKeys.value.push(item)
})
console.log(targetKeys.value)
// console.log('wowowo')
} else if (val.attrType === '来源应用' && val.attrValue == '') {
queryApplicationRelByResourceId({
referenceId: 0,
}).then((res) => {
// console.log(res.data.data.notLinked)
res.data.data.notLinked.forEach((val, index) => {
mockData.value.push({
key: val.id,
title: val.name,
description: val.id,
})
})
})
}
})
}
//
const componentsClick = () => {
titles.value = ['未关联的组件名称', '已关联的组件名称']
titleName.value = '关联组件'
mockData.value = []
visibleAssociatedApplication.value = true
queryResourceRelByKeyId({
keyId: 0,
type: '组件服务',
referenceName: '',
}).then((res) => {
// console.log(res.data.data.notLinked)
res.data.data.notLinked.forEach((val, index) => {
// console.log(val, index)
mockData.value.push({
key: val.id,
title: val.name,
description: val.id,
props.dataFrom.infoList.forEach((val) => {
if (val.attrType === '关联组件信息' && val.attrValue != '') {
queryResourceRelByKeyId({
keyId: 0,
type: '组件服务',
referenceName: '',
}).then((res) => {
// console.log(res.data.data.notLinked)
res.data.data.notLinked.forEach((val, index) => {
mockData.value.push({
key: val.id,
title: val.name,
description: val.id,
})
})
})
})
targetKeys.value = []
val.attrValue.split(',').forEach((item) => {
targetKeys.value.push(item)
})
console.log(targetKeys.value)
// console.log('wowowo')
} else if (val.attrType === '关联组件信息' && val.attrValue == '') {
queryResourceRelByKeyId({
keyId: 0,
type: '组件服务',
referenceName: '',
}).then((res) => {
// console.log(res.data.data.notLinked)
res.data.data.notLinked.forEach((val, index) => {
mockData.value.push({
key: val.id,
title: val.name,
description: val.id,
})
})
})
}
})
}
const targetKeys = ref([])
const selectedKeys = ref([])
const handleChange = (nextTargetKeys, direction, moveKeys) => {
console.log('targetKeys: ', nextTargetKeys)
console.log('direction: ', direction)
console.log('moveKeys: ', moveKeys)
targetKeys.value = moveKeys
}
const handleSelectChange = (sourceSelectedKeys, targetSelectedKeys) => {
console.log('targetSelectedKeys: ', targetSelectedKeys)
console.log('targetSelectedKeys: ', targetSelectedKeys, sourceSelectedKeys)
}
const handleOk = (e) => {
@ -588,6 +717,13 @@
visibleAssociatedApplication.value = false
}
const showType = ref('')
const showTypeClick = (e) => {
showType.value = e
console.log(e, 'showType', showType.value)
}
showTypeClick('调用接口')
watch(data.value.list, (newProps, oldProps) => {
// console.log(newProps, oldProps)
newProps.forEach((val) => {
@ -621,6 +757,21 @@
}
})
})
const handleChange2 = (value) => {
console.log(`selected ${value}`)
}
const handleBlur = () => {
console.log('blur')
}
const handleFocus = () => {
console.log('focus')
}
const filterOption = (input, option) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0
}
</script>
<style></style>
<style lang="less" scoped>
@ -873,4 +1024,7 @@
font-weight: 400;
text-align: left;
}
:deep(.ant-transfer-list-header .ant-checkbox-wrapper) {
display: none !important;
}
</style>

View File

@ -76,6 +76,8 @@
file.type === 'application/msword' ||
file.type ===
'application/vnd.openxmlformats-officedocument.wordprocessingml.document'
} else if (props.type === '压缩包') {
flag = file.type === 'application/x-zip-compressed'
}
console.log(flag)
if (!flag) {
@ -115,6 +117,8 @@
} else {
mybus.emit('chageFileList', fileList.value)
}
} else if (props.type === '压缩包') {
mybus.emit('chagePackageList', fileList.value)
} else if (props.type === '视频') {
mybus.emit('chageVideoList', fileList.value)
}
@ -129,16 +133,16 @@
}
</script>
<style lang="less" scoped>
.upload-list-inline {
width: unset;
button {
height: 30px;
width: 100px;
border: 1px solid #bbd3ef;
border-radius: 6px;
background: #edf4fc;
color: #0087ff;
font-size: 14px;
}
.upload-list-inline {
width: unset;
button {
height: 30px;
width: 100px;
border: 1px solid #bbd3ef;
border-radius: 6px;
background: #edf4fc;
color: #0087ff;
font-size: 14px;
}
}
</style>

View File

@ -12,7 +12,10 @@
<div class="top">
<div v-for="val in data" :key="val.id" class="item">
<div class="icon" :class="val.icon"></div>
<div class="title">{{ val.title }}</div>
<a-tooltip>
<template #title>{{ val.title }}</template>
<div class="title">{{ val.title }}</div>
</a-tooltip>
<a-tooltip>
<template #title>{{ val.text }}</template>
<div class="text">{{ val.text }}</div>
@ -119,7 +122,11 @@
.title {
font-size: 22px;
margin-top: 25px;
width: 2.6rem;
text-align: center;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.text {
height: 78px;

View File

@ -12,9 +12,7 @@
<div class="content-content">{{ item.content }}</div>
</a-tooltip>
<div class="content-footer">
<span>{{ item.unit }}</span>
<span>{{ item.value }}</span>
<span>{{ item.time }}</span>
</div>
</div>
</div>
@ -40,44 +38,10 @@
// dataFrom.value = obj
obj.attrValue.map((item) => {
let params = {}
switch (item.type) {
case '一次性买断':
params = {
title: item.type,
content: item.desc,
value: item.price,
time: '元',
unit: '¥',
}
break
case '按调用次数':
params = {
title: item.type,
content: item.desc,
value: item.price,
time: '/次',
unit: '¥',
}
break
case '按并发路数':
params = {
title: item.type,
content: item.desc,
value: item.price,
time: '/路',
unit: '¥',
}
break
case '按年计费':
params = {
title: item.type,
content: item.desc,
value: item.price,
time: '/年',
unit: '¥',
}
break
params = {
title: item.type,
content: item.desc,
value: item.price,
}
dataFrom.value.push(params)
})
@ -97,44 +61,10 @@
// dataFrom.value = obj
obj.attrValue.map((item) => {
let params = {}
switch (item.type) {
case '一次性买断':
params = {
title: item.type,
content: item.desc,
value: item.price,
time: '元',
unit: '¥',
}
break
case '按调用次数':
params = {
title: item.type,
content: item.desc,
value: item.price,
time: '/次',
unit: '¥',
}
break
case '按并发路数':
params = {
title: item.type,
content: item.desc,
value: item.price,
time: '/路',
unit: '¥',
}
break
case '按年计费':
params = {
title: item.type,
content: item.desc,
value: item.price,
time: '/年',
unit: '¥',
}
break
params = {
title: item.type,
content: item.desc,
value: item.price,
}
dataFrom.value.push(params)
})
@ -189,14 +119,6 @@
font-size: 22px;
color: #ff8b55;
}
span:nth-child(2) {
font-size: 32px;
color: #ff8b55;
}
span:last-child {
font-size: 22px;
color: #999999;
}
}
}
.content-card:hover {

View File

@ -126,10 +126,12 @@
'props.dataList.infoList==============>',
navList.value.filter((item) => item.name === list.value[0])
)
if (navList.value.filter((item) => item.name === list.value[0])[0]) {
select.value = navList.value.filter(
(item) => (item.name === '关联应用') | (item.name === list.value[0])
)[0].key
if (list.value.length > 0) {
if (navList.value.filter((item) => item.name === list.value[0])[0]) {
select.value = navList.value.filter(
(item) => (item.name === '关联应用') | (item.name === list.value[0])
)[0].key
}
}
console.log('11111111111111111111111111', list.value, navList.value)
}

View File

@ -2,7 +2,7 @@
* @Author: hisense.liangjunhua
* @Date: 2022-06-08 11:56:28
* @LastEditors: hisense.liangjunhua
* @LastEditTime: 2022-07-05 11:41:52
* @LastEditTime: 2022-07-15 17:30:19
* @Description: 算法详情页头部
-->
<template>
@ -21,12 +21,18 @@
<span class="label" v-if="props.dataList.type">
{{ props.dataList.type }}
</span>
<span class="label" v-if="componentType">
{{ componentType }}
</span>
<span class="label" v-if="props.dataList.shareType">
{{ props.dataList.shareType }}
</span>
<span class="label" v-if="props.dataList.shareCondition">
{{ props.dataList.shareCondition }}
</span>
<span class="label" v-if="deploymentLocation">
{{ deploymentLocation }}
</span>
</p>
</div>
<!-- <span class="label">免费</span> -->
@ -52,7 +58,9 @@
<template #icon><shopping-cart-outlined /></template>
加入申购车
</a-button>
<a-button type="primary" @click="goTOCollection()">收藏</a-button>
<a-button type="primary" @click="goTOCollection()">
{{ scFlag ? '已' : '' }}收藏
</a-button>
</div>
</div>
<div class="right"></div>
@ -61,7 +69,7 @@
<script setup>
import { FormOutlined, ShoppingCartOutlined } from '@ant-design/icons-vue'
import { defineProps, ref, watch } from 'vue'
import { scInsert } from '@/api/personalCenter'
import { scInsert, scDel } from '@/api/personalCenter'
import { sgcInsert } from '@/api/home'
import { useRouter } from 'vue-router'
import mybus from '@/myplugins/mybus'
@ -69,8 +77,10 @@
const props = defineProps({
dataList: { type: Object, default: null },
})
// console.log('==================>', props.dataList.isCollect)
const router = useRouter()
const applicationArea = ref('')
const deploymentLocation = ref('') //
//
const addShoppingCart = () => {
console.log('加入申购车==================>', props.dataList)
@ -114,12 +124,38 @@
}
const componentType = ref('')
//
const scFlag = ref(props.dataList.isCollect)
const scFlag2 = ref(true)
const goTOCollection = () => {
console.log('收藏===================》', props.dataList)
scInsert([{ resourceId: props.dataList.id }]).then((res) => {
console.log(res)
message.success('收藏成功')
})
if (scFlag2.value) {
scFlag2.value = false
if (scFlag.value) {
scDel([props.dataList.id]).then((res) => {
if (res.data.msg === 'success') {
message.success('取消成功')
scFlag.value = false
scFlag2.value = true
}
})
} else {
scInsert([
{
resourceId: props.dataList.id,
},
]).then((res) => {
if (res.data.msg === 'success') {
message.success('添加收藏成功!')
scFlag.value = true
scFlag2.value = true
}
})
}
}
// scInsert([{ resourceId: props.dataList.id }]).then((res) => {
// console.log(res)
// message.success('')
// })
}
if (props.dataList.infoList) {
applicationArea.value = props.dataList.infoList.filter(
@ -128,6 +164,13 @@
let obj = props.dataList.infoList.filter(
(val) => val.attrType === '组件类型'
)[0]
if (
props.dataList.infoList.filter((val) => val.attrType === '部署位置')[0]
) {
deploymentLocation.value = props.dataList.infoList.filter(
(val) => val.attrType === '部署位置'
)[0].attrValue
}
if (obj) {
componentType.value = obj.attrValue
}
@ -142,6 +185,15 @@
let obj = props.dataList.infoList.filter(
(val) => val.attrType === '组件类型'
)[0]
if (
props.dataList.infoList.filter(
(val) => val.attrType === '部署位置'
)[0]
) {
deploymentLocation.value = props.dataList.infoList.filter(
(val) => val.attrType === '部署位置'
)[0].attrValue
}
if (obj) {
componentType.value = obj.attrValue
}
@ -189,8 +241,8 @@
}
.lable-father {
position: absolute;
min-width: 3.5rem;
right: -3.5rem;
min-width: 5.5rem;
right: -5.5rem;
top: 0;
}
.label {

View File

@ -8,10 +8,10 @@
></DetalsTitle>
</div>
<div class="content" v-for="item in dataFrom.content" :key="item.title">
<div class="content-left">
<div class="content-left" v-if="item.titleType === '调用接口'">
<div class="left">
<div class="content-left-title">
<span>{{ item.title }}</span>
<span>{{ item.title }}{{ item.titleType }}</span>
</div>
<div class="content-left-content">
<p>
@ -29,7 +29,41 @@
</div>
<div class="right">
<div @click="technical()">技术文档</div>
<div @click="technicalNew()">新手指引</div>
<!-- <div @click="technicalNew()">新手指引</div> -->
<!-- <div @click="SDKClick()">SDK安装包</div> -->
</div>
</div>
<div class="content-left" v-else-if="item.titleType === '平台对接'">
<div class="left">
<div class="content-left-title">
<span>{{ item.title }}{{ item.titleType }}</span>
</div>
<div class="content-left-content">
<p>
<span>{{ item.linkPlatform.name }}</span>
<a-tooltip>
<template #title>{{ item.linkPlatform.value }}</template>
<span>{{ item.linkPlatform.value }}</span>
</a-tooltip>
</p>
</div>
</div>
<div class="right">
<div @click="technical()">技术文档</div>
<!-- <div @click="technicalNew()">新手指引</div> -->
<!-- <div @click="SDKClick()">SDK安装包</div> -->
</div>
</div>
<div class="content-left" v-else-if="item.titleType === 'SDK'">
<div class="left">
<div class="content-left-title">
<span>{{ item.title }}{{ item.titleType }}</span>
</div>
</div>
<div class="right">
<div @click="technical()">技术文档</div>
<!-- <div @click="technicalNew()">新手指引</div> -->
<div @click="SDKClick()">SDK安装包</div>
</div>
</div>
<div class="content-right">
@ -98,13 +132,19 @@
let dataFrom = ref({
title: '使用方式',
englishTitle: 'USAGE',
SDK: '',
content: [
{
title: '组件地址',
title: '使用方式',
titleType: '',
link: {
name: '服务接口:',
value: '',
},
linkPlatform: {
name: '平台地址:',
value: '',
},
postMethod: {
name: '请求方式:',
value: '',
@ -151,7 +191,7 @@
dataFrom.value.content[0].facilitator.value = props.dataList.deptName
dataFrom.value.content[0].people.value = props.dataList.deptContacts
dataFrom.value.content[0].phone.value = props.dataList.deptPhone
dataFrom.value.content[0].postMethod.value = val.apiMethodType
dataFrom.value.content[0].postMethod.value = props.dataList.apiMethodType
console.log('dataList', props.dataList)
props.dataList.infoList.map((item) => {
if (item.attrType === '组件地址') {
@ -163,8 +203,13 @@
} else if (item.attrType === '服务商联系电话') {
dataFrom.value.content[0].phone2.value = item.attrValue || '--'
} else if (item.attrType === '服务接口') {
debugger
dataFrom.value.content[0].link.value = item.attrValue || '--'
} else if (item.attrType === '平台地址') {
dataFrom.value.content[0].linkPlatform.value = item.attrValue || '--'
} else if (item.attrType === 'SDK安装包') {
dataFrom.value.SDK = item.attrValue || '--'
} else if (item.attrType === '使用方式') {
dataFrom.value.content[0].titleType = item.attrValue || '--'
}
})
}
@ -203,8 +248,14 @@
} else if (item.attrType === '服务商联系电话') {
dataFrom.value.content[0].phone2.value = item.attrValue || '--'
} else if (item.attrType === '服务接口') {
debugger
dataFrom.value.content[0].link.value = item.attrValue || '--'
} else if (item.attrType === '平台地址') {
dataFrom.value.content[0].linkPlatform.value =
item.attrValue || '--'
} else if (item.attrType === 'SDK安装包') {
dataFrom.value.SDK = item.attrValue || '--'
} else if (item.attrType === '使用方式') {
dataFrom.value.content[0].titleType = item.attrValue || '--'
}
})
}
@ -257,140 +308,154 @@
message.error('暂未上传使用手册')
}
}
function SDKClick() {
let obj = props.dataList.infoList.filter(
(item) => item.attrType === 'SDK安装包'
)[0]
if (obj) {
window.open(dataFrom.value.SDK)
} else {
message.config({
top: '100px', //
})
message.error('SDK安装包')
}
}
</script>
<style lang="less" scoped>
.usage-mode {
.usage-mode {
display: flex;
flex-direction: column;
align-items: center;
padding: 0.8rem 0;
.content {
margin-top: 0.3rem;
display: flex;
flex-direction: column;
align-items: center;
padding: 0.8rem 0;
.content {
margin-top: 0.3rem;
.content-left {
height: 1.5rem;
width: 6.2rem;
background: url('~@/assets/detailsAll/business/business_usage_mode_bg.png')
no-repeat;
background-position: center;
background-size: 100% 100%;
border-radius: 0.1rem;
margin-right: 0.6rem;
box-shadow: 0rem 0.05rem 0.15rem rgba(82, 106, 255, 0.4);
display: flex;
align-items: center;
justify-content: space-between;
padding: 0 0.35rem;
.content-left {
height: 1.5rem;
width: 6.2rem;
background: url('~@/assets/detailsAll/business/business_usage_mode_bg.png')
no-repeat;
background-position: center;
background-size: 100% 100%;
border-radius: 0.1rem;
margin-right: 0.6rem;
box-shadow: 0rem 0.05rem 0.15rem rgba(82, 106, 255, 0.4);
display: flex;
align-items: center;
padding: 0 0.35rem;
.left {
.content-left-title {
font-size: 0.26rem;
line-height: 0.26rem;
color: #212956;
margin-bottom: 0.2rem;
.left {
.content-left-title {
font-size: 0.26rem;
line-height: 0.26rem;
color: #212956;
margin-bottom: 0.2rem;
span:first-child {
margin-right: 0.1rem;
}
}
.content-left-content {
width: 4.2rem;
font-size: 0.2rem;
color: rgba(33, 41, 86, 0.8);
line-height: 0.2rem;
p {
display: -webkit-box;
margin-bottom: 0.1rem;
span:last-of-type {
width: 298px;
display: -webkit-box;
overflow: hidden;
-webkit-line-clamp: 1;
-webkit-box-orient: vertical;
}
}
span:first-child {
margin-right: 0.1rem;
}
}
.right {
div {
height: 0.4rem;
width: 1.3rem;
background: #ffffff;
border-radius: 0.2rem;
color: #526aff;
font-size: 0.2rem;
display: flex;
justify-content: center;
align-items: center;
cursor: pointer;
}
.content-left-content {
width: 4.2rem;
font-size: 0.2rem;
color: rgba(33, 41, 86, 0.8);
line-height: 0.2rem;
div:first-child {
margin-bottom: 0.2rem;
p {
display: -webkit-box;
margin-bottom: 0.1rem;
span:last-of-type {
width: 298px;
display: -webkit-box;
overflow: hidden;
-webkit-line-clamp: 1;
-webkit-box-orient: vertical;
}
}
}
}
.content-right {
height: 1.5rem;
width: 6.2rem;
background: url('~@/assets/detailsAll/business/business_usage_mode_bg.png')
no-repeat;
background-position: center;
background-size: 100% 100%;
border-radius: 0.1rem;
box-shadow: 0rem 0.05rem 0.15rem rgba(82, 106, 255, 0.4);
display: flex;
justify-content: space-around;
align-items: center;
padding: 0 0.3rem;
.content-right-left {
border-right: 0.01rem solid #707fe0;
padding-right: 0.1rem;
margin-right: 0.1rem;
}
.content-right-title {
font-size: 0.26rem;
line-height: 0.26rem;
color: #212956;
margin-bottom: 0.15rem;
}
.content-right-content {
.right {
div {
height: 0.4rem;
width: 1.3rem;
background: #ffffff;
border-radius: 0.2rem;
color: #526aff;
font-size: 0.2rem;
display: flex;
font-size: 0.16rem;
color: rgba(33, 41, 86, 0.8);
line-height: 0.2rem;
overflow: hidden;
justify-content: center;
align-items: center;
cursor: pointer;
}
div:first-child {
margin-bottom: 0.2rem;
}
}
}
.content-right {
height: 1.5rem;
width: 6.2rem;
background: url('~@/assets/detailsAll/business/business_usage_mode_bg.png')
no-repeat;
background-position: center;
background-size: 100% 100%;
border-radius: 0.1rem;
box-shadow: 0rem 0.05rem 0.15rem rgba(82, 106, 255, 0.4);
display: flex;
justify-content: space-around;
align-items: center;
padding: 0 0.3rem;
.content-right-left {
border-right: 0.01rem solid #707fe0;
padding-right: 0.1rem;
margin-right: 0.1rem;
}
.content-right-title {
font-size: 0.26rem;
line-height: 0.26rem;
color: #212956;
margin-bottom: 0.15rem;
}
.content-right-content {
display: flex;
font-size: 0.16rem;
color: rgba(33, 41, 86, 0.8);
line-height: 0.2rem;
overflow: hidden;
-webkit-line-clamp: 1;
-webkit-box-orient: vertical;
flex-direction: column;
p {
// width: 1.60rem;
height: 0.2rem;
display: -webkit-box;
// overflow: hidden;
margin-bottom: 0.08rem;
white-space: nowrap;
-webkit-line-clamp: 1;
-webkit-box-orient: vertical;
flex-direction: column;
margin-right: 0.15rem;
p {
// width: 1.60rem;
height: 0.2rem;
display: -webkit-box;
// overflow: hidden;
margin-bottom: 0.08rem;
white-space: nowrap;
-webkit-line-clamp: 1;
-webkit-box-orient: vertical;
margin-right: 0.15rem;
span {
cursor: pointer;
}
span {
cursor: pointer;
}
}
}
}
}
}
</style>

View File

@ -68,11 +68,13 @@
item.attrType === '部署位置'
) {
dataFrom.value.content[0].childrenContent.push(item)
} else if (
item.attrType === '是否等保备案' ||
item.attrType === '等保定级'
) {
} else if (item.attrType === '等保定级') {
dataFrom.value.content[1].childrenContent.push(item)
let isAndNo = {
attrType: '是否等保备案',
attrValue: '是',
}
dataFrom.value.content[1].childrenContent.push(isAndNo)
} else if (item.attrType === '访问地址') {
let obj = {
attrType: '访问地址',
@ -85,7 +87,7 @@
let data = [
{
attrType: '是否等保备案',
attrValue: '------',
attrValue: '',
},
{
attrType: '等保定级',
@ -116,11 +118,13 @@
item.attrType === '部署位置'
) {
dataFrom.value.content[0].childrenContent.push(item)
} else if (
item.attrType === '是否等保备案' ||
item.attrType === '等保定级'
) {
} else if (item.attrType === '等保定级') {
dataFrom.value.content[1].childrenContent.push(item)
let isAndNo = {
attrType: '是否等保备案',
attrValue: '是',
}
dataFrom.value.content[1].childrenContent.push(isAndNo)
} else if (item.attrType === '访问地址') {
let obj = {
attrType: '访问地址',
@ -130,10 +134,11 @@
}
})
if (dataFrom.value.content[1].childrenContent.length <= 0) {
debugger
let data = [
{
attrType: '是否等保备案',
attrValue: '------',
attrValue: '',
},
{
attrType: '等保定级',
@ -144,11 +149,6 @@
dataFrom.value.content[1].childrenContent.push(itemContent)
})
}
let obj = {
attrType: '访问地址',
attrValue: props.dataList.link || '------',
}
dataFrom.value.content[0].childrenContent.push(obj)
}
}
)

View File

@ -1,18 +1,31 @@
<!--
* @Author: hisense.liangjunhua
* @Date: 2022-06-08 15:25:33
* @LastEditors: hisense.liangjunhua
* @LastEditTime: 2022-06-14 11:30:52
* @LastEditors: hisense.wuhongjian
* @LastEditTime: 2022-07-16 16:43:02
* @Description: 应用展示 视频播放
-->
<template>
<div class="application-presentation" v-if="flag">
<detals-title title="应用展示" type="IMAGE&VIDEO"></detals-title>
<div
class="main"
:style="`${img}background-position:center;background-size:cover;`"
>
<div class="play" @click="showModal"></div>
<div class="box">
<div class="left" @click="chagneShow()"></div>
<div
class="main"
:style="`${img}background-position:center;background-size:cover;`"
v-if="
showArr.length > 0 && showArr[showFlag].attrType == '应用展示视频'
"
>
<div class="play" @click="showModal"></div>
</div>
<div
class="main2"
v-if="showArr.length > 0 && showArr[showFlag].attrType == '应用图片'"
>
<a-image :width="700" :src="showArr[showFlag].attrValue" />
</div>
<div class="right" @click="chagneShow()"></div>
</div>
<a-modal
v-model:visible="visible"
@ -59,6 +72,13 @@
'fullScreen',
], //,
})
const showFlag = ref(0)
const showArr = ref([])
const chagneShow = () => {
if (showArr.value.length > 1) {
showFlag.value = showFlag.value == 0 ? 1 : 0
}
}
const showModal = () => {
visible.value = true
}
@ -69,41 +89,25 @@
const img = ref({})
console.log('111111111111111111111,', props.dataList)
if (props.dataList.infoList) {
let obj = props.dataList.infoList.filter(
(item) => item.attrType === '应用展示视频'
)[0]
console.log('视频==============>', obj)
if (!obj) {
showArr.value = props.dataList.infoList.filter(
(item) => item.attrType === '应用展示视频' || item.attrType === '应用图片'
)
console.log('视频==============>', showArr.value)
if (showArr.value.length == 0) {
flag.value = false
} else {
let imgindex = props.dataList.infoList.filter(
(item) => item.attrType === '应用图片'
)[0]
options.src = obj.attrValue
if (imgindex) {
img.value = 'background:' + 'url(' + imgindex.attrValue + ') no-repeat;'
}
}
}
watch(
() => props.dataList,
(val) => {
if (val) {
let obj = val.infoList.filter(
(item) => item.attrType === '应用展示视频'
)[0]
console.log('视频==============>', obj)
if (!obj) {
showArr.value = props.dataList.infoList.filter(
(item) =>
item.attrType === '应用展示视频' || item.attrType === '应用图片'
)
console.log('视频==============>', showArr.value)
if (showArr.value.length == 0) {
flag.value = false
} else {
let imgindex = props.dataList.infoList.filter(
(item) => item.attrType === '应用图片'
)[0]
options.src = obj.attrValue
if (imgindex) {
img.value =
'background:' + 'url(' + imgindex.attrValue + ') no-repeat;'
}
}
}
}
@ -114,6 +118,7 @@
padding: 0.8rem 3rem 0;
.main {
width: 13.14rem;
height: 3.4rem;
border-radius: 0.1rem;
background: url('~@/assets/detailsAll/sf_video_bg.png') no-repeat;
@ -131,5 +136,41 @@
cursor: pointer;
}
}
.main2 {
width: 13.14rem;
height: 3.4rem;
border-radius: 0.1rem;
background-size: 100%;
margin-top: 0.4rem;
display: flex;
justify-content: center;
align-items: center;
}
}
.box {
display: flex;
justify-content: space-around;
align-items: center;
margin-bottom: 0.8rem;
.left {
width: 0.37rem;
height: 0.6rem;
cursor: pointer;
margin-right: 0.2rem;
background: url('~@/assets/detailsAll/business/business_previous.png')
no-repeat;
background-size: 100%;
background-position: center;
}
.right {
width: 0.37rem;
height: 0.6rem;
cursor: pointer;
margin-left: 0.2rem;
background: url('~@/assets/detailsAll/business/business_next.png')
no-repeat;
background-size: 100%;
background-position: center;
}
}
</style>

View File

@ -1,8 +1,8 @@
<!--
* @Author: hisense.liangjunhua
* @Date: 2022-06-08 11:56:28
* @LastEditors: hisense.liangjunhua
* @LastEditTime: 2022-06-14 11:31:12
* @LastEditors: hisense.wuhongjian
* @LastEditTime: 2022-07-16 16:43:11
* @Description: 算法详情页头部
-->
<template>
@ -63,7 +63,9 @@
</template>
申请使用
</a-button>
<a-button type="primary" @click="goTOCollection()">收藏</a-button>
<a-button type="primary" @click="goTOCollection()">
{{ scFlag ? '已' : '' }}收藏
</a-button>
</div>
</div>
<div class="right"></div>
@ -72,7 +74,7 @@
<script setup>
// import { ShoppingCartOutlined } from '@ant-design/icons-vue'
import { defineProps, ref, watch } from 'vue'
import { scInsert } from '@/api/personalCenter'
import { scInsert, scDel } from '@/api/personalCenter'
// import { sgcInsert } from '@/api/home'
// import { useRouter } from 'vue-router'
// import mybus from '@/myplugins/mybus'
@ -142,12 +144,38 @@
}
//
const scFlag = ref(props.dataList.isCollect)
const scFlag2 = ref(true)
const goTOCollection = () => {
console.log('收藏===================》', props.dataList)
scInsert([{ resourceId: props.dataList.id }]).then((res) => {
console.log(res)
message.success('收藏成功')
})
if (scFlag2.value) {
scFlag2.value = false
if (scFlag.value) {
scDel([props.dataList.id]).then((res) => {
if (res.data.msg === 'success') {
message.success('取消成功')
scFlag.value = false
scFlag2.value = true
}
})
} else {
scInsert([
{
resourceId: props.dataList.id,
},
]).then((res) => {
if (res.data.msg === 'success') {
message.success('添加收藏成功!')
scFlag.value = true
scFlag2.value = true
}
})
}
}
// scInsert([{ resourceId: props.dataList.id }]).then((res) => {
// console.log(res)
// message.success('')
// })
}
if (props.dataList.infoList) {
applicationArea.value = props.dataList.infoList.filter(

View File

@ -1,8 +1,8 @@
<!--
* @Author: hisense.liangjunhua
* @Date: 2022-06-08 14:54:01
* @LastEditors: hisense.liangjunhua
* @LastEditTime: 2022-06-15 18:24:39
* @LastEditors: hisense.wuhongjian
* @LastEditTime: 2022-07-16 16:43:19
* @Description: 应用详情页导航
-->
<template>
@ -80,7 +80,6 @@
}
const selectNav = (key) => {
select.value = key
console.log(key, select.value)
mybus.emit('flyToView', select.value)
}
if (props.dataList.infoList) {

View File

@ -2,7 +2,7 @@
* @Author: hisense.liangjunhua
* @Date: 2022-06-08 11:56:28
* @LastEditors: hisense.liangjunhua
* @LastEditTime: 2022-07-05 11:42:27
* @LastEditTime: 2022-07-15 17:31:32
* @Description: 算法详情页头部
-->
<template>
@ -21,12 +21,18 @@
<span class="label" v-if="props.dataList.type">
{{ props.dataList.type }}
</span>
<span class="label" v-if="componentType">
{{ componentType }}
</span>
<span class="label" v-if="props.dataList.shareType">
{{ props.dataList.shareType }}
</span>
<span class="label" v-if="props.dataList.shareCondition">
{{ props.dataList.shareCondition }}
</span>
<span class="label" v-if="deploymentLocation">
{{ deploymentLocation }}
</span>
</p>
</div>
<!-- <span class="label">免费</span> -->
@ -56,7 +62,9 @@
</template>
加入申购车
</a-button>
<a-button type="primary" @click="goTOCollection()">收藏</a-button>
<a-button type="primary" @click="goTOCollection()">
{{ scFlag ? '已' : '' }}收藏
</a-button>
</div>
</div>
<div class="right"></div>
@ -65,7 +73,7 @@
<script setup>
import { ShoppingCartOutlined } from '@ant-design/icons-vue'
import { defineProps, ref, watch } from 'vue'
import { scInsert } from '@/api/personalCenter'
import { scInsert, scDel } from '@/api/personalCenter'
import { sgcInsert } from '@/api/home'
import { useRouter } from 'vue-router'
import mybus from '@/myplugins/mybus'
@ -75,6 +83,8 @@
})
const router = useRouter()
const businessArea = ref('')
const deploymentLocation = ref('') //
const componentType = ref('') //
// //
const addShoppingCart = () => {
console.log('加入申购车==================>', props.dataList)
@ -117,14 +127,39 @@
})
}
//
const scFlag = ref(props.dataList.isCollect)
const scFlag2 = ref(true)
const goTOCollection = () => {
console.log('收藏===================》', props.dataList)
scInsert([{ resourceId: props.dataList.id }]).then((res) => {
console.log(res)
message.success('收藏成功')
})
if (scFlag2.value) {
scFlag2.value = false
if (scFlag.value) {
scDel([props.dataList.id]).then((res) => {
if (res.data.msg === 'success') {
message.success('取消成功')
scFlag.value = false
scFlag2.value = true
}
})
} else {
scInsert([
{
resourceId: props.dataList.id,
},
]).then((res) => {
if (res.data.msg === 'success') {
message.success('添加收藏成功!')
scFlag.value = true
scFlag2.value = true
}
})
}
}
// scInsert([{ resourceId: props.dataList.id }]).then((res) => {
// console.log(res)
// message.success('')
// })
}
const componentType = ref('')
if (props.dataList.infoList) {
businessArea.value = props.dataList.infoList.filter(
(val) => val.attrType === '应用领域'
@ -132,6 +167,13 @@
let obj = props.dataList.infoList.filter(
(val) => val.attrType === '组件类型'
)[0]
if (
props.dataList.infoList.filter((val) => val.attrType === '部署位置')[0]
) {
deploymentLocation.value = props.dataList.infoList.filter(
(val) => val.attrType === '部署位置'
)[0].attrValue
}
if (obj) {
componentType.value = obj.attrValue
}
@ -146,6 +188,15 @@
let obj = props.dataList.infoList.filter(
(val) => val.attrType === '组件类型'
)[0]
if (
props.dataList.infoList.filter(
(val) => val.attrType === '部署位置'
)[0]
) {
deploymentLocation.value = props.dataList.infoList.filter(
(val) => val.attrType === '部署位置'
)[0].attrValue
}
if (obj) {
componentType.value = obj.attrValue
}
@ -197,8 +248,8 @@
.lable-father {
position: absolute;
min-width: 3.5rem;
right: -3.5rem;
min-width: 5.5rem;
right: -5.5rem;
top: 0;
}

View File

@ -138,10 +138,12 @@
flag.value = false
} else {
// eslint-disable-next-line vue/no-setup-props-destructure
dataFrom.value.content[0].link.value = props.dataList.apiUrl
dataFrom.value.content[0].facilitator.value = props.dataList.deptName
dataFrom.value.content[0].people.value = props.dataList.deptContacts
dataFrom.value.content[0].phone.value = props.dataList.deptPhone
dataFrom.value.content[0].link.value = props.dataList.apiUrl || '--'
dataFrom.value.content[0].facilitator.value =
props.dataList.deptName || '--'
dataFrom.value.content[0].people.value =
props.dataList.deptContacts || '--'
dataFrom.value.content[0].phone.value = props.dataList.deptPhone || '--'
console.log('dataList', props.dataList)
props.dataList.infoList.map((item) => {
if (item.attrType === '组件地址') {
@ -173,10 +175,10 @@
if (!obj) {
flag.value = false
} else {
dataFrom.value.content[0].link.value = val.apiUrl
dataFrom.value.content[0].facilitator.value = val.deptName
dataFrom.value.content[0].people.value = val.deptContacts
dataFrom.value.content[0].phone.value = val.deptPhone
dataFrom.value.content[0].link.value = val.apiUrl || '--'
dataFrom.value.content[0].facilitator.value = val.deptName || '--'
dataFrom.value.content[0].people.value = val.deptContacts || '--'
dataFrom.value.content[0].phone.value = val.deptPhone || '--'
console.log('dataList', val)
val.infoList.map((item) => {
if (item.attrType === '组件地址') {

View File

@ -96,6 +96,8 @@
list.value.push(item.attrType)
} else if (item.attrType === '组件视频介绍') {
list.value.push('组件展示')
} else if (item.attrType === '是否支持试用' && item.attrValue === '是') {
list.value.push('组件试用')
}
})
list.value.unshift('关联应用')
@ -111,9 +113,12 @@
// }
}
})
select.value = navList.value.filter(
(item) => item.name === list.value[0]
)[0].key
if (navList.value.filter((item) => item.name === list.value[0])[0]) {
select.value = navList.value.filter(
(item) => (item.name === '关联应用') | (item.name === list.value[0])
// (item) => item.name === list.value[0]
)[0].key
}
console.log('11111111111111111111111111', list.value, navList.value)
}
watch(
@ -137,10 +142,15 @@
list.value.push(item.attrType)
} else if (item.attrType === '组件视频介绍') {
list.value.push('组件展示')
} else if (
item.attrType === '是否支持试用' &&
item.attrValue === '是'
) {
list.value.push('组件试用')
}
})
list.value.unshift('关联应用')
list.value.push('组件试用')
// list.value.push('')
list.value.push('使用方式')
navList.value.forEach((item) => {
console.log(item)

View File

@ -102,24 +102,24 @@
if (!obj) {
flag.value = false
} else {
dataFrom.value.content[0].childrenContent[0].attrValue =
props.dataList.deptContacts
dataFrom.value.content[0].childrenContent[1].attrValue =
props.dataList.deptPhone
props.dataList.deptContacts || '--'
dataFrom.value.content[0].childrenContent[2].attrValue =
props.dataList.deptName
props.dataList.deptPhone || '--'
dataFrom.value.content[0].childrenContent[0].attrValue =
props.dataList.deptName || '--'
props.dataList.infoList.map((item) => {
if (item.attrType == '组件地址') {
dataFrom.value.link = item.attrValue
} else if (item.attrType == '服务商联系人') {
dataFrom.value.content[1].childrenContent[0].attrValue =
item.attrValue
} else if (item.attrType == '服务商联系电话') {
dataFrom.value.content[1].childrenContent[1].attrValue =
item.attrValue
} else if (item.attrType == '服务商' || item.attrType == '服务商名') {
item.attrValue || '--'
} else if (item.attrType == '服务商联系电话') {
dataFrom.value.content[1].childrenContent[2].attrValue =
item.attrValue
item.attrValue || '--'
} else if (item.attrType == '服务商' || item.attrType == '服务商名') {
dataFrom.value.content[1].childrenContent[0].attrValue =
item.attrValue || '--'
}
})
}
@ -164,27 +164,27 @@
if (!obj) {
flag.value = false
} else {
dataFrom.value.content[0].childrenContent[0].attrValue =
props.dataList.deptContacts
dataFrom.value.content[0].childrenContent[1].attrValue =
props.dataList.deptPhone
props.dataList.deptContacts || '--'
dataFrom.value.content[0].childrenContent[2].attrValue =
props.dataList.deptName
props.dataList.deptPhone || '--'
dataFrom.value.content[0].childrenContent[0].attrValue =
props.dataList.deptName || '--'
props.dataList.infoList.map((item) => {
if (item.attrType == '组件地址') {
dataFrom.value.link = item.attrValue
} else if (item.attrType == '服务商联系人') {
dataFrom.value.content[1].childrenContent[0].attrValue =
item.attrValue
} else if (item.attrType == '服务商联系电话') {
dataFrom.value.content[1].childrenContent[1].attrValue =
item.attrValue
item.attrValue || '--'
} else if (item.attrType == '服务商联系电话') {
dataFrom.value.content[1].childrenContent[2].attrValue =
item.attrValue || '--'
} else if (
item.attrType == '服务商' ||
item.attrType == '服务商名'
) {
dataFrom.value.content[1].childrenContent[2].attrValue =
item.attrValue
dataFrom.value.content[1].childrenContent[0].attrValue =
item.attrValue || '--'
}
})
}
@ -204,11 +204,11 @@
}
.content {
display: flex;
width: 13rem;
width: 14rem;
justify-content: space-between;
.content-card {
height: 1.8rem;
width: 6.2rem;
width: 6.6rem;
border-radius: 0.2rem;
background: linear-gradient(
to right,
@ -242,11 +242,18 @@
max-width: 2.8rem;
div {
max-width: 2.8rem;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 1;
// overflow: hidden;
// text-overflow: ellipsis;
// display: -webkit-box;
// -webkit-box-orient: vertical;
// -webkit-line-clamp: 1;
& > span:last-child {
display: inline-block;
width: 1.19rem;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
}
}
}

View File

@ -2,7 +2,7 @@
* @Author: hisense.liangjunhua
* @Date: 2022-06-08 11:56:28
* @LastEditors: hisense.liangjunhua
* @LastEditTime: 2022-07-05 11:42:59
* @LastEditTime: 2022-07-15 17:32:08
* @Description: 开发组件详情页头部
-->
<template>
@ -21,12 +21,18 @@
<span class="label" v-if="props.dataList.type">
{{ props.dataList.type }}
</span>
<span class="label" v-if="componentType">
{{ componentType }}
</span>
<span class="label" v-if="props.dataList.shareType">
{{ props.dataList.shareType }}
</span>
<span class="label" v-if="props.dataList.shareCondition">
{{ props.dataList.shareCondition }}
</span>
<span class="label" v-if="deploymentLocation">
{{ deploymentLocation }}
</span>
</p>
</div>
<!-- <span class="label">免费</span> -->
@ -52,7 +58,9 @@
<template #icon><shopping-cart-outlined /></template>
加入购物车
</a-button>
<a-button type="primary" @click="goTOCollection()">收藏</a-button>
<a-button type="primary" @click="goTOCollection()">
{{ scFlag ? '已' : '' }}收藏
</a-button>
</div>
</div>
<div class="right"></div>
@ -61,7 +69,7 @@
<script setup>
import { FormOutlined, ShoppingCartOutlined } from '@ant-design/icons-vue'
import { defineProps, ref, watch } from 'vue'
import { scInsert } from '@/api/personalCenter'
import { scInsert, scDel } from '@/api/personalCenter'
import { sgcInsert } from '@/api/home'
import { useRouter } from 'vue-router'
import mybus from '@/myplugins/mybus'
@ -71,6 +79,7 @@
})
const router = useRouter()
const applicationArea = ref('')
const deploymentLocation = ref('') //
//
const addShoppingCart = () => {
console.log('加入申购车==================>', props.dataList)
@ -113,12 +122,38 @@
})
}
//
const scFlag = ref(props.dataList.isCollect)
const scFlag2 = ref(true)
const goTOCollection = () => {
console.log('收藏===================》', props.dataList)
scInsert([{ resourceId: props.dataList.id }]).then((res) => {
console.log(res)
message.success('收藏成功')
})
if (scFlag2.value) {
scFlag2.value = false
if (scFlag.value) {
scDel([props.dataList.id]).then((res) => {
if (res.data.msg === 'success') {
message.success('取消成功')
scFlag.value = false
scFlag2.value = true
}
})
} else {
scInsert([
{
resourceId: props.dataList.id,
},
]).then((res) => {
if (res.data.msg === 'success') {
message.success('添加收藏成功!')
scFlag.value = true
scFlag2.value = true
}
})
}
}
// scInsert([{ resourceId: props.dataList.id }]).then((res) => {
// console.log(res)
// message.success('')
// })
}
const componentType = ref('')
if (props.dataList.infoList) {
@ -128,6 +163,13 @@
let obj = props.dataList.infoList.filter(
(val) => val.attrType === '组件类型'
)[0]
if (
props.dataList.infoList.filter((val) => val.attrType === '部署位置')[0]
) {
deploymentLocation.value = props.dataList.infoList.filter(
(val) => val.attrType === '部署位置'
)[0].attrValue
}
if (obj) {
componentType.value = obj.attrValue
}
@ -142,6 +184,15 @@
let obj = props.dataList.infoList.filter(
(val) => val.attrType === '组件类型'
)[0]
if (
props.dataList.infoList.filter(
(val) => val.attrType === '部署位置'
)[0]
) {
deploymentLocation.value = props.dataList.infoList.filter(
(val) => val.attrType === '部署位置'
)[0].attrValue
}
if (obj) {
componentType.value = obj.attrValue
}
@ -188,8 +239,8 @@
}
.lable-father {
position: absolute;
min-width: 3.5rem;
right: -3.5rem;
min-width: 5.5rem;
right: -5.5rem;
top: 0;
}
.label {

View File

@ -49,7 +49,7 @@
})
if (props.dataList.infoList) {
let obj = props.dataList.infoList.filter(
(item) => item.attrType === '试用地址'
(item) => item.attrType === '是否支持试用' && item.attrValue === '是'
)[0]
if (!obj) {
flag.value = false
@ -94,7 +94,9 @@
() => props.dataList,
(val) => {
if (val) {
let obj = val.infoList.filter((item) => item.attrType === '试用地址')[0]
let obj = val.infoList.filter(
(item) => item.attrType === '是否支持试用' && item.attrValue === '是'
)[0]
if (!obj) {
flag.value = false
} else {

View File

@ -90,7 +90,7 @@
values: '',
},
{
type: '最大级别',
type: '最大级别名称',
values: '',
},
],

View File

@ -82,7 +82,6 @@
const select = ref('layer-service-associated-ability')
const selectNav = (key) => {
select.value = key
console.log(key, select.value)
mybus.emit('flyToView', select.value)
}
if (props.dataList.infoList) {
@ -145,9 +144,12 @@
item.show = true
}
})
select.value = navList.value.filter(
(item) => item.name === list.value[0]
)[0].key
if (navList.value.filter((item) => item.name === list.value[0])[0]) {
select.value = navList.value.filter(
(item) => (item.name === '关联应用') | (item.name === list.value[0])
// (item) => item.name === list.value[0]
)[0].key
}
console.log('11111111111111111111111111', list.value, navList.value)
}
watch(

View File

@ -2,7 +2,7 @@
* @Author: hisense.liangjunhua
* @Date: 2022-06-08 11:56:28
* @LastEditors: hisense.liangjunhua
* @LastEditTime: 2022-07-05 11:43:18
* @LastEditTime: 2022-07-15 17:32:31
* @Description: 算法详情页头部
-->
<template>
@ -21,12 +21,18 @@
<span class="label" v-if="props.dataList.type">
{{ props.dataList.type }}
</span>
<span class="label" v-if="componentType">
{{ componentType }}
</span>
<span class="label" v-if="props.dataList.shareType">
{{ props.dataList.shareType }}
</span>
<span class="label" v-if="props.dataList.shareCondition">
{{ props.dataList.shareCondition }}
</span>
<span class="label" v-if="deploymentLocation">
{{ deploymentLocation }}
</span>
</p>
</div>
<!-- <span class="label">免费</span> -->
@ -52,7 +58,9 @@
<template #icon><shopping-cart-outlined /></template>
加入申购车
</a-button>
<a-button type="primary" @click="goTOCollection()">收藏</a-button>
<a-button type="primary" @click="goTOCollection()">
{{ scFlag ? '已' : '' }}收藏
</a-button>
</div>
</div>
<div class="right"></div>
@ -61,7 +69,7 @@
<script setup>
import { FormOutlined, ShoppingCartOutlined } from '@ant-design/icons-vue'
import { defineProps, ref, watch } from 'vue'
import { scInsert } from '@/api/personalCenter'
import { scInsert, scDel } from '@/api/personalCenter'
import { sgcInsert } from '@/api/home'
import { useRouter } from 'vue-router'
import mybus from '@/myplugins/mybus'
@ -71,6 +79,7 @@
})
const router = useRouter()
const businessArea = ref('')
const deploymentLocation = ref('') //
//
const addShoppingCart = () => {
console.log('加入申购车==================>', props.dataList)
@ -113,12 +122,38 @@
})
}
//
const scFlag = ref(props.dataList.isCollect)
const scFlag2 = ref(true)
const goTOCollection = () => {
console.log('收藏===================》', props.dataList)
scInsert([{ resourceId: props.dataList.id }]).then((res) => {
console.log(res)
message.success('收藏成功')
})
if (scFlag2.value) {
scFlag2.value = false
if (scFlag.value) {
scDel([props.dataList.id]).then((res) => {
if (res.data.msg === 'success') {
message.success('取消成功')
scFlag.value = false
scFlag2.value = true
}
})
} else {
scInsert([
{
resourceId: props.dataList.id,
},
]).then((res) => {
if (res.data.msg === 'success') {
message.success('添加收藏成功!')
scFlag.value = true
scFlag2.value = true
}
})
}
}
// scInsert([{ resourceId: props.dataList.id }]).then((res) => {
// console.log(res)
// message.success('')
// })
}
const componentType = ref('')
if (props.dataList.infoList) {
@ -129,6 +164,13 @@
let obj = props.dataList.infoList.filter(
(val) => val.attrType === '组件类型'
)[0]
if (
props.dataList.infoList.filter((val) => val.attrType === '部署位置')[0]
) {
deploymentLocation.value = props.dataList.infoList.filter(
(val) => val.attrType === '部署位置'
)[0].attrValue
}
if (obj) {
componentType.value = obj.attrValue
}
@ -145,6 +187,15 @@
let obj = props.dataList.infoList.filter(
(item) => item.attrType === '组件类型'
)[0]
if (
props.dataList.infoList.filter(
(val) => val.attrType === '部署位置'
)[0]
) {
deploymentLocation.value = props.dataList.infoList.filter(
(val) => val.attrType === '部署位置'
)[0].attrValue
}
if (obj) {
componentType.value = obj.attrValue
}
@ -191,8 +242,8 @@
}
.lable-father {
position: absolute;
min-width: 3.5rem;
right: -3.5rem;
min-width: 5.5rem;
right: -5.5rem;
top: 0;
}
.label {

View File

@ -142,10 +142,12 @@
flag.value = false
} else {
// eslint-disable-next-line vue/no-setup-props-destructure
dataFrom.value.content[0].link.value = props.dataList.apiUrl
dataFrom.value.content[0].facilitator.value = props.dataList.deptName
dataFrom.value.content[0].people.value = props.dataList.deptContacts
dataFrom.value.content[0].phone.value = props.dataList.deptPhone
dataFrom.value.content[0].link.value = props.dataList.apiUrl || '--'
dataFrom.value.content[0].facilitator.value =
props.dataList.deptName || '--'
dataFrom.value.content[0].people.value =
props.dataList.deptContacts || '--'
dataFrom.value.content[0].phone.value = props.dataList.deptPhone || '--'
console.log('dataList', props.dataList)
props.dataList.infoList.map((item) => {
if (item.attrType === '服务地址') {
@ -179,10 +181,10 @@
if (!obj) {
flag.value = false
} else {
dataFrom.value.content[0].link.value = val.apiUrl
dataFrom.value.content[0].facilitator.value = val.deptName
dataFrom.value.content[0].people.value = val.deptContacts
dataFrom.value.content[0].phone.value = val.deptPhone
dataFrom.value.content[0].link.value = val.apiUrl || '--'
dataFrom.value.content[0].facilitator.value = val.deptName || '--'
dataFrom.value.content[0].people.value = val.deptContacts || '--'
dataFrom.value.content[0].phone.value = val.deptPhone || '--'
console.log('dataList', val)
val.infoList.map((item) => {
if (item.attrType === '服务地址') {

View File

@ -112,7 +112,7 @@
:checked="tagFlag == '免批申请'"
@change="() => chagneTag('免批申请')"
>
免批申请
免批
</a-checkable-tag>
</div>
</div>
@ -662,6 +662,7 @@
selectDicStoreAll,
pageWithAttrs,
getDataResource,
getIntegrationServicesList,
} from '@/api/home.js'
import { getSgcList } from '@/api/personalCenter'
import { useRouter } from 'vue-router'
@ -674,7 +675,7 @@
//
import infrastructurePage from '@/views/home/infrastructurePage.vue'
import detailsPageInfrastructureTree from '@/views/home/detailsPageInfrastructureTree.vue'
// import { message } from 'ant-design-vue'
import { message } from 'ant-design-vue'
import {
titleNameArray,
keyongziyuanqingkaungArray,

View File

@ -220,7 +220,7 @@
<div>
<img src="../../assets/home/success.png" alt="" />
</div>
<p>您已成功申请能力,请耐心等待审批结果结果会第一时间通知您</p>
<p>您已成功申请能力请耐心等待审批结果结果会第一时间通知您</p>
</div>
</div>
</article>
@ -290,7 +290,7 @@
? list.value[0].children
.filter((val) => val.id == list.value[0].checkedList[0])[0]
.resourceName.concat(
list.value[0].checkedList.length > 0
list.value[0].checkedList.length > 1
? '等能力申请' + num.value + '个'
: '能力申请'
)
@ -452,8 +452,22 @@
sgcDel({ ids: ids }).then((res) => {
if (res.data.msg === 'success') {
mybus.emit('getSgcNum')
router.push({
path: '/DetailsPageconetent',
query: {
select: '组件服务',
},
})
}
})
} else {
router.push({
path: '/DetailsPageconetent',
query: {
select: '组件服务',
},
})
}
})
}

View File

@ -51,7 +51,7 @@
<script setup>
import { ref, reactive, defineProps } from 'vue'
import mybus from '@/myplugins/mybus'
import { updateVisits } from '@/api/home'
import { updateVisits, browsingInsert } from '@/api/home'
const props = defineProps({
resourceList: { type: Array, default: null },
resourceTotal: { type: String, default: '' },
@ -66,6 +66,9 @@
const openHref = (item) => {
console.log(item.id, 'wowowo')
console.log(item.visits, 'wowowo')
browsingInsert({ resourceId: item.id }).then((res) => {
// console.log(res)
})
const arrList = ref([])
arrList.value = JSON.parse(window.sessionStorage.getItem('visits'))
if (arrList.value.indexOf(item.id) === -1) {

View File

@ -63,13 +63,18 @@
<div class="mynotice" v-show="mynoticeFlag">
<a-list item-layout="horizontal" :data-source="mynoticeData">
<template #renderItem="{ item }">
<a-list-item>
<a-list-item-meta :description="item.senderDate">
<template #title>
<a>{{ item.content }}</a>
</template>
</a-list-item-meta>
</a-list-item>
<a-tooltip placement="left">
<template #title>
<span>{{ item.content }}</span>
</template>
<a-list-item>
<a-list-item-meta :description="item.senderDate">
<template #title>
<a>{{ item.content }}</a>
</template>
</a-list-item-meta>
</a-list-item>
</a-tooltip>
</template>
</a-list>
<div class="bottom" @click="goToView()">查看更多</div>

View File

@ -50,6 +50,24 @@
:key="item.index"
>
<div class="item" :key="showKey">
<div
class="left"
style="display: flex; align-items: center"
v-if="
item.type === '应用资源' &&
item.infoList &&
item.infoList.filter((val) => val.attrType == '应用图片')[0]
"
>
<a-image
:width="106"
:preview="false"
:src="
item.infoList.filter((val) => val.attrType == '应用图片')[0]
.attrValue
"
/>
</div>
<div
class="left"
:class="
@ -78,7 +96,7 @@
? 'ywzj'
: ''
"
v-if="
v-else-if="
selectCardsname !== '基础设施' && selectCardsname !== '融合服务'
"
></div>
@ -136,7 +154,7 @@
</div>
</div>
<div class="dec">
<div
<!-- <div
v-if="
selectCardsname !== '基础设施' &&
selectCardsname !== '数据资源' &&
@ -144,49 +162,54 @@
"
>
<span>{{ item.shareType || '--' }}</span>
</div>
</div> -->
<div v-if="selectCardsname !== '融合服务'">
<span>{{ item.deptName || '--' }}</span>
</div>
<div v-if="selectCardsname !== '基础设施'">
<a-tooltip>
<template #title>{{ item.description }}</template>
{{ item.description || '--' }}
</a-tooltip>
</div>
</div>
<div class="bottom" v-if="selectCardsname !== '基础设施'">
<div>
<div
v-if="
selectCardsname !== '数据资源' &&
selectCardsname !== '融合服务'
"
>
浏览量{{ item.visits || 0 }}
<div
v-if="selectCardsname !== '基础设施'"
style="margin-top: 0.1rem"
class="description"
>
<a-tooltip>
<template #title>{{ item.description }}</template>
{{ item.description || '--' }}
</a-tooltip>
</div>
<div class="btn">
<div class="bottom" v-if="selectCardsname !== '基础设施'">
<div>
<div
v-if="
selectCardsname !== '数据资源' &&
selectCardsname !== '融合服务'
"
>
浏览量{{ item.visits || 0 }}
</div>
<div
v-if="
selectCardsname !== '应用资源' &&
selectCardsname !== '数据资源' &&
selectCardsname !== '融合服务'
"
>
申请量{{ item.applyCount || 0 }}
</div>
<div
v-if="
selectCardsname === '数据资源' &&
selectCardsname !== '融合服务'
"
>
数据量{{ item.sjlCount || 0 }}
</div>
<div v-if="selectCardsname !== '数据资源'">
收藏量{{ item.collectCount || 0 }}
</div>
</div>
<div
v-if="
selectCardsname !== '应用资源' &&
selectCardsname !== '数据资源' &&
selectCardsname !== '融合服务'
"
>
申请量{{ item.applyCount || 0 }}
</div>
<div
v-if="
selectCardsname === '数据资源' &&
selectCardsname !== '融合服务'
"
>
数据量{{ item.sjlCount || 0 }}
</div>
<div v-if="selectCardsname !== '数据资源'">
收藏量{{ item.collectCount || 0 }}
</div>
</div>
<!-- <div class="pingfen">
<!-- <div class="pingfen">
<a-tooltip placement="top" mouseEnterDelay="1">
<a-rate
:value="item.score || 0"
@ -195,8 +218,7 @@
/>
</a-tooltip>
</div> -->
</div>
<div class="btn">
</div>
<div class="right" v-if="selectCardsname !== '基础设施'">
<div class="shopping" :key="shoppingKey">
<template v-if="selectCardsname == '组件服务'">
@ -916,7 +938,7 @@
padding-left: 10px;
padding-right: 10px;
}
div:nth-child(3) {
div:nth-child(2) {
max-width: 200px;
display: -webkit-box;
/*设置为弹性盒子*/
@ -1049,4 +1071,18 @@
}
}
}
.description {
max-width: 990px;
height: 52px;
font-size: 14px;
line-height: 18px;
display: -webkit-box;
-webkit-line-clamp: 3;
/*最多显示3行*/
overflow: hidden;
/*超出隐藏*/
text-overflow: ellipsis;
/*超出显示为省略号*/
-webkit-box-orient: vertical;
}
</style>

View File

@ -414,11 +414,14 @@
// }
const getCamera = () => {
console.log('初始化调用')
getCameraByParentId(mapSearchParam.value).then((res) => {
console.log('RRRRRRRRRR', res.data.data)
dataSource.value = res.data.data
pagination.value.total = res.data.count
})
console.log('不选左侧树的时候不调用接口', mapSearchParam.value)
if (mapSearchParam.value.parentId) {
getCameraByParentId(mapSearchParam.value).then((res) => {
console.log('RRRRRRRRRR', res.data.data)
dataSource.value = res.data.data
pagination.value.total = res.data.count
})
}
}
//
const addShoppingCart = () => {

View File

@ -2,7 +2,7 @@
* @Author: hisense.wuhongjian
* @Date: 2022-04-19 17:18:48
* @LastEditors: hisense.wuhongjian
* @LastEditTime: 2022-05-06 19:11:32
* @LastEditTime: 2022-07-16 15:01:48
* @Description: markdown编辑器
-->
<template>
@ -44,7 +44,7 @@
}
},
created() {
this.uuidSplice()
// this.uuidSplice()
this.getDevelopmentFile()
},
methods: {
@ -92,12 +92,15 @@
const blob = new Blob([file], {
type: 'md',
})
let myfile = new File([blob], this.uuidSnum + '.md')
if (this.uuidSnum === '') {
this.uuidSplice()
}
let myfile = new File([blob], this.uuidSnum)
var formData = new FormData()
const type = pinyin(this.dataFrom.type, {
pattern: 'initial',
}).replace(/\s*/g, '')
formData.append('fileName', this.uuidSnum + '.md')
formData.append('fileName', this.uuidSnum)
formData.append('type', type)
formData.append('file', myfile) // 'file' HTTP Post, file File
// formData.append('name', this.route.currentRoute.query.id + '.md')
@ -118,22 +121,33 @@
}
},
async getDevelopmentFile() {
debugger
const uuidParam = this.dataFrom.infoList.filter((item) => {
if (item.attrType === '技术文档') {
return item
}
})
let uuid = ''
if (uuidParam[0].attrValue) {
uuid = uuidParam[0].attrValue.split('/')[1].split('.')[0]
}
this.uuidSnum = uuid
const type = pinyin(this.dataFrom.type, {
pattern: 'initial',
}).replace(/\s*/g, '')
console.log(type)
const param = {
type: type,
resourceId: this.uuidSnum,
resourceId: uuid,
}
const res = await getDevelopmentFile(param)
this.text = res.data
let infoList = {
attrType: '技术文档',
attrValue: this.text.data,
delFlag: 0,
}
mybus.emit('chageDataFrom', infoList)
// let infoList = {
// attrType: '',
// attrValue: this.text.data,
// delFlag: 0,
// }
// mybus.emit('chageDataFrom', infoList)
console.log('res', res)
},
},

View File

@ -23,7 +23,13 @@
<div class="title">审批详情</div>
<template v-for="item in dataSource.data" :key="item">
<div class="oddNumbers">子单号:{{ item[0] }}</div>
<a-table :dataSource="item[1]" :columns="columns" />
<a-table :dataSource="item[1]" :columns="columns">
<template #bodyCell="{ column, text }">
<template v-if="column.dataIndex === 'name'">
<a>{{ text }}</a>
</template>
</template>
</a-table>
</template>
</div>
</div>
@ -183,14 +189,12 @@
} else {
shifoushizujian.value = false
console.log(res.data.data.resourceDTO)
debugger
res.data.data.resourceDTO.infoList.forEach((val) => {
console.log(val, '111111111111111111111111')
if (val.attrValue === '智能算法') {
nameNotShow.value = true
algorithmShow.value = false
console.log(nameNotShow.value, algorithmShow.value, 'wowowo')
debugger
}
})
}
@ -268,6 +272,13 @@
text-align: center;
font-size: 16px;
}
: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 {
margin-bottom: 0.05rem;
}

View File

@ -44,7 +44,9 @@
>
<template #title>
<span
@click="showItem(item.resourceId, item.type, item.delFlag)"
@click="
showItem(item.resourceId, item.type, item.delFlag, item)
"
style="cursor: pointer"
class="name"
>
@ -142,6 +144,7 @@
import { onMounted, ref } from 'vue'
import { useRouter } from 'vue-router'
import { message } from 'ant-design-vue'
import { updateVisits, browsingInsert } from '@/api/home'
import mybus from '@/myplugins/mybus'
import { getBsList, BsDel, getTopCategory } from '@/api/personalCenter'
const router = useRouter()
@ -171,7 +174,11 @@
console.log('编目一级=============>', res.data)
res.data.data.forEach((val) => {
// tabList.value.push(val.name)
if (val.name == '应用资源' || val.name == '组件服务') {
if (
val.name == '应用资源' ||
val.name == '组件服务' ||
val.name == '知识库'
) {
tabList.value.push(val.name)
}
})
@ -234,7 +241,9 @@
name: val.resourceDTO.name,
id: val.id,
checked: false,
visits: val.resourceDTO.visits,
type: val.resourceDTO.type,
link: val.resourceDTO.link,
resourceId: val.resourceId,
createDate: val.createDate,
description: val.resourceDTO.description,
@ -267,6 +276,28 @@
console.log('search======================>', name.value)
}
const openHref = (item) => {
browsingInsert({ resourceId: item.resourceId }).then((res) => {
// console.log(res)
})
const arrList = ref([])
arrList.value = JSON.parse(window.sessionStorage.getItem('visits'))
if (arrList.value.indexOf(item.resourceId) === -1) {
arrList.value.push(item.resourceId)
updateVisits({
id: item.resourceId,
visits: item.visits || '0',
}).then(() => {
window.sessionStorage.setItem('visits', JSON.stringify(arrList.value))
})
}
window.open(item.link)
// window.open(
// window.SITE_CONFIG.previewUrl +
// 'hisense_office/onlinePreview?url=' +
// btoa(encodeURI(item.fileHref))
// )
}
//id
const dataResourceId = ref([])
@ -334,16 +365,20 @@
console.log(e)
}
//
const showItem = (id, type, delFlag) => {
const showItem = (id, type, delFlag, item) => {
if (delFlag == 0) {
console.log('进入详情')
mybus.emit('tabsChange', { flag: id })
router.push({
path: '/details',
query: {
id: id,
},
})
console.log('进入详情', item)
if (item.type === '知识库') {
openHref(item)
} else {
mybus.emit('tabsChange', { flag: id })
router.push({
path: '/details',
query: {
id: id,
},
})
}
}
}
</script>
@ -374,6 +409,13 @@
span {
margin-right: 0.3rem;
}
.name {
max-width: 11rem;
display: inline-block;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
}
}
.ant-list::-webkit-scrollbar {

View File

@ -68,8 +68,8 @@
</a-button>
</div>
</div>
<div class="items">
<div class="item" v-for="val in list" :key="val.id">
<div class="items" :key="showKey">
<div class="item" v-for="(val, valIndex) in list" :key="val.id">
<div class="item-top" @click="showBottom(val)">
<div>
<a-checkbox
@ -89,7 +89,6 @@
:loading="val.initLoading"
item-layout="horizontal"
:data-source="val.children"
:key="showKey"
>
<template #renderItem="{ item }">
<a-list-item>
@ -131,7 +130,7 @@
title="是否删除该记录?"
ok-text="是"
cancel-text="否"
@confirm="delOne(item)"
@confirm="delOne(item, valIndex)"
@cancel="cancel"
>
<a-button
@ -453,7 +452,7 @@
reverseSelectionFalg.value = !reverseSelectionFalg.value
}
//
const clean = () => {
const clean = (index) => {
name.value = ''
type.value = ''
pageNum.value = '1'
@ -463,10 +462,10 @@
checkedListAll.value = []
checkAll.value = false
showKey.value++
getList()
getList('', index)
}
//
const getList = (type) => {
const getList = (type, index) => {
if (type == 'init') {
pageNum.value = 1
pageSize.value = 99999
@ -491,7 +490,7 @@
val.pageNum = '1'
val.pageSize = '99999'
})
if (statistics == res.data.data.list.length) {
if (statistics != 0 && statistics == res.data.data.list.length) {
checkAll.value = true
}
if (list.value.length == 0) {
@ -501,8 +500,31 @@
load.value = Number(pageNum.value)
}
// console.log('===============>', load.value)
//
debugger
list.value = res.data.data.list
if (index || index === 0) {
debugger
list.value[index].show = true
// console.log('1111', list.value[index])
showNew(list.value[index])
// showBottom()
}
// list.value = res.data.data.list
console.log(
'重新请求值',
index,
// res.data.data.list[index].show,
list.value
)
total.value = res.data.data.deptCount
console.log(
'重新请求值2',
index,
// res.data.data.list[index].show,
list.value
)
showKey.value++
if (type == 'init' || type == 'changePage') {
getListByDeptId(list.value[0])
@ -573,11 +595,15 @@
}
//
const showBottom = (item) => {
debugger
item.show = !item.show
if (item.show) {
getListByDeptId(item)
}
}
const showNew = (item) => {
getListByDeptId(item)
}
//
const pageChange = (val) => {
checkAll.value = false
@ -642,13 +668,13 @@
}
//
const judgeAll = (item, val) => {
// console.log(
// '============>',
// item,
// val,
// list.value,
// checkedList.value
// )
console.log(
'判断是否全选============>',
item,
val,
list.value,
checkedList.value
)
if (!val) {
let all = true
list.value.map((val) => {
@ -734,7 +760,7 @@
}
}
const delOne = (item) => {
const delOne = (item, index) => {
// console.log(item)
sgcDel({
ids: [item.id],
@ -743,7 +769,8 @@
message.success('删除成功')
// console.log('================>', res)
mybus.emit('getSgcNum')
clean()
clean(index)
// val.show = true
}
})
}