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

View File

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

View File

@ -109,6 +109,11 @@ export default {
} }
console.log('数据列表', this.dataList, this.mixinViewModuleOptions.getDataListURL) 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) { if (this.mixinViewModuleOptions.requestCallback) {
this.mixinViewModuleOptions.requestCallback(res.data) this.mixinViewModuleOptions.requestCallback(res.data)
} }

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,8 +1,8 @@
<!-- <!--
* @Author: hisense.wuhongjian * @Author: hisense.wuhongjian
* @Date: 2022-04-27 19:34:30 * @Date: 2022-04-27 19:34:30
* @LastEditors: hisense.wuhongjian * @LastEditors: hisense.liangjunhua
* @LastEditTime: 2022-06-23 21:08:01 * @LastEditTime: 2022-07-16 11:40:26
* @Description: 告诉大家这是什么 * @Description: 告诉大家这是什么
--> -->
<template> <template>
@ -40,6 +40,17 @@
align="center" align="center"
width="50" width="50"
></el-table-column> ></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"> <el-table-column label="申请人" header-align="center" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ <span>{{

View File

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

View File

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

View File

@ -11,7 +11,16 @@
<div v-for='child in parent.children' :key='child.id'> <div v-for='child in parent.children' :key='child.id'>
<template v-if='judgmentType.filter(item => item.name==child.name).length === 0'> <template v-if='judgmentType.filter(item => item.name==child.name).length === 0'>
<div class="top">{{child.name}}</div> <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> <span >{{ item.name }}</span>
<!-- <upload :list="[]" v-if="item.type == 'image'" type="图片" btnName="上传图片" :maxCount="1" :data="item" <!-- <upload :list="[]" v-if="item.type == 'image'" type="图片" btnName="上传图片" :maxCount="1" :data="item"
tip="支持图片类型大小不超过100M"></upload> --> tip="支持图片类型大小不超过100M"></upload> -->
@ -23,10 +32,12 @@
tip="支持文件类型大小不超过100M"></upload> 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" <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> 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 == '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 == '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 == '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 == '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 == '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> <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: { methods: {
changeInfoList (obj) { changeInfoList (obj) {
this.$emit('changeInfoList', obj) this.$emit('changeInfoList', obj)
}, },
goToRichText () { 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 * @Author: hisense.wuhongjian
* @Date: 2022-03-29 16:45:25 * @Date: 2022-03-29 16:45:25
* @LastEditors: hisense.wuhongjian * @LastEditors: hisense.wuhongjian
* @LastEditTime: 2022-07-15 09:17:23 * @LastEditTime: 2022-07-16 16:41:18
* @Description: 告诉大家这是什么 * @Description: 告诉大家这是什么
--> -->
<!DOCTYPE html> <!DOCTYPE html>

View File

@ -1,8 +1,8 @@
/* /*
* @Author: hisense.wuhongjian * @Author: hisense.wuhongjian
* @Date: 2022-03-29 17:48:03 * @Date: 2022-03-29 17:48:03
* @LastEditors: hisense.wuhongjian * @LastEditors: hisense.liangjunhua
* @LastEditTime: 2022-04-12 10:07:15 * @LastEditTime: 2022-07-15 16:42:22
* @Description: 告诉大家这是什么 * @Description: 告诉大家这是什么
*/ */
import request from '@/utils/request' 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 //mock.js使dataaccessToken使mockheaders
// debugger
return request({ return request({
url: '/sys/user/info', url: '/sys/user/info',
method: 'get', 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 {*} code
* @param {*} msg * @param {*} msg
*/ */
const handleCode = (code, msg) => { const handleCode = (code, msg, res) => {
debugger // debugger
switch (code) { switch (code) {
case 401: case 401:
// message.error(msg || '')
store.dispatch('user/resetAll').catch(() => {}) 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 break
case 403: case 403:
router.push({ path: '/401' }).catch(() => {}) router.push({ path: '/401' }).catch(() => {})
@ -72,7 +58,7 @@ const instance = axios.create({
*/ */
instance.interceptors.request.use( instance.interceptors.request.use(
(config) => { (config) => {
debugger // debugger
const token = getAccessToken() const token = getAccessToken()
if (token) config.headers[tokenName] = token if (token) config.headers[tokenName] = token
if ( if (
@ -84,7 +70,10 @@ instance.interceptors.request.use(
if (debounce.some((item) => config.url.includes(item))) { 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 return config
}, },
(error) => { (error) => {
@ -103,17 +92,13 @@ instance.interceptors.response.use(
console.log('接口返回REDIRECT', response.headers.redirect) console.log('接口返回REDIRECT', response.headers.redirect)
response['Access-Control-Expose-Headers'] = 'redirect' response['Access-Control-Expose-Headers'] = 'redirect'
const { code, message } = response.data const { code, message } = response.data
debugger
if (code == '0' && response.headers.token) { if (response.headers.token) {
setAccessToken(response.headers.token) setAccessToken(response.headers.token)
} else { }
const token = getAccessToken() if (response.headers.redirect) {
if (response.headers.redirect && !token) { window.location.replace(response.headers.redirect)
// window.location.href = response.headers.redirect return
window.location.replace(response.headers.redirect)
return
// location.reload()
}
} }
if (response.headers.redirect === '/#/login') { if (response.headers.redirect === '/#/login') {
var keys = document.cookie.match(/[^ =;]+(?=\=)/g) var keys = document.cookie.match(/[^ =;]+(?=\=)/g)
@ -158,7 +143,7 @@ instance.interceptors.response.use(
// } // }
}, },
(error) => { (error) => {
debugger // debugger
console.log('接口error', error) console.log('接口error', error)
if (loadingInstance) loadingInstance.close() if (loadingInstance) loadingInstance.close()
@ -167,12 +152,12 @@ instance.interceptors.response.use(
console.log('接口返回', response) console.log('接口返回', response)
console.log('接口返回headers', response.headers) console.log('接口返回headers', response.headers)
console.log('接口返回REDIRECT', response.headers.redirect) console.log('接口返回REDIRECT', response.headers.redirect)
// if (response.headers.token) { if (response.headers.token) {
// setAccessToken(response.headers.token) setAccessToken(response.headers.token)
// } }
if (response.headers.redirect) { if (response.headers.redirect) {
window.location.replace(response.headers.redirect) window.location.replace(response.headers.redirect)
// return Promise.resolve() return Promise.resolve()
} }
const { status, data } = response const { status, data } = response

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -1,8 +1,8 @@
<!-- <!--
* @Author: hisense.liangjunhua * @Author: hisense.liangjunhua
* @Date: 2022-06-17 14:11:08 * @Date: 2022-06-17 14:11:08
* @LastEditors: hisense.liangjunhua * @LastEditors: hisense.wuhongjian
* @LastEditTime: 2022-07-15 11:51:18 * @LastEditTime: 2022-07-16 15:05:16
* @Description: 上架 * @Description: 上架
--> -->
<template> <template>
@ -111,13 +111,31 @@
></upload> ></upload>
</div> </div>
<div class="submit"> <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>
</div> </div>
</template> </template>
<template v-else> <template v-else>
<div class="bottom"> <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> <span>{{ item.name }}</span>
<a-input <a-input
v-if="item.type == 'input'" v-if="item.type == 'input'"
@ -176,6 +194,15 @@
:list="props.fileList2" :list="props.fileList2"
tip="支持文件类型大小不超过100M" tip="支持文件类型大小不超过100M"
></upload> ></upload>
<upload
v-else-if="item.type == 'package'"
type="压缩包"
btnName="上传安装包"
:maxCount="1"
:data="item"
:list="props.packageList"
tip="支持.zip类型"
></upload>
<div <div
class="Technical-text" class="Technical-text"
v-else-if="item.type == 'richText'" v-else-if="item.type == 'richText'"
@ -212,7 +239,22 @@
请选择关联组件 请选择关联组件
</a-button> </a-button>
<a-select <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" style="width: 240px"
v-model:value="item.note1" v-model:value="item.note1"
:placeholder="'请选择' + item.name" :placeholder="'请选择' + item.name"
@ -225,6 +267,18 @@
{{ itemSelect.dictLabel }} {{ itemSelect.dictLabel }}
</a-select-option> </a-select-option>
</a-select> </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 <div
v-else-if="item.type == 'checkBox'" v-else-if="item.type == 'checkBox'"
class="application-Area" class="application-Area"
@ -277,6 +331,7 @@
import mybus from '@/myplugins/mybus' import mybus from '@/myplugins/mybus'
import upload from '@/views/components/upload' import upload from '@/views/components/upload'
import { message } from 'ant-design-vue' import { message } from 'ant-design-vue'
import { getUserInfo, getDeptAll } from '@/api/user'
import { import {
getCategoryTreePage, getCategoryTreePage,
queryApplicationRelByResourceId, queryApplicationRelByResourceId,
@ -296,6 +351,8 @@
// //
fileList: { type: Array, default: null }, fileList: { type: Array, default: null },
fileList2: { type: Array, default: null }, fileList2: { type: Array, default: null },
//
packageList: { type: Array, default: null },
// //
imgList: { type: Array, default: null }, imgList: { type: Array, default: null },
// //
@ -348,6 +405,9 @@
// }] // }]
}) })
// console.log('props==========>', props) // console.log('props==========>', props)
const changeAdd = () => {
console.log('子组件方法触发~')
}
const data = ref({ const data = ref({
list: [], list: [],
}) })
@ -409,6 +469,25 @@
} }
data.value.list.push(item) 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 { } else {
data.value.list.push(item) data.value.list.push(item)
} }
@ -521,56 +600,106 @@
const mockData = ref([]) const mockData = ref([])
const titles = ref(['未关联的应用名称', '已关联的应用名称']) const titles = ref(['未关联的应用名称', '已关联的应用名称'])
const titleName = ref('关联应用') const titleName = ref('关联应用')
const targetKeys = ref([])
//
const targetKeysBack = ref([])
const sourceClick = () => { const sourceClick = () => {
mockData.value = []
visibleAssociatedApplication.value = true visibleAssociatedApplication.value = true
queryApplicationRelByResourceId({ props.dataFrom.infoList.forEach((val) => {
referenceId: 0, if (val.attrType === '来源应用' && val.attrValue != '') {
}).then((res) => { queryApplicationRelByResourceId({
// console.log(res.data.data.notLinked) referenceId: 0,
res.data.data.notLinked.forEach((val, index) => { }).then((res) => {
// console.log(val, index) // console.log(res.data.data.notLinked)
mockData.value.push({ res.data.data.notLinked.forEach((val, index) => {
key: val.id, mockData.value.push({
title: val.name, key: val.id,
description: 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 = () => { const componentsClick = () => {
titles.value = ['未关联的组件名称', '已关联的组件名称'] titles.value = ['未关联的组件名称', '已关联的组件名称']
titleName.value = '关联组件' titleName.value = '关联组件'
mockData.value = []
visibleAssociatedApplication.value = true visibleAssociatedApplication.value = true
queryResourceRelByKeyId({ props.dataFrom.infoList.forEach((val) => {
keyId: 0, if (val.attrType === '关联组件信息' && val.attrValue != '') {
type: '组件服务', queryResourceRelByKeyId({
referenceName: '', keyId: 0,
}).then((res) => { type: '组件服务',
// console.log(res.data.data.notLinked) referenceName: '',
res.data.data.notLinked.forEach((val, index) => { }).then((res) => {
// console.log(val, index) // console.log(res.data.data.notLinked)
mockData.value.push({ res.data.data.notLinked.forEach((val, index) => {
key: val.id, mockData.value.push({
title: val.name, key: val.id,
description: 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 selectedKeys = ref([])
const handleChange = (nextTargetKeys, direction, moveKeys) => { const handleChange = (nextTargetKeys, direction, moveKeys) => {
console.log('targetKeys: ', nextTargetKeys) console.log('targetKeys: ', nextTargetKeys)
console.log('direction: ', direction) console.log('direction: ', direction)
console.log('moveKeys: ', moveKeys) console.log('moveKeys: ', moveKeys)
targetKeys.value = moveKeys
} }
const handleSelectChange = (sourceSelectedKeys, targetSelectedKeys) => { const handleSelectChange = (sourceSelectedKeys, targetSelectedKeys) => {
console.log('targetSelectedKeys: ', targetSelectedKeys) console.log('targetSelectedKeys: ', targetSelectedKeys, sourceSelectedKeys)
} }
const handleOk = (e) => { const handleOk = (e) => {
@ -588,6 +717,13 @@
visibleAssociatedApplication.value = false 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) => { watch(data.value.list, (newProps, oldProps) => {
// console.log(newProps, oldProps) // console.log(newProps, oldProps)
newProps.forEach((val) => { 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> </script>
<style></style> <style></style>
<style lang="less" scoped> <style lang="less" scoped>
@ -873,4 +1024,7 @@
font-weight: 400; font-weight: 400;
text-align: left; text-align: left;
} }
:deep(.ant-transfer-list-header .ant-checkbox-wrapper) {
display: none !important;
}
</style> </style>

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -8,10 +8,10 @@
></DetalsTitle> ></DetalsTitle>
</div> </div>
<div class="content" v-for="item in dataFrom.content" :key="item.title"> <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="left">
<div class="content-left-title"> <div class="content-left-title">
<span>{{ item.title }}</span> <span>{{ item.title }}{{ item.titleType }}</span>
</div> </div>
<div class="content-left-content"> <div class="content-left-content">
<p> <p>
@ -29,7 +29,41 @@
</div> </div>
<div class="right"> <div class="right">
<div @click="technical()">技术文档</div> <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> </div>
<div class="content-right"> <div class="content-right">
@ -98,13 +132,19 @@
let dataFrom = ref({ let dataFrom = ref({
title: '使用方式', title: '使用方式',
englishTitle: 'USAGE', englishTitle: 'USAGE',
SDK: '',
content: [ content: [
{ {
title: '组件地址', title: '使用方式',
titleType: '',
link: { link: {
name: '服务接口:', name: '服务接口:',
value: '', value: '',
}, },
linkPlatform: {
name: '平台地址:',
value: '',
},
postMethod: { postMethod: {
name: '请求方式:', name: '请求方式:',
value: '', value: '',
@ -151,7 +191,7 @@
dataFrom.value.content[0].facilitator.value = props.dataList.deptName dataFrom.value.content[0].facilitator.value = props.dataList.deptName
dataFrom.value.content[0].people.value = props.dataList.deptContacts dataFrom.value.content[0].people.value = props.dataList.deptContacts
dataFrom.value.content[0].phone.value = props.dataList.deptPhone 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) console.log('dataList', props.dataList)
props.dataList.infoList.map((item) => { props.dataList.infoList.map((item) => {
if (item.attrType === '组件地址') { if (item.attrType === '组件地址') {
@ -163,8 +203,13 @@
} else if (item.attrType === '服务商联系电话') { } else if (item.attrType === '服务商联系电话') {
dataFrom.value.content[0].phone2.value = item.attrValue || '--' dataFrom.value.content[0].phone2.value = item.attrValue || '--'
} else if (item.attrType === '服务接口') { } else if (item.attrType === '服务接口') {
debugger
dataFrom.value.content[0].link.value = item.attrValue || '--' 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 === '服务商联系电话') { } else if (item.attrType === '服务商联系电话') {
dataFrom.value.content[0].phone2.value = item.attrValue || '--' dataFrom.value.content[0].phone2.value = item.attrValue || '--'
} else if (item.attrType === '服务接口') { } else if (item.attrType === '服务接口') {
debugger
dataFrom.value.content[0].link.value = item.attrValue || '--' 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('暂未上传使用手册') 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> </script>
<style lang="less" scoped> <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; display: flex;
flex-direction: column;
align-items: center;
padding: 0.8rem 0;
.content { .content-left {
margin-top: 0.3rem; 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; display: flex;
align-items: center;
justify-content: space-between;
padding: 0 0.35rem;
.content-left { .left {
height: 1.5rem; .content-left-title {
width: 6.2rem; font-size: 0.26rem;
background: url('~@/assets/detailsAll/business/business_usage_mode_bg.png') line-height: 0.26rem;
no-repeat; color: #212956;
background-position: center; margin-bottom: 0.2rem;
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 { span:first-child {
.content-left-title { margin-right: 0.1rem;
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;
}
}
} }
} }
.right { .content-left-content {
div { width: 4.2rem;
height: 0.4rem; font-size: 0.2rem;
width: 1.3rem; color: rgba(33, 41, 86, 0.8);
background: #ffffff; line-height: 0.2rem;
border-radius: 0.2rem;
color: #526aff;
font-size: 0.2rem;
display: flex;
justify-content: center;
align-items: center;
cursor: pointer;
}
div:first-child { p {
margin-bottom: 0.2rem; 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 { .right {
height: 1.5rem; div {
width: 6.2rem; height: 0.4rem;
background: url('~@/assets/detailsAll/business/business_usage_mode_bg.png') width: 1.3rem;
no-repeat; background: #ffffff;
background-position: center; border-radius: 0.2rem;
background-size: 100% 100%; color: #526aff;
border-radius: 0.1rem; font-size: 0.2rem;
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; display: flex;
font-size: 0.16rem; justify-content: center;
color: rgba(33, 41, 86, 0.8); align-items: center;
line-height: 0.2rem; cursor: pointer;
overflow: hidden; }
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-line-clamp: 1;
-webkit-box-orient: vertical; -webkit-box-orient: vertical;
flex-direction: column; margin-right: 0.15rem;
p { span {
// width: 1.60rem; cursor: pointer;
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;
}
} }
} }
} }
} }
} }
}
</style> </style>

View File

@ -68,11 +68,13 @@
item.attrType === '部署位置' item.attrType === '部署位置'
) { ) {
dataFrom.value.content[0].childrenContent.push(item) dataFrom.value.content[0].childrenContent.push(item)
} else if ( } else if (item.attrType === '等保定级') {
item.attrType === '是否等保备案' ||
item.attrType === '等保定级'
) {
dataFrom.value.content[1].childrenContent.push(item) dataFrom.value.content[1].childrenContent.push(item)
let isAndNo = {
attrType: '是否等保备案',
attrValue: '是',
}
dataFrom.value.content[1].childrenContent.push(isAndNo)
} else if (item.attrType === '访问地址') { } else if (item.attrType === '访问地址') {
let obj = { let obj = {
attrType: '访问地址', attrType: '访问地址',
@ -85,7 +87,7 @@
let data = [ let data = [
{ {
attrType: '是否等保备案', attrType: '是否等保备案',
attrValue: '------', attrValue: '',
}, },
{ {
attrType: '等保定级', attrType: '等保定级',
@ -116,11 +118,13 @@
item.attrType === '部署位置' item.attrType === '部署位置'
) { ) {
dataFrom.value.content[0].childrenContent.push(item) dataFrom.value.content[0].childrenContent.push(item)
} else if ( } else if (item.attrType === '等保定级') {
item.attrType === '是否等保备案' ||
item.attrType === '等保定级'
) {
dataFrom.value.content[1].childrenContent.push(item) dataFrom.value.content[1].childrenContent.push(item)
let isAndNo = {
attrType: '是否等保备案',
attrValue: '是',
}
dataFrom.value.content[1].childrenContent.push(isAndNo)
} else if (item.attrType === '访问地址') { } else if (item.attrType === '访问地址') {
let obj = { let obj = {
attrType: '访问地址', attrType: '访问地址',
@ -130,10 +134,11 @@
} }
}) })
if (dataFrom.value.content[1].childrenContent.length <= 0) { if (dataFrom.value.content[1].childrenContent.length <= 0) {
debugger
let data = [ let data = [
{ {
attrType: '是否等保备案', attrType: '是否等保备案',
attrValue: '------', attrValue: '',
}, },
{ {
attrType: '等保定级', attrType: '等保定级',
@ -144,11 +149,6 @@
dataFrom.value.content[1].childrenContent.push(itemContent) 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 * @Author: hisense.liangjunhua
* @Date: 2022-06-08 15:25:33 * @Date: 2022-06-08 15:25:33
* @LastEditors: hisense.liangjunhua * @LastEditors: hisense.wuhongjian
* @LastEditTime: 2022-06-14 11:30:52 * @LastEditTime: 2022-07-16 16:43:02
* @Description: 应用展示 视频播放 * @Description: 应用展示 视频播放
--> -->
<template> <template>
<div class="application-presentation" v-if="flag"> <div class="application-presentation" v-if="flag">
<detals-title title="应用展示" type="IMAGE&VIDEO"></detals-title> <detals-title title="应用展示" type="IMAGE&VIDEO"></detals-title>
<div <div class="box">
class="main" <div class="left" @click="chagneShow()"></div>
:style="`${img}background-position:center;background-size:cover;`" <div
> class="main"
<div class="play" @click="showModal"></div> :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> </div>
<a-modal <a-modal
v-model:visible="visible" v-model:visible="visible"
@ -59,6 +72,13 @@
'fullScreen', 'fullScreen',
], //, ], //,
}) })
const showFlag = ref(0)
const showArr = ref([])
const chagneShow = () => {
if (showArr.value.length > 1) {
showFlag.value = showFlag.value == 0 ? 1 : 0
}
}
const showModal = () => { const showModal = () => {
visible.value = true visible.value = true
} }
@ -69,41 +89,25 @@
const img = ref({}) const img = ref({})
console.log('111111111111111111111,', props.dataList) console.log('111111111111111111111,', props.dataList)
if (props.dataList.infoList) { if (props.dataList.infoList) {
let obj = props.dataList.infoList.filter( showArr.value = props.dataList.infoList.filter(
(item) => item.attrType === '应用展示视频' (item) => item.attrType === '应用展示视频' || item.attrType === '应用图片'
)[0] )
console.log('视频==============>', obj) console.log('视频==============>', showArr.value)
if (!obj) { if (showArr.value.length == 0) {
flag.value = false 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( watch(
() => props.dataList, () => props.dataList,
(val) => { (val) => {
if (val) { if (val) {
let obj = val.infoList.filter( showArr.value = props.dataList.infoList.filter(
(item) => item.attrType === '应用展示视频' (item) =>
)[0] item.attrType === '应用展示视频' || item.attrType === '应用图片'
console.log('视频==============>', obj) )
if (!obj) { console.log('视频==============>', showArr.value)
if (showArr.value.length == 0) {
flag.value = false 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; padding: 0.8rem 3rem 0;
.main { .main {
width: 13.14rem;
height: 3.4rem; height: 3.4rem;
border-radius: 0.1rem; border-radius: 0.1rem;
background: url('~@/assets/detailsAll/sf_video_bg.png') no-repeat; background: url('~@/assets/detailsAll/sf_video_bg.png') no-repeat;
@ -131,5 +136,41 @@
cursor: pointer; 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> </style>

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -102,24 +102,24 @@
if (!obj) { if (!obj) {
flag.value = false flag.value = false
} else { } else {
dataFrom.value.content[0].childrenContent[0].attrValue =
props.dataList.deptContacts
dataFrom.value.content[0].childrenContent[1].attrValue = dataFrom.value.content[0].childrenContent[1].attrValue =
props.dataList.deptPhone props.dataList.deptContacts || '--'
dataFrom.value.content[0].childrenContent[2].attrValue = 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) => { props.dataList.infoList.map((item) => {
if (item.attrType == '组件地址') { if (item.attrType == '组件地址') {
dataFrom.value.link = item.attrValue dataFrom.value.link = item.attrValue
} else if (item.attrType == '服务商联系人') { } else if (item.attrType == '服务商联系人') {
dataFrom.value.content[1].childrenContent[0].attrValue =
item.attrValue
} else if (item.attrType == '服务商联系电话') {
dataFrom.value.content[1].childrenContent[1].attrValue = dataFrom.value.content[1].childrenContent[1].attrValue =
item.attrValue item.attrValue || '--'
} else if (item.attrType == '服务商' || item.attrType == '服务商名') { } else if (item.attrType == '服务商联系电话') {
dataFrom.value.content[1].childrenContent[2].attrValue = 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) { if (!obj) {
flag.value = false flag.value = false
} else { } else {
dataFrom.value.content[0].childrenContent[0].attrValue =
props.dataList.deptContacts
dataFrom.value.content[0].childrenContent[1].attrValue = dataFrom.value.content[0].childrenContent[1].attrValue =
props.dataList.deptPhone props.dataList.deptContacts || '--'
dataFrom.value.content[0].childrenContent[2].attrValue = 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) => { props.dataList.infoList.map((item) => {
if (item.attrType == '组件地址') { if (item.attrType == '组件地址') {
dataFrom.value.link = item.attrValue dataFrom.value.link = item.attrValue
} else if (item.attrType == '服务商联系人') { } else if (item.attrType == '服务商联系人') {
dataFrom.value.content[1].childrenContent[0].attrValue =
item.attrValue
} else if (item.attrType == '服务商联系电话') {
dataFrom.value.content[1].childrenContent[1].attrValue = 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 ( } else if (
item.attrType == '服务商' || item.attrType == '服务商' ||
item.attrType == '服务商名' item.attrType == '服务商名'
) { ) {
dataFrom.value.content[1].childrenContent[2].attrValue = dataFrom.value.content[1].childrenContent[0].attrValue =
item.attrValue item.attrValue || '--'
} }
}) })
} }
@ -204,11 +204,11 @@
} }
.content { .content {
display: flex; display: flex;
width: 13rem; width: 14rem;
justify-content: space-between; justify-content: space-between;
.content-card { .content-card {
height: 1.8rem; height: 1.8rem;
width: 6.2rem; width: 6.6rem;
border-radius: 0.2rem; border-radius: 0.2rem;
background: linear-gradient( background: linear-gradient(
to right, to right,
@ -242,11 +242,18 @@
max-width: 2.8rem; max-width: 2.8rem;
div { div {
max-width: 2.8rem; max-width: 2.8rem;
overflow: hidden; // overflow: hidden;
text-overflow: ellipsis; // text-overflow: ellipsis;
display: -webkit-box; // display: -webkit-box;
-webkit-box-orient: vertical; // -webkit-box-orient: vertical;
-webkit-line-clamp: 1; // -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 * @Author: hisense.liangjunhua
* @Date: 2022-06-08 11:56:28 * @Date: 2022-06-08 11:56:28
* @LastEditors: hisense.liangjunhua * @LastEditors: hisense.liangjunhua
* @LastEditTime: 2022-07-05 11:42:59 * @LastEditTime: 2022-07-15 17:32:08
* @Description: 开发组件详情页头部 * @Description: 开发组件详情页头部
--> -->
<template> <template>
@ -21,12 +21,18 @@
<span class="label" v-if="props.dataList.type"> <span class="label" v-if="props.dataList.type">
{{ props.dataList.type }} {{ props.dataList.type }}
</span> </span>
<span class="label" v-if="componentType">
{{ componentType }}
</span>
<span class="label" v-if="props.dataList.shareType"> <span class="label" v-if="props.dataList.shareType">
{{ props.dataList.shareType }} {{ props.dataList.shareType }}
</span> </span>
<span class="label" v-if="props.dataList.shareCondition"> <span class="label" v-if="props.dataList.shareCondition">
{{ props.dataList.shareCondition }} {{ props.dataList.shareCondition }}
</span> </span>
<span class="label" v-if="deploymentLocation">
{{ deploymentLocation }}
</span>
</p> </p>
</div> </div>
<!-- <span class="label">免费</span> --> <!-- <span class="label">免费</span> -->
@ -52,7 +58,9 @@
<template #icon><shopping-cart-outlined /></template> <template #icon><shopping-cart-outlined /></template>
加入购物车 加入购物车
</a-button> </a-button>
<a-button type="primary" @click="goTOCollection()">收藏</a-button> <a-button type="primary" @click="goTOCollection()">
{{ scFlag ? '已' : '' }}收藏
</a-button>
</div> </div>
</div> </div>
<div class="right"></div> <div class="right"></div>
@ -61,7 +69,7 @@
<script setup> <script setup>
import { FormOutlined, ShoppingCartOutlined } from '@ant-design/icons-vue' import { FormOutlined, ShoppingCartOutlined } from '@ant-design/icons-vue'
import { defineProps, ref, watch } from 'vue' import { defineProps, ref, watch } from 'vue'
import { scInsert } from '@/api/personalCenter' import { scInsert, scDel } from '@/api/personalCenter'
import { sgcInsert } from '@/api/home' import { sgcInsert } from '@/api/home'
import { useRouter } from 'vue-router' import { useRouter } from 'vue-router'
import mybus from '@/myplugins/mybus' import mybus from '@/myplugins/mybus'
@ -71,6 +79,7 @@
}) })
const router = useRouter() const router = useRouter()
const applicationArea = ref('') const applicationArea = ref('')
const deploymentLocation = ref('') //
// //
const addShoppingCart = () => { const addShoppingCart = () => {
console.log('加入申购车==================>', props.dataList) console.log('加入申购车==================>', props.dataList)
@ -113,12 +122,38 @@
}) })
} }
// //
const scFlag = ref(props.dataList.isCollect)
const scFlag2 = ref(true)
const goTOCollection = () => { const goTOCollection = () => {
console.log('收藏===================》', props.dataList) console.log('收藏===================》', props.dataList)
scInsert([{ resourceId: props.dataList.id }]).then((res) => { if (scFlag2.value) {
console.log(res) scFlag2.value = false
message.success('收藏成功') 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('') const componentType = ref('')
if (props.dataList.infoList) { if (props.dataList.infoList) {
@ -128,6 +163,13 @@
let obj = props.dataList.infoList.filter( let obj = props.dataList.infoList.filter(
(val) => val.attrType === '组件类型' (val) => val.attrType === '组件类型'
)[0] )[0]
if (
props.dataList.infoList.filter((val) => val.attrType === '部署位置')[0]
) {
deploymentLocation.value = props.dataList.infoList.filter(
(val) => val.attrType === '部署位置'
)[0].attrValue
}
if (obj) { if (obj) {
componentType.value = obj.attrValue componentType.value = obj.attrValue
} }
@ -142,6 +184,15 @@
let obj = props.dataList.infoList.filter( let obj = props.dataList.infoList.filter(
(val) => val.attrType === '组件类型' (val) => val.attrType === '组件类型'
)[0] )[0]
if (
props.dataList.infoList.filter(
(val) => val.attrType === '部署位置'
)[0]
) {
deploymentLocation.value = props.dataList.infoList.filter(
(val) => val.attrType === '部署位置'
)[0].attrValue
}
if (obj) { if (obj) {
componentType.value = obj.attrValue componentType.value = obj.attrValue
} }
@ -188,8 +239,8 @@
} }
.lable-father { .lable-father {
position: absolute; position: absolute;
min-width: 3.5rem; min-width: 5.5rem;
right: -3.5rem; right: -5.5rem;
top: 0; top: 0;
} }
.label { .label {

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -50,6 +50,24 @@
:key="item.index" :key="item.index"
> >
<div class="item" :key="showKey"> <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 <div
class="left" class="left"
:class=" :class="
@ -78,7 +96,7 @@
? 'ywzj' ? 'ywzj'
: '' : ''
" "
v-if=" v-else-if="
selectCardsname !== '基础设施' && selectCardsname !== '融合服务' selectCardsname !== '基础设施' && selectCardsname !== '融合服务'
" "
></div> ></div>
@ -136,7 +154,7 @@
</div> </div>
</div> </div>
<div class="dec"> <div class="dec">
<div <!-- <div
v-if=" v-if="
selectCardsname !== '基础设施' && selectCardsname !== '基础设施' &&
selectCardsname !== '数据资源' && selectCardsname !== '数据资源' &&
@ -144,49 +162,54 @@
" "
> >
<span>{{ item.shareType || '--' }}</span> <span>{{ item.shareType || '--' }}</span>
</div> </div> -->
<div v-if="selectCardsname !== '融合服务'"> <div v-if="selectCardsname !== '融合服务'">
<span>{{ item.deptName || '--' }}</span> <span>{{ item.deptName || '--' }}</span>
</div> </div>
<div v-if="selectCardsname !== '基础设施'">
<a-tooltip>
<template #title>{{ item.description }}</template>
{{ item.description || '--' }}
</a-tooltip>
</div>
</div> </div>
<div class="bottom" v-if="selectCardsname !== '基础设施'"> <div
<div> v-if="selectCardsname !== '基础设施'"
<div style="margin-top: 0.1rem"
v-if=" class="description"
selectCardsname !== '数据资源' && >
selectCardsname !== '融合服务' <a-tooltip>
" <template #title>{{ item.description }}</template>
> {{ item.description || '--' }}
浏览量{{ item.visits || 0 }} </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>
<div <!-- <div class="pingfen">
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">
<a-tooltip placement="top" mouseEnterDelay="1"> <a-tooltip placement="top" mouseEnterDelay="1">
<a-rate <a-rate
:value="item.score || 0" :value="item.score || 0"
@ -195,8 +218,7 @@
/> />
</a-tooltip> </a-tooltip>
</div> --> </div> -->
</div> </div>
<div class="btn">
<div class="right" v-if="selectCardsname !== '基础设施'"> <div class="right" v-if="selectCardsname !== '基础设施'">
<div class="shopping" :key="shoppingKey"> <div class="shopping" :key="shoppingKey">
<template v-if="selectCardsname == '组件服务'"> <template v-if="selectCardsname == '组件服务'">
@ -916,7 +938,7 @@
padding-left: 10px; padding-left: 10px;
padding-right: 10px; padding-right: 10px;
} }
div:nth-child(3) { div:nth-child(2) {
max-width: 200px; max-width: 200px;
display: -webkit-box; 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> </style>

View File

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

View File

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

View File

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

View File

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

View File

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