Merge branch 'hi-ucs-dev' of http://10.16.3.230:8011/wuhongjian/hi-ucs-web into hi-ucs-dev
This commit is contained in:
commit
dd30c22954
|
@ -0,0 +1,568 @@
|
|||
<!-- 知识库 -->
|
||||
<template>
|
||||
<el-card shadow="never" class="aui-card--fill">
|
||||
<div class="mod-ability__bsabilityai">
|
||||
<el-form :inline="true" :model="dataForm">
|
||||
<el-form-item>
|
||||
<el-input v-model="dataForm.name" placeholder="名称" clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="getDataList2(dataForm.name)">{{
|
||||
$t('query')
|
||||
}}</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="info" @click="exportHandle()">{{
|
||||
$t('export')
|
||||
}}</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="showPutOnTheShelf()">上架</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button v-if="$hasPermission('ability:knowledgeBase:delete')" type="danger" @click="deleteHandle2()">{{
|
||||
$t('deleteBatch')
|
||||
}}</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button @click="reset">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-table v-loading="dataListLoading" :data="dataList" border @selection-change="dataListSelectionChangeHandle"
|
||||
:key="Math.random()" style="width: 100%" height="650px">
|
||||
<el-table-column type="selection" header-align="center" align="center" width="50">
|
||||
</el-table-column>
|
||||
<af-table-column :show-overflow-tooltip="true" width="280" prop="name" label="名称" header-align="center"
|
||||
align="center"></af-table-column>
|
||||
<af-table-column :show-overflow-tooltip="true" width="500" prop="description" label="描述" header-align="center"
|
||||
align="center"></af-table-column>
|
||||
<template v-if="dataList[0] && dataList[0].infoList2">
|
||||
<af-table-column :show-overflow-tooltip="true" v-for="(item, index) in dataList[0].infoList2"
|
||||
:key="index" :label="item.attrType" header-align="center" align="center">
|
||||
<template slot-scope="scope">
|
||||
{{ findValue(scope.row.infoList2, item.attrType) }}
|
||||
</template>
|
||||
</af-table-column>
|
||||
</template>
|
||||
|
||||
<el-table-column :label="$t('handle')" fixed="right" header-align="center" align="center" width="150">
|
||||
<template slot-scope="scope">
|
||||
<el-button v-if="$hasPermission('ability:knowledgeBase:update')" type="text" size="small"
|
||||
@click="UpdateData(scope.row)">{{ $t('update') }}</el-button>
|
||||
<el-button v-if="$hasPermission('ability:knowledgeBase:delete')" type="text" size="small"
|
||||
@click="deleteHandle2(scope.row.id)">{{ $t('delete') }}</el-button>
|
||||
<el-button type="text" size="small" @click="showDetail(scope.row)">详情</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-pagination :current-page="page" :page-sizes="[10, 20, 50, 100]" :page-size="limit" :total="Number(total)"
|
||||
layout="total, sizes, prev, pager, next, jumper" @size-change="pageSizeChangeHandle"
|
||||
@current-change="pageCurrentChangeHandle">
|
||||
</el-pagination>
|
||||
</div>
|
||||
|
||||
<!-- 选择类型 -->
|
||||
<el-dialog title="选择类型" :visible.sync="showPutOnTheShelfFlag" :close-on-click-modal="false"
|
||||
:close-on-press-escape="false" :before-close="clear" width="30%">
|
||||
<el-radio v-model="radio" v-for="(data, i) in insertList.children" :label="data.name" :key="i">
|
||||
</el-radio>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="clear">取 消</el-button>
|
||||
<el-button type="primary" @click="showPutOnTheShelfVue">确 定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
|
||||
|
||||
<el-dialog :title="submitFrom.id ? '修改' + radio : '上架' + radio" :visible.sync="showPutOnTheShelfFlag2"
|
||||
:close-on-click-modal="false" :close-on-press-escape="false" :destroy-on-close="true" :before-close="clear"
|
||||
width="50%">
|
||||
<putOnTheShelf ref="putOnTheShelf" :putOnTheShelfList="putOnTheShelfList" @changeInfoList="changeInfoList"
|
||||
:type="radio" :typeInput="typeInput" :required="required" :notFilled="notFilled" @submitData="submitData">
|
||||
</putOnTheShelf>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="clear">取 消</el-button>
|
||||
<el-button type="primary" @click="submitData">确 定</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import mixinViewModule from '@/mixins/view-module'
|
||||
import dictionaries from '@/utils/dictionaries'
|
||||
import qs from 'qs'
|
||||
import { pinyin } from 'pinyin-pro'
|
||||
import putOnTheShelf from '@/views/modules/putOnTheShelf'
|
||||
export default {
|
||||
mixins: [mixinViewModule],
|
||||
data() {
|
||||
return {
|
||||
required: [],
|
||||
// required: ['归属部门', '部门联系人', '部门联系人电话', '应用领域', '共享条件', '算法名称', '算法描述', '图层名称', '图层描述', '组件名称', '组件描述', '组件地址', '服务地址', '服务接口', '接口请求方式', '算法类别'],
|
||||
notFilled: [],
|
||||
insertList: [],
|
||||
putOnTheShelfList: [],
|
||||
radio: '',
|
||||
showPutOnTheShelfFlag: false,
|
||||
showPutOnTheShelfFlag2: false,
|
||||
submitFrom: {
|
||||
type: '知识库',
|
||||
deptId: '',
|
||||
delFlag: 0,
|
||||
infoList: [
|
||||
{
|
||||
attrType: '知识库类型',
|
||||
attrValue: '',
|
||||
delFlag: 0
|
||||
}
|
||||
]
|
||||
},
|
||||
mixinViewModuleOptions: {
|
||||
getDataListURL: '/resource/page',
|
||||
getDataListIsPage: true,
|
||||
exportURL: '/ability/bsabilityai/export',
|
||||
deleteURL: '/resource/delete',
|
||||
deleteIsBatch: true
|
||||
},
|
||||
disabled: false,
|
||||
dataForm: {
|
||||
name: '',
|
||||
creator: '',
|
||||
delFlag: 0,
|
||||
selectType: 0,
|
||||
type: '知识库'
|
||||
},
|
||||
typeInput: '知识库',
|
||||
uuidOne: '',
|
||||
uuidTwo: '',
|
||||
uuidSnum: ''
|
||||
}
|
||||
},
|
||||
watch: {},
|
||||
components: {
|
||||
putOnTheShelf
|
||||
},
|
||||
created() {
|
||||
this.dataForm.name = ''
|
||||
this.dataForm.type = '知识库'
|
||||
},
|
||||
mounted() {
|
||||
// window.addEventListener('resize', this.a)
|
||||
// this.fullScreen()
|
||||
this.reset()
|
||||
},
|
||||
methods: {
|
||||
reset() {
|
||||
this.$http
|
||||
.get(
|
||||
this.mixinViewModuleOptions.getDataListURL +
|
||||
'?' +
|
||||
qs.stringify({
|
||||
page: 1,
|
||||
limit: 10,
|
||||
creator: '',
|
||||
selectType: 0,
|
||||
delFlag: 0,
|
||||
type: '知识库',
|
||||
name: ''
|
||||
})
|
||||
)
|
||||
.then(({ data: res }) => {
|
||||
this.dataForm.name = ''
|
||||
if (res.code !== 0) {
|
||||
this.dataList = []
|
||||
this.total = 0
|
||||
return this.$message.error(res.msg)
|
||||
}
|
||||
this.dataList = this.mixinViewModuleOptions.getDataListIsPage
|
||||
? res.data.list
|
||||
: res.data
|
||||
this.dataList.map((item, index) => {
|
||||
const dataListSinforList = []
|
||||
item.infoList.map((itemson, indexson) => {
|
||||
if (
|
||||
itemson.attrType === '知识库类型'
|
||||
) {
|
||||
dataListSinforList.push(itemson)
|
||||
}
|
||||
})
|
||||
this.dataList[index].infoList2 = dataListSinforList
|
||||
})
|
||||
console.log('this.dataList', this.dataList)
|
||||
this.total = this.mixinViewModuleOptions.getDataListIsPage
|
||||
? res.data.total
|
||||
: 0
|
||||
if (this.mixinViewModuleOptions.requestCallback) {
|
||||
this.mixinViewModuleOptions.requestCallback(res.data)
|
||||
}
|
||||
this.dataListLoading = false
|
||||
})
|
||||
.catch(() => {
|
||||
this.dataListLoading = false
|
||||
})
|
||||
},
|
||||
findValue(list, type) {
|
||||
const found = list.find((item) => item.attrType === type)
|
||||
if (found) {
|
||||
return found.attrValue
|
||||
} else {
|
||||
return '暂无数据'
|
||||
}
|
||||
},
|
||||
showDetail(val) {
|
||||
console.log(val)
|
||||
window.open(window.SITE_CONFIG.previewUrl + '#/details?id=' + val.id)
|
||||
},
|
||||
getDataList2(names) {
|
||||
if (names != null) {
|
||||
this.$http
|
||||
.get(
|
||||
this.mixinViewModuleOptions.getDataListURL +
|
||||
'?' +
|
||||
qs.stringify({
|
||||
pageNum: 1,
|
||||
pageSize: this.limit,
|
||||
type: '知识库',
|
||||
creator: '',
|
||||
selectType: 0,
|
||||
delFlag: 0,
|
||||
name: names
|
||||
})
|
||||
)
|
||||
.then(({ data: res }) => {
|
||||
if (res.code !== 0) {
|
||||
this.dataList = []
|
||||
this.total = 0
|
||||
return this.$message.error(res.msg)
|
||||
}
|
||||
if (res.data.list.length !== 0) {
|
||||
this.dataList = res.data.list
|
||||
this.total = this.mixinViewModuleOptions.getDataListIsPage
|
||||
? res.data.total
|
||||
: 0
|
||||
if (this.mixinViewModuleOptions.requestCallback) {
|
||||
this.mixinViewModuleOptions.requestCallback(res.data)
|
||||
}
|
||||
this.dataListLoading = false
|
||||
this.dataList.map((item, index) => {
|
||||
const dataListSinforList = []
|
||||
item.infoList.map((itemson, indexson) => {
|
||||
if (
|
||||
itemson.attrType === '知识库类型'
|
||||
) {
|
||||
dataListSinforList.push(itemson)
|
||||
}
|
||||
})
|
||||
this.dataList[index].infoList2 = dataListSinforList
|
||||
})
|
||||
} else {
|
||||
this.$message.error('未查询到相关信息')
|
||||
this.reset()
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
this.dataListLoading = false
|
||||
})
|
||||
} else {
|
||||
this.$message.error('查询信息不能为空')
|
||||
}
|
||||
},
|
||||
// 新上架
|
||||
clear() {
|
||||
console.log('清空----------------------------------------')
|
||||
this.notFilled = []
|
||||
this.showPutOnTheShelfFlag = false
|
||||
this.showPutOnTheShelfFlag2 = false
|
||||
this.insertList = []
|
||||
this.putOnTheShelfList = []
|
||||
this.radio = ''
|
||||
this.submitFrom = {
|
||||
type: '知识库',
|
||||
deptId: '',
|
||||
delFlag: 0,
|
||||
infoList: [
|
||||
{
|
||||
attrType: '知识库类型',
|
||||
attrValue: '',
|
||||
delFlag: 0
|
||||
}
|
||||
]
|
||||
}
|
||||
this.reset()
|
||||
},
|
||||
showPutOnTheShelf() {
|
||||
this.showPutOnTheShelfFlag = true
|
||||
this.$http.get('/category/getCategoryTree').then((res) => {
|
||||
console.log('res------获取知识库类型------>', res);
|
||||
this.insertList = res.data.data.filter(
|
||||
(item) => item.name === '知识库'
|
||||
)[0]
|
||||
})
|
||||
},
|
||||
showPutOnTheShelfVue() {
|
||||
this.showPutOnTheShelfFlag = false
|
||||
this.showPutOnTheShelfFlag2 = true
|
||||
if (this.submitFrom.infoList[0]) {
|
||||
this.submitFrom.infoList[0].attrValue = this.radio
|
||||
}
|
||||
this.putOnTheShelfList = this.insertList.children.filter(
|
||||
(item) => item.name === this.radio
|
||||
)[0].children
|
||||
if (this.putOnTheShelfList[0] && this.putOnTheShelfList[0].children && this.putOnTheShelfList[0].children && this.putOnTheShelfList[0].children[0].children) {
|
||||
this.putOnTheShelfList[0].children[0].children.forEach(v => {
|
||||
if (v.name == '发布日期') {
|
||||
// 日期格式
|
||||
v.type = 'date'
|
||||
}
|
||||
})
|
||||
}
|
||||
console.log('this.putOnTheShelfList------------>', this.putOnTheShelfList[0].children[0].children);
|
||||
},
|
||||
changeInfoList(obj) {
|
||||
console.log(obj, this.submitFrom)
|
||||
this.submitFrom.infoList = this.submitFrom.infoList.filter(
|
||||
(item) => item.attrType !== obj.attrType
|
||||
)
|
||||
this.submitFrom.infoList.push(obj)
|
||||
},
|
||||
|
||||
submitData() {
|
||||
console.log('提交11111111111===============>', this.putOnTheShelfList, this.submitFrom)
|
||||
const arr = []
|
||||
this.putOnTheShelfList.map((item) => {
|
||||
item.children.map((child) => {
|
||||
if (child.children) {
|
||||
child.children.map((val) => {
|
||||
arr.push(val.name)
|
||||
if (
|
||||
val.type === 'input' ||
|
||||
val.type === 'textArea' ||
|
||||
val.type === 'select' ||
|
||||
val.type === 'checkBox' ||
|
||||
val.type === 'radio'
|
||||
) {
|
||||
this.submitFrom.infoList = this.submitFrom.infoList.filter(
|
||||
(item) => item.attrType !== val.name
|
||||
)
|
||||
}
|
||||
switch (val.name) {
|
||||
case '标准名称':
|
||||
case '模型名称':
|
||||
this.submitFrom.name = val.note1
|
||||
break;
|
||||
case '标准简介':
|
||||
case '模型描述':
|
||||
this.submitFrom.description = val.note1
|
||||
break;
|
||||
case '联系方式':
|
||||
this.submitFrom.deptPhone = val.note1
|
||||
break;
|
||||
case '所属产品线':
|
||||
this.submitFrom.deptId = val.note1
|
||||
break
|
||||
default:
|
||||
if (
|
||||
val.type !== 'image' &&
|
||||
val.type !== 'file' &&
|
||||
val.type !== 'video'
|
||||
) {
|
||||
this.submitFrom.infoList.push({
|
||||
attrType: val.name,
|
||||
attrValue: val.note1,
|
||||
delFlag: 0
|
||||
})
|
||||
} else {
|
||||
if (
|
||||
this.submitFrom.infoList.filter(
|
||||
(value) => value.attrType === val.name
|
||||
).length === 0
|
||||
) {
|
||||
this.submitFrom.infoList.push({
|
||||
attrType: val.name,
|
||||
attrValue: val.note1,
|
||||
delFlag: 0,
|
||||
note2: val.note2 || null
|
||||
})
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
})
|
||||
this.submitFrom.infoList = this.submitFrom.infoList.sort(
|
||||
(a, b) => arr.indexOf(a.attrType) - arr.indexOf(b.attrType)
|
||||
)
|
||||
if (this.submitFrom.id) {
|
||||
// 解决编辑无组件类型
|
||||
this.submitFrom.infoList.map((val) => {
|
||||
if (val.attrType === '知识库类型') {
|
||||
val.attrValue = this.radio
|
||||
}
|
||||
})
|
||||
}
|
||||
// 去重
|
||||
const newArr = this.submitFrom.infoList.filter(
|
||||
(element, index, self) => {
|
||||
return (
|
||||
self.findIndex((x) => x.attrType === element.attrType) === index
|
||||
)
|
||||
}
|
||||
)
|
||||
this.submitFrom.infoList = newArr
|
||||
this.notFilled = []
|
||||
if (!this.submitFrom.name) {
|
||||
this.notFilled.push('标准名称')
|
||||
this.notFilled.push('模型名称')
|
||||
}
|
||||
if (this.notFilled.length > 0) {
|
||||
this.$message({
|
||||
message: '请填写必填字段!',
|
||||
type: 'warning'
|
||||
})
|
||||
} else {
|
||||
// 表单提交
|
||||
console.log('this.submitFrom.infoList----表单提交-------->', this.submitFrom);
|
||||
let _url = this.submitFrom.id ? '/resource/update' : '/resource/insert?source= b';
|
||||
let _method = this.submitFrom.id ? 'put' : 'post';
|
||||
let _msg = this.submitFrom.id ? '修改' : '上架';
|
||||
this.$http[_method](_url, this.submitFrom)
|
||||
.then(({ data: res }) => {
|
||||
if (res.code !== 0) {
|
||||
this.$message.error(_msg + '失败!')
|
||||
} else {
|
||||
this.$message.success(_msg + '成功!')
|
||||
this.clear()
|
||||
}
|
||||
})
|
||||
.catch(() => { })
|
||||
}
|
||||
},
|
||||
// 新修改
|
||||
UpdateData(item) {
|
||||
this.$http.get('/category/getCategoryTree').then((res) => {
|
||||
this.insertList = res.data.data.filter(
|
||||
(item) => item.name === '知识库'
|
||||
)[0]
|
||||
console.log('this.insertList-------www----->', this.insertList);
|
||||
let _knowType = item.infoList.find((val) => val.attrType === '知识库类型') || {};
|
||||
console.log('_knowType------------>', _knowType);
|
||||
|
||||
this.radio = item.infoList.find(
|
||||
(val) => val.attrType === '知识库类型'
|
||||
).attrValue
|
||||
console.log('item.infoList------------>', item.infoList);
|
||||
console.log('this.radio---www--------->', this.radio);
|
||||
this.putOnTheShelfList = this.insertList.children.filter(
|
||||
(item) => item.name === this.radio
|
||||
)[0].children;
|
||||
if (this.putOnTheShelfList[0] && this.putOnTheShelfList[0].children && this.putOnTheShelfList[0].children && this.putOnTheShelfList[0].children[0].children) {
|
||||
this.putOnTheShelfList[0].children[0].children.forEach(v => {
|
||||
if (v.name == '发布日期') {
|
||||
// 日期格式
|
||||
v.type = 'date'
|
||||
}
|
||||
})
|
||||
}
|
||||
this.putOnTheShelfList.map((parent) => {
|
||||
console.log('parent-------ssss----->', parent);
|
||||
parent.children.map((child) => {
|
||||
if (child.children) {
|
||||
child.children.map((data) => {
|
||||
switch (data.name) {
|
||||
case '模型名称':
|
||||
case '标准名称':
|
||||
data.note1 = item.name
|
||||
break
|
||||
case '标准简介':
|
||||
case '模型描述':
|
||||
data.note1 = item.description
|
||||
break
|
||||
case '联系方式':
|
||||
data.note1 = item.deptPhone
|
||||
break
|
||||
case '所属产品线':
|
||||
data.note1 = item.deptId
|
||||
break
|
||||
default:
|
||||
// eslint-disable-next-line no-case-declarations
|
||||
const obj1 = item.infoList.filter(
|
||||
(val) => val.attrType === data.name
|
||||
)[0]
|
||||
if (obj1) {
|
||||
data.note1 = obj1.attrValue
|
||||
}
|
||||
break
|
||||
}
|
||||
if (
|
||||
data.type === 'image' ||
|
||||
data.type === 'file' ||
|
||||
data.type === 'video'
|
||||
) {
|
||||
const obj1 = item.infoList.filter(
|
||||
(val) => val.attrType === data.name
|
||||
)[0]
|
||||
if (obj1) {
|
||||
data.note2 = obj1.note2
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
})
|
||||
this.submitFrom.id = item.id
|
||||
this.showPutOnTheShelfFlag2 = true
|
||||
})
|
||||
},
|
||||
|
||||
// 新删除
|
||||
deleteHandle2(id) {
|
||||
if (id == undefined && this.dataListSelections.length < 1) {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '请选择要删除的数据'
|
||||
})
|
||||
} else {
|
||||
this.$confirm('确认是否删除?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
const ids = []
|
||||
if (id) {
|
||||
ids.push(id)
|
||||
} else {
|
||||
if (this.dataListSelections.length > 0) {
|
||||
this.dataListSelections.forEach(item => {
|
||||
ids.push(item.id)
|
||||
})
|
||||
}
|
||||
}
|
||||
this.$http.post('/resource/delete', { ids: ids }).then(res => {
|
||||
console.log('删除成功', res)
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: '删除成功!'
|
||||
})
|
||||
this.reset()
|
||||
})
|
||||
}).catch(() => {
|
||||
})
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.el-tooltip__popper {
|
||||
max-width: 50%;
|
||||
}
|
||||
|
||||
// ::v-deep .el-table .cell {
|
||||
// width: 200px;
|
||||
// }
|
||||
::v-deep .el-upload-list__item-name {
|
||||
width: 400px;
|
||||
}
|
||||
</style>
|
|
@ -19,7 +19,7 @@ js:
|
|||
<a-input v-if="type == 'input'" v-model:value="data.note1" :placeholder="'请输入' + name" @change="changeIiem(name,data.note1)"/>
|
||||
<!-- 下拉框 -->
|
||||
<el-select
|
||||
v-else-if="(type === 'select' && name !== '归属部门' && name !== '使用方式') || type == 'radio'"
|
||||
v-else-if="(type === 'select' && name !== '归属部门' && name !== '使用方式' && name !== '所属产品线') || type == 'radio'"
|
||||
style="width: 240px"
|
||||
v-model:value="data.note1"
|
||||
@change="changeIiem(name,data.note1)"
|
||||
|
@ -32,8 +32,8 @@ js:
|
|||
</el-option>
|
||||
</el-select>
|
||||
<el-select
|
||||
v-else-if="(type === 'select' && name === '归属部门')"
|
||||
style="width: 240px"
|
||||
v-else-if="(type === 'select' && (name === '归属部门' || name === '所属产品线'))"
|
||||
style="width:240px"
|
||||
v-model:value="data.note1"
|
||||
filterable
|
||||
placeholder="请输入关键词"
|
||||
|
@ -82,6 +82,11 @@ js:
|
|||
<el-radio v-for="item in options" :label="item.dictLabel" :key="item.dictLabel">{{item.dictLabel}}</el-radio>
|
||||
</el-radio-group> -->
|
||||
<a-textarea v-else-if="type == 'textArea'" @change="changeIiem(name,data.note1)" v-model:value="data.note1" :showCount="true" :maxlength="200" :placeholder="'请填写' + name" />
|
||||
<div class="block" v-else-if="type == 'date'">
|
||||
<el-date-picker v-model="data.note1" type="date" :placeholder="'选择' + name" value-format="yyyy-MM-dd">
|
||||
</el-date-picker>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
|
@ -132,7 +137,7 @@ export default {
|
|||
this.options = dataList
|
||||
})
|
||||
.catch(() => {})
|
||||
} else if (this.data.name === '归属部门') {
|
||||
} else if (this.data.name === '归属部门' || this.data.name === '所属产品线') {
|
||||
this.$http.get('/sys/dept/all').then(res => {
|
||||
const dataList = []
|
||||
res.data.data.forEach((element) => {
|
||||
|
@ -174,7 +179,7 @@ export default {
|
|||
})
|
||||
}
|
||||
// })
|
||||
}
|
||||
}
|
||||
},
|
||||
chekBoxChange (list) {
|
||||
let str = ''
|
||||
|
|
|
@ -47,7 +47,8 @@
|
|||
<input-select-checkbox :changeField='changeField' :list="[]" v-else-if="item.type == 'checkBox'" type="checkBox" :data="item" :name="item.name" :options="item.options"></input-select-checkbox>
|
||||
<input-select-checkbox :changeField='changeField' :list="[]" v-else-if="item.type == 'radio'" type="radio" :data="item" :name="item.name" :options="item.options"></input-select-checkbox>
|
||||
<input-select-checkbox :changeField='changeField' :list="[]" v-else-if="item.type == 'textArea'" type="textArea" :data="item" :name="item.name"></input-select-checkbox>
|
||||
</div>
|
||||
<input-select-checkbox :changeField='changeField' :list="[]" v-else-if="item.type == 'date'" type="date" :data="item" :name="item.name"></input-select-checkbox>
|
||||
</div>
|
||||
<div class="requiredTips" v-show="notFilled.indexOf(item.name) > -1 && (item.type=='input' || item.type=='textArea') && changeField.indexOf(item.name) == -1">请填写{{item.name}}!</div>
|
||||
<div class="requiredTips" v-show="notFilled.indexOf(item.name) > -1 && (item.type=='select' || item.type=='checkBox' || item.type=='radio') && changeField.indexOf(item.name) == -1">请选择{{item.name}}!</div>
|
||||
</div>
|
||||
|
|
|
@ -0,0 +1,133 @@
|
|||
<!--
|
||||
* @Author: hisense.liangjunhua
|
||||
* @Date: 2022-06-08 11:32:22
|
||||
* @LastEditors: hisense.wuhongjian
|
||||
* @LastEditTime: 2022-07-18 18:48:32
|
||||
* @Description: 模型详情页
|
||||
-->
|
||||
<template>
|
||||
<div class="application-details" :class="{ fixed2: scrollTop >= 600 }">
|
||||
<!-- 头部基本信息 -->
|
||||
<layer-service-top-details :dataList="dataList.data"></layer-service-top-details>
|
||||
<!-- tab导航 -->
|
||||
<GovernanceModelNavigation :dataList="dataList.data" :class="{ fixed: scrollTop >= 600 }" :selectNow="selectNow">
|
||||
</GovernanceModelNavigation>
|
||||
<!-- 输入数据 -->
|
||||
<GovernanceModelInputData :dataList="dataList.data" id="governance-model-input-data" class="scrollBox" title="输入数据">
|
||||
</GovernanceModelInputData>
|
||||
<!-- 输出数据 -->
|
||||
<GovernanceModelInputData :dataList="dataList.data" id="governance-model-output-data" class="scrollBox"
|
||||
title="输出数据">
|
||||
</GovernanceModelInputData>
|
||||
<!-- 模型规则 -->
|
||||
<GovernanceModelInputData :dataList="dataList.data" id="governance-model-rule" class="scrollBox" title="模型规则">
|
||||
</GovernanceModelInputData>
|
||||
</div>
|
||||
</template>
|
||||
<script setup>
|
||||
import GovernanceModelNavigation from '@/views/detailsAll/components/GovernanceModel/GovernanceModelNavigation.vue' // Tab信息
|
||||
import LayerServiceTopDetails from '@/views/detailsAll/components/GovernanceModel/GovernanceModelTopDetails.vue' // 头部基本信息
|
||||
import GovernanceModelInputData from '@/views/detailsAll/components/GovernanceModel/GovernanceModelInputData.vue' // 输入数据、输出数据、模型规则
|
||||
import { ref, onMounted, onBeforeUnmount, reactive } from 'vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
import {
|
||||
updateVisits,
|
||||
selectOne,
|
||||
browsingInsert,
|
||||
} from '@/api/home';
|
||||
import mybus from '@/myplugins/mybus';
|
||||
|
||||
const router = useRouter()
|
||||
const scrollTop = ref(0)
|
||||
const domArr = ref([])
|
||||
const selectNow = ref('')
|
||||
const dataList = reactive({ data: {} })
|
||||
const id = router.currentRoute.value.query.id
|
||||
const obj = JSON.parse(window.sessionStorage.getItem('preview'))
|
||||
let loading = ref(true)
|
||||
document.documentElement.style.transition = 'all 0.3s ease'
|
||||
document.documentElement.scrollTop = 0
|
||||
document.body.style.transition = 'all 0.3s ease'
|
||||
document.body.scrollTop = 0
|
||||
|
||||
mybus.on('flyToView', (id) => {
|
||||
let top = document.querySelector('#' + id).offsetTop - 50
|
||||
document.documentElement.scrollTop = top
|
||||
document.body.scrollTop = top
|
||||
})
|
||||
|
||||
onMounted(() => {
|
||||
window.addEventListener('scroll', () => {
|
||||
domArr.value = document.querySelectorAll('.scrollBox')
|
||||
scrollTop.value =
|
||||
document.documentElement.scrollTop || document.body.scrollTop
|
||||
for (let i = 0; i < domArr.value.length; i++) {
|
||||
if (i === 0) {
|
||||
if (scrollTop.value <= domArr.value[i + 1].offsetTop - 50) {
|
||||
selectNow.value = domArr.value[i].id
|
||||
}
|
||||
} else if (i == domArr.value.length - 1) {
|
||||
if (scrollTop.value >= domArr.value[i].offsetTop - 50) {
|
||||
selectNow.value = domArr.value[i].id
|
||||
}
|
||||
} else {
|
||||
if (
|
||||
scrollTop.value >= domArr.value[i].offsetTop - 50 &&
|
||||
scrollTop.value <= domArr.value[i + 1].offsetTop - 50
|
||||
) {
|
||||
selectNow.value = domArr.value[i].id
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
const init = (id) => {
|
||||
if (id) {
|
||||
selectOne(id).then((res) => {
|
||||
dataList.data = res.data.data
|
||||
console.log('初始化详情页=========================>', dataList.data)
|
||||
const arrList = ref([])
|
||||
arrList.value = JSON.parse(window.sessionStorage.getItem('visits'))
|
||||
if (arrList.value && arrList.value.indexOf(id) === -1) {
|
||||
arrList.value.push(id)
|
||||
updateVisits({
|
||||
id: res.data.data.id,
|
||||
visits: res.data.data.visits || '0',
|
||||
}).then(() => {
|
||||
window.sessionStorage.setItem(
|
||||
'visits',
|
||||
JSON.stringify(arrList.value)
|
||||
)
|
||||
})
|
||||
}
|
||||
// 浏览记录
|
||||
browsingInsert({
|
||||
resourceId: res.data.data.id,
|
||||
}).then(() => {
|
||||
console.log('浏览记录+1')
|
||||
})
|
||||
})
|
||||
} else if (obj) {
|
||||
dataList.data = obj
|
||||
console.log('预览==============', obj)
|
||||
}
|
||||
}
|
||||
init(id)
|
||||
onBeforeUnmount(() => {
|
||||
mybus.off('flyToView')
|
||||
})
|
||||
</script>
|
||||
<style lang="less" scoped>
|
||||
.fixed {
|
||||
position: fixed;
|
||||
z-index: 2000;
|
||||
top: 0;
|
||||
left: 50%;
|
||||
margin-left: -9.56rem;
|
||||
}
|
||||
|
||||
.fixed2>div:nth-of-type(3) {
|
||||
margin-top: 0.84rem;
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,138 @@
|
|||
<!--
|
||||
* @Author: hisense.liangjunhua
|
||||
* @Date: 2022-06-08 11:32:22
|
||||
* @LastEditors: hisense.wuhongjian
|
||||
* @LastEditTime: 2022-07-18 18:48:32
|
||||
* @Description: 数据标准详情页
|
||||
-->
|
||||
<template>
|
||||
<div class="application-details" :class="{ fixed2: scrollTop >= 600 }">
|
||||
<!-- 头部基本信息 -->
|
||||
<layer-service-top-details
|
||||
:dataList="dataList.data"
|
||||
></layer-service-top-details>
|
||||
<!-- 数据标准信息-->
|
||||
<layer-service-information
|
||||
:dataList="dataList.data"
|
||||
id="service-information"
|
||||
class="scrollBox"
|
||||
></layer-service-information>
|
||||
</div>
|
||||
</template>
|
||||
<script setup>
|
||||
import LayerServiceInformation from '@/views/detailsAll/components/StandardDoc/StandardDocInformation.vue' //数据标准信息
|
||||
import LayerServiceTopDetails from '@/views/detailsAll/components/StandardDoc/StandardDocTopDetails.vue' //头部基本信息
|
||||
import { ref, onMounted, onBeforeUnmount, reactive } from 'vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
import {
|
||||
updateVisits,
|
||||
selectOne,
|
||||
queryPartAppByKeyId2,
|
||||
browsingInsert,
|
||||
} from '@/api/home'
|
||||
import mybus from '@/myplugins/mybus'
|
||||
const router = useRouter()
|
||||
const scrollTop = ref(0)
|
||||
const domArr = ref([])
|
||||
const selectNow = ref('')
|
||||
const dataList = reactive({ data: {} })
|
||||
const id = router.currentRoute.value.query.id
|
||||
const obj = JSON.parse(window.sessionStorage.getItem('preview'))
|
||||
const associatedComponents = ref([{ type: '应用资源', dataList: [] }])
|
||||
let loading = ref(true)
|
||||
document.documentElement.style.transition = 'all 0.3s ease'
|
||||
document.documentElement.scrollTop = 0
|
||||
document.body.style.transition = 'all 0.3s ease'
|
||||
document.body.scrollTop = 0
|
||||
mybus.on('flyToView', (id) => {
|
||||
let top = document.querySelector('#' + id).offsetTop - 50
|
||||
// console.log(top, document.querySelector('#' + id).offsetTop)
|
||||
document.documentElement.scrollTop = top
|
||||
document.body.scrollTop = top
|
||||
})
|
||||
onMounted(() => {
|
||||
// console.clear()
|
||||
window.addEventListener('scroll', () => {
|
||||
domArr.value = document.querySelectorAll('.scrollBox')
|
||||
scrollTop.value =
|
||||
document.documentElement.scrollTop || document.body.scrollTop
|
||||
for (let i = 0; i < domArr.value.length; i++) {
|
||||
if (i === 0) {
|
||||
if (scrollTop.value <= domArr.value[i + 1].offsetTop - 50) {
|
||||
selectNow.value = domArr.value[i].id
|
||||
}
|
||||
} else if (i == domArr.value.length - 1) {
|
||||
if (scrollTop.value >= domArr.value[i].offsetTop - 50) {
|
||||
selectNow.value = domArr.value[i].id
|
||||
}
|
||||
} else {
|
||||
if (
|
||||
scrollTop.value >= domArr.value[i].offsetTop - 50 &&
|
||||
scrollTop.value <= domArr.value[i + 1].offsetTop - 50
|
||||
) {
|
||||
selectNow.value = domArr.value[i].id
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
const init = (id) => {
|
||||
if (id) {
|
||||
selectOne(id).then((res) => {
|
||||
// console.clear()
|
||||
dataList.data = res.data.data
|
||||
console.log('初始化详情页=========================>', dataList.data)
|
||||
const arrList = ref([])
|
||||
arrList.value = JSON.parse(window.sessionStorage.getItem('visits'))
|
||||
if (arrList.value && arrList.value.indexOf(id) === -1) {
|
||||
arrList.value.push(id)
|
||||
updateVisits({
|
||||
id: res.data.data.id,
|
||||
visits: res.data.data.visits || '0',
|
||||
}).then(() => {
|
||||
window.sessionStorage.setItem(
|
||||
'visits',
|
||||
JSON.stringify(arrList.value)
|
||||
)
|
||||
})
|
||||
}
|
||||
// 浏览记录
|
||||
browsingInsert({
|
||||
resourceId: res.data.data.id,
|
||||
}).then(() => {
|
||||
console.log('浏览记录+1')
|
||||
})
|
||||
})
|
||||
associatedComponents.value.map((item, index) => {
|
||||
let queryPartAppByKeyIdParams = {
|
||||
keyId: id,
|
||||
}
|
||||
queryPartAppByKeyId2(queryPartAppByKeyIdParams).then((res) => {
|
||||
associatedComponents.value[index].dataList = res.data.data
|
||||
loading.value = false
|
||||
})
|
||||
})
|
||||
} else if (obj) {
|
||||
dataList.data = obj
|
||||
console.log('预览==============', obj)
|
||||
}
|
||||
}
|
||||
init(id)
|
||||
onBeforeUnmount(() => {
|
||||
mybus.off('flyToView')
|
||||
})
|
||||
</script>
|
||||
<style lang="less" scoped>
|
||||
.fixed {
|
||||
position: fixed;
|
||||
z-index: 2000;
|
||||
top: 0;
|
||||
left: 50%;
|
||||
margin-left: -9.56rem;
|
||||
}
|
||||
|
||||
.fixed2 > div:nth-of-type(3) {
|
||||
margin-top: 0.84rem;
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,178 @@
|
|||
<!--
|
||||
* @Author: hisense.hucongqian
|
||||
* @Date: 2022-12-01 08:56:28
|
||||
* @LastEditors: hisense.hucongqian
|
||||
* @LastEditTime: 2022-12-01 11:54:40
|
||||
* @Description: 模型规则
|
||||
-->
|
||||
<template>
|
||||
<!-- 图层信息 -->
|
||||
<div class="usage-mode" >
|
||||
<div class="tltle">
|
||||
<DetalsTitle title="模型规则" type="INFORMATION"></DetalsTitle>
|
||||
</div>
|
||||
<div class="content">
|
||||
<div class="content-left">
|
||||
<div class="content-left-content">
|
||||
<ul>
|
||||
<li v-for="(item, index) in dataFromLeft.content" :key="index">
|
||||
<img :src="iconImg" />
|
||||
<span>{{ item.type }}</span>
|
||||
<a-tooltip>
|
||||
<template #title>{{ item.values }}</template>
|
||||
<p>{{ item.values }}</p>
|
||||
</a-tooltip>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import DetalsTitle from '@/views/detailsAll/components/DetalsTitle'
|
||||
import { ref, defineProps, watch } from 'vue'
|
||||
const iconImg = require('@/assets/detailsAll/layer-service/layer-icon.png')
|
||||
const dataFromLeft = ref({
|
||||
content: [
|
||||
{
|
||||
type: '服务类型',
|
||||
values: '',
|
||||
},
|
||||
{
|
||||
type: '输入数据',
|
||||
values: '',
|
||||
},
|
||||
{
|
||||
type: '详细规则',
|
||||
values: '',
|
||||
},
|
||||
],
|
||||
})
|
||||
//数据初始化
|
||||
const props = defineProps({
|
||||
dataList: { type: Object, default: null },
|
||||
})
|
||||
const flag = ref(true)
|
||||
if (props.dataList.infoList) {
|
||||
let obj = props.dataList.infoList.filter(
|
||||
(item) =>
|
||||
item.attrType === '服务类型' ||
|
||||
item.attrType === '输入数据' ||
|
||||
item.attrType === '详细规则'
|
||||
)[0]
|
||||
if (!obj) {
|
||||
flag.value = false
|
||||
} else {
|
||||
console.log('dataList', props.dataList)
|
||||
props.dataList.infoList.map((item) => {
|
||||
handleInfoList(item)
|
||||
})
|
||||
}
|
||||
}
|
||||
const handleInfoList = (item) => {
|
||||
if (item.attrType === '输入数据') {
|
||||
dataFromLeft.value.content[0].values = item.attrValue || '123'
|
||||
} else if (item.attrType === '输出数据') {
|
||||
dataFromLeft.value.content[1].values = item.attrValue || '--'
|
||||
} else if (item.attrType === '详细规则') {
|
||||
dataFromLeft.value.content[2].values = item.attrValue || '--'
|
||||
}
|
||||
}
|
||||
watch(
|
||||
() => props.dataList,
|
||||
(val) => {
|
||||
if (val) {
|
||||
let obj = val.infoList.filter(
|
||||
(item) =>
|
||||
item.attrType === '服务类型' ||
|
||||
item.attrType === '输入数据' ||
|
||||
item.attrType === '详细规则'
|
||||
)[0]
|
||||
if (!obj) {
|
||||
flag.value = false
|
||||
} else {
|
||||
console.log('dataList', val)
|
||||
val.infoList.map((item) => {
|
||||
handleInfoList(item)
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
)
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.usage-mode {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
padding: 0.8rem 0;
|
||||
|
||||
.content {
|
||||
margin-top: 0.3rem;
|
||||
display: flex;
|
||||
|
||||
.content-left {
|
||||
height: 2.8rem;
|
||||
background: url('~@/assets/detailsAll/layer-service/layer-bg.png');
|
||||
background-size: 100% 100%;
|
||||
background-repeat: no-repeat;
|
||||
border-radius: 0.1rem;
|
||||
box-shadow: 0rem 0.05rem 0.15rem rgba(82, 106, 255, 0.4);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 0 0.35rem;
|
||||
|
||||
.content-left-content {
|
||||
width: 100%;
|
||||
font-size: 0.2rem;
|
||||
color: rgba(33, 41, 86, 0.8);
|
||||
line-height: 0.2rem;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
|
||||
ul {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
ul li {
|
||||
list-style: none;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 0.3rem;
|
||||
line-height: 0.25rem;
|
||||
}
|
||||
|
||||
img {
|
||||
margin: 0 0.2rem 0 0;
|
||||
width: 0.15rem;
|
||||
height: 0.15rem;
|
||||
}
|
||||
|
||||
span {
|
||||
font-size: 0.2rem;
|
||||
color: #666666;
|
||||
display: block;
|
||||
margin-right: 0.5rem;
|
||||
width: 120px;
|
||||
}
|
||||
|
||||
p {
|
||||
margin-bottom: 0;
|
||||
font-size: 0.2rem;
|
||||
color: #333333;
|
||||
display: -webkit-box;
|
||||
overflow: hidden;
|
||||
-webkit-line-clamp: 1;
|
||||
-webkit-box-orient: vertical;
|
||||
word-break: break-all;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,108 @@
|
|||
<!--
|
||||
* @Author: hisense.hucongqian
|
||||
* @Date: 2022-12-01 08:56:28
|
||||
* @LastEditors: hisense.hucongqian
|
||||
* @LastEditTime: 2022-12-01 11:54:40
|
||||
* @Description: 模型详情信息
|
||||
-->
|
||||
|
||||
<template>
|
||||
<!-- 信息 -->
|
||||
<div class="usage-mode">
|
||||
<div class="tltle">
|
||||
<DetalsTitle :title="title" type="INFORMATION"></DetalsTitle>
|
||||
</div>
|
||||
<div class="content">
|
||||
<div class="content-left">
|
||||
{{ title }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import DetalsTitle from '@/views/detailsAll/components/DetalsTitle'
|
||||
import { ref, defineProps, watch } from 'vue'
|
||||
const iconImg = require('@/assets/detailsAll/layer-service/layer-icon.png')
|
||||
|
||||
// 数据初始化
|
||||
const props = defineProps({
|
||||
dataList: { type: Object, default: null },
|
||||
title: { type: String, default: '' },
|
||||
})
|
||||
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.usage-mode {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
padding: 0.8rem 0;
|
||||
|
||||
.content {
|
||||
margin-top: 0.3rem;
|
||||
display: flex;
|
||||
|
||||
.content-left {
|
||||
height: 2.8rem;
|
||||
background: url('~@/assets/detailsAll/layer-service/layer-bg.png');
|
||||
background-size: 100% 100%;
|
||||
background-repeat: no-repeat;
|
||||
border-radius: 0.1rem;
|
||||
box-shadow: 0rem 0.05rem 0.15rem rgba(82, 106, 255, 0.4);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 0 0.35rem;
|
||||
|
||||
.content-left-content {
|
||||
width: 100%;
|
||||
font-size: 0.2rem;
|
||||
color: rgba(33, 41, 86, 0.8);
|
||||
line-height: 0.2rem;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
|
||||
ul {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
ul li {
|
||||
list-style: none;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 0.3rem;
|
||||
line-height: 0.25rem;
|
||||
}
|
||||
|
||||
img {
|
||||
margin: 0 0.2rem 0 0;
|
||||
width: 0.15rem;
|
||||
height: 0.15rem;
|
||||
}
|
||||
|
||||
span {
|
||||
font-size: 0.2rem;
|
||||
color: #666666;
|
||||
display: block;
|
||||
margin-right: 0.5rem;
|
||||
width: 120px;
|
||||
}
|
||||
|
||||
p {
|
||||
margin-bottom: 0;
|
||||
font-size: 0.2rem;
|
||||
color: #333333;
|
||||
display: -webkit-box;
|
||||
overflow: hidden;
|
||||
-webkit-line-clamp: 1;
|
||||
-webkit-box-orient: vertical;
|
||||
word-break: break-all;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,88 @@
|
|||
<!--
|
||||
* @Description: 知识库--模型规则导航
|
||||
-->
|
||||
<template>
|
||||
<div class="governance-navigation" v-if="navList.length > 0">
|
||||
<template v-for="nav in navList" :key="nav.key">
|
||||
<div class="nav" :class="{ select: nav.key == select }" @click="selectNav(nav.key)">
|
||||
{{ nav.name }}
|
||||
<span class="line"></span>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
</template>
|
||||
<script setup>
|
||||
import { ref, defineProps, watch, getCurrentInstance } from 'vue'
|
||||
import mybus from '@/myplugins/mybus'
|
||||
// 获取当前路由地址
|
||||
const navList = ref([
|
||||
{
|
||||
name: '输入数据',
|
||||
key: 'governance-model-input-data',
|
||||
},
|
||||
{
|
||||
name: '输出数据',
|
||||
key: 'governance-model-output-data',
|
||||
},
|
||||
{
|
||||
name: '详细规则',
|
||||
key: 'governance-model-rule',
|
||||
},
|
||||
])
|
||||
const select = ref('governance-model-input-data')
|
||||
|
||||
const props = defineProps({
|
||||
selectNow: { type: String, default: '' },
|
||||
dataList: { type: Object, default: null },
|
||||
})
|
||||
|
||||
watch(
|
||||
() => props.selectNow,
|
||||
(newValue) => {
|
||||
select.value = newValue
|
||||
}
|
||||
)
|
||||
console.log('selectNow------------>', props.selectNow);
|
||||
|
||||
const selectNav = (key) => {
|
||||
select.value = key
|
||||
mybus.emit('flyToView', select.value)
|
||||
}
|
||||
|
||||
</script>
|
||||
<style lang="less" scoped>
|
||||
.governance-navigation {
|
||||
width: 1912px;
|
||||
height: 84px;
|
||||
line-height: 80px;
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
font-size: 24px;
|
||||
color: #666;
|
||||
background: #fff;
|
||||
padding: 0 300px;
|
||||
box-shadow: 0px 5px 10px #f2f3fb;
|
||||
position: relative;
|
||||
|
||||
.nav {
|
||||
cursor: pointer;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
|
||||
.line {
|
||||
width: 40px;
|
||||
height: 4px;
|
||||
}
|
||||
}
|
||||
|
||||
.select {
|
||||
color: #526aff;
|
||||
|
||||
.line {
|
||||
background: #526aff;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,189 @@
|
|||
<!--
|
||||
* @Author: hisense.hucongqian
|
||||
* @Date: 2022-12-01 08:56:28
|
||||
* @LastEditors: hisense.hucongqian
|
||||
* @LastEditTime: 2022-12-01 11:54:40
|
||||
* @Description: 模型详情页头部
|
||||
-->
|
||||
<template>
|
||||
<div class="algorithm-top-details">
|
||||
<div class="left">
|
||||
<div class="top">
|
||||
<a-tooltip placement="top">
|
||||
<template #title>{{ props.dataList.name }}</template>
|
||||
<span class="name">
|
||||
{{ props.dataList.name }}
|
||||
</span>
|
||||
</a-tooltip>
|
||||
<div class="label-content">
|
||||
<p class="lable-father">
|
||||
<span class="label" v-if="props.dataList.type">
|
||||
{{ props.dataList.type }}
|
||||
</span>
|
||||
<span class="label" v-if="componentType">
|
||||
{{ componentType }}
|
||||
</span>
|
||||
<span class="label" v-if="props.dataList.shareType">
|
||||
{{ props.dataList.shareType }}
|
||||
</span>
|
||||
<span class="label" v-if="props.dataList.shareCondition">
|
||||
{{ props.dataList.shareCondition }}
|
||||
</span>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="main">
|
||||
<a-tooltip placement="top">
|
||||
<template #title>应用领域:{{ businessArea }}</template>
|
||||
<div>应用领域:{{ businessArea }}</div>
|
||||
</a-tooltip>
|
||||
<a-tooltip placement="top">
|
||||
<template #title>{{ props.dataList.description }}</template>
|
||||
<div>
|
||||
{{ props.dataList.description }}
|
||||
</div>
|
||||
</a-tooltip>
|
||||
</div>
|
||||
</div>
|
||||
<div class="right"></div>
|
||||
</div>
|
||||
</template>
|
||||
<script setup>
|
||||
import { defineProps, ref, watch } from 'vue'
|
||||
const props = defineProps({
|
||||
dataList: { type: Object, default: null },
|
||||
})
|
||||
const businessArea = ref('')
|
||||
const componentType = ref('')
|
||||
if (props.dataList.infoList) {
|
||||
businessArea.value = props.dataList.infoList.filter(
|
||||
(val) => val.attrType === '应用场景'
|
||||
)[0].attrValue
|
||||
let obj = props.dataList.infoList.filter(
|
||||
(val) => val.attrType === '知识库类型'
|
||||
)[0]
|
||||
if (obj) {
|
||||
componentType.value = obj.attrValue
|
||||
}
|
||||
}
|
||||
console.log('val==========>', props.dataList.infoList)
|
||||
watch(
|
||||
() => props.dataList,
|
||||
(val) => {
|
||||
if (val) {
|
||||
console.log('val==========>', val)
|
||||
debugger
|
||||
businessArea.value = props.dataList.infoList.filter(
|
||||
(item) => item.attrType === '应用场景'
|
||||
)[0].attrValue
|
||||
let obj = props.dataList.infoList.filter(
|
||||
(item) => item.attrType === '知识库类型'
|
||||
)[0]
|
||||
if (obj) {
|
||||
componentType.value = obj.attrValue
|
||||
}
|
||||
}
|
||||
}
|
||||
)
|
||||
</script>
|
||||
<style lang="less" scoped>
|
||||
.algorithm-top-details {
|
||||
height: 6rem;
|
||||
padding: 1.8rem 0 0;
|
||||
background: url('~@/assets/detailsAll/sf_top_bg.png') no-repeat;
|
||||
background-size: 100%;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
.left {
|
||||
max-width: 7.2rem;
|
||||
color: #fff;
|
||||
margin-right: 0.8rem;
|
||||
|
||||
.top {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
span {
|
||||
font-size: 0.14rem;
|
||||
}
|
||||
.name {
|
||||
font-size: 0.4rem;
|
||||
margin-right: 0.2rem;
|
||||
max-width: 6rem;
|
||||
text-overflow: -o-ellipsis-lastline;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 1;
|
||||
-webkit-box-orient: vertical;
|
||||
word-break: break-all;
|
||||
}
|
||||
.label-content {
|
||||
position: relative;
|
||||
}
|
||||
.lable-father {
|
||||
position: absolute;
|
||||
min-width: 5.5rem;
|
||||
right: -5.5rem;
|
||||
top: 0;
|
||||
}
|
||||
.label {
|
||||
padding: 0.01rem 0.1rem;
|
||||
margin-right: 0.1rem;
|
||||
border-radius: 0.13rem;
|
||||
background: rgba(255, 255, 255, 0.4);
|
||||
}
|
||||
}
|
||||
.main {
|
||||
margin-top: 0.4rem;
|
||||
font-size: 0.18rem;
|
||||
line-height: 0.34rem;
|
||||
& > div:nth-of-type(1) {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
& > div:nth-of-type(2) {
|
||||
margin-top: 0.2rem;
|
||||
max-height: 1rem;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 3;
|
||||
-webkit-box-orient: vertical;
|
||||
word-break: break-all;
|
||||
}
|
||||
}
|
||||
.bottom {
|
||||
margin-top: 0.4rem;
|
||||
display: flex;
|
||||
.ant-btn {
|
||||
height: 0.5rem;
|
||||
margin-right: 0.2rem;
|
||||
background: #ff8b55;
|
||||
border-radius: 0.06rem;
|
||||
font-size: 0.2rem;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.ant-btn:nth-of-type(1) {
|
||||
width: 1.8rem;
|
||||
}
|
||||
.ant-btn:nth-of-type(2) {
|
||||
width: 2.2rem;
|
||||
}
|
||||
.ant-btn:nth-of-type(3) {
|
||||
width: 1.45rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
.right {
|
||||
width: 5.8rem;
|
||||
height: 4rem;
|
||||
background: url('~@/assets/detailsAll/layer-service/layer-top-bg.png')
|
||||
no-repeat;
|
||||
background-size: 100%;
|
||||
margin-top: -0.4rem;
|
||||
}
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,203 @@
|
|||
<!--
|
||||
* @Author: hisense.hucongqian
|
||||
* @Date: 2022-12-01 08:56:28
|
||||
* @LastEditors: hisense.hucongqian
|
||||
* @LastEditTime: 2022-12-01 11:54:40
|
||||
* @Description:数据标准规则
|
||||
-->
|
||||
<template>
|
||||
<!-- 图层信息 -->
|
||||
<div class="usage-mode" >
|
||||
<div class="tltle">
|
||||
<DetalsTitle title="标准详情" type="INFORMATION"></DetalsTitle>
|
||||
</div>
|
||||
<div class="content">
|
||||
<div class="content-left">
|
||||
<div class="content-left-content">
|
||||
<ul>
|
||||
<li v-for="(item, index) in dataFromLeft.content" :key="index">
|
||||
<img :src="iconImg" />
|
||||
<span>{{ item.type }}</span>
|
||||
<a-tooltip>
|
||||
<template #title>{{ item.values }}</template>
|
||||
<p>{{ item.values }}</p>
|
||||
</a-tooltip>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import DetalsTitle from '@/views/detailsAll/components/DetalsTitle'
|
||||
import { ref, defineProps, watch } from 'vue'
|
||||
const iconImg = require('@/assets/detailsAll/layer-service/layer-icon.png')
|
||||
const dataFromLeft = ref({
|
||||
content: [
|
||||
{
|
||||
type: '标准简介',
|
||||
values: '',
|
||||
},
|
||||
{
|
||||
type: '发布日期',
|
||||
values: '',
|
||||
},
|
||||
{
|
||||
type: '归属单位',
|
||||
values: '',
|
||||
},
|
||||
{
|
||||
type: '实际应用系统',
|
||||
values: '',
|
||||
},
|
||||
{
|
||||
type: '责任人',
|
||||
values: '',
|
||||
},
|
||||
{
|
||||
type: '联系方式',
|
||||
values: '',
|
||||
},
|
||||
],
|
||||
})
|
||||
//数据初始化
|
||||
const props = defineProps({
|
||||
dataList: { type: Object, default: null },
|
||||
})
|
||||
const flag = ref(true)
|
||||
if (props.dataList.infoList) {
|
||||
debugger
|
||||
let obj = props.dataList.infoList.filter(
|
||||
(item) =>
|
||||
item.attrType === '标准简介' ||
|
||||
item.attrType === '发布日期' ||
|
||||
item.attrType === '归属单位' ||
|
||||
item.attrType === '实际应用系统'||
|
||||
item.attrType === '责任人'||
|
||||
item.attrType === '联系方式'
|
||||
)[0]
|
||||
if (!obj) {
|
||||
flag.value = false
|
||||
} else {
|
||||
console.log('dataList', props.dataList)
|
||||
props.dataList.infoList.map((item) => {
|
||||
handleInfoList(item)
|
||||
})
|
||||
}
|
||||
}
|
||||
const handleInfoList = (item) => {
|
||||
if (item.attrType === '标准简介') {
|
||||
dataFromLeft.value.content[0].values = item.attrValue || '--'
|
||||
} else if (item.attrType === '发布日期') {
|
||||
dataFromLeft.value.content[1].values = item.attrValue || '--'
|
||||
} else if (item.attrType === '归属单位') {
|
||||
dataFromLeft.value.content[2].values = item.attrValue || '--'
|
||||
} else if (item.attrType === '实际应用系统') {
|
||||
dataFromLeft.value.content[3].values = item.attrValue || '--'
|
||||
} else if (item.attrType === '责任人') {
|
||||
dataFromLeft.value.content[4].values = item.attrValue || '--'
|
||||
} else if (item.attrType === '联系方式') {
|
||||
dataFromLeft.value.content[5].values = item.attrValue || '--'
|
||||
}
|
||||
}
|
||||
watch(
|
||||
() => props.dataList,
|
||||
(val) => {
|
||||
if (val) {
|
||||
let obj = val.infoList.filter(
|
||||
(item) =>
|
||||
item.attrType === '标准简介' ||
|
||||
item.attrType === '发布日期' ||
|
||||
item.attrType === '归属单位' ||
|
||||
item.attrType === '实际应用系统'||
|
||||
item.attrType === '责任人'||
|
||||
item.attrType === '联系方式'
|
||||
)[0]
|
||||
if (!obj) {
|
||||
flag.value = false
|
||||
} else {
|
||||
console.log('dataList', val)
|
||||
val.infoList.map((item) => {
|
||||
handleInfoList(item)
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
)
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.usage-mode {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
padding: 0.8rem 0;
|
||||
|
||||
.content {
|
||||
margin-top: 0.3rem;
|
||||
display: flex;
|
||||
|
||||
.content-left {
|
||||
height: 3.5rem;
|
||||
background: url('~@/assets/detailsAll/layer-service/layer-bg.png');
|
||||
background-size: 100% 100%;
|
||||
background-repeat: no-repeat;
|
||||
border-radius: 0.1rem;
|
||||
box-shadow: 0rem 0.05rem 0.15rem rgba(82, 106, 255, 0.4);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 0 0.35rem;
|
||||
|
||||
.content-left-content {
|
||||
width: 100%;
|
||||
font-size: 0.2rem;
|
||||
color: rgba(33, 41, 86, 0.8);
|
||||
line-height: 0.2rem;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
|
||||
ul {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
ul li {
|
||||
list-style: none;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 0.3rem;
|
||||
line-height: 0.25rem;
|
||||
}
|
||||
|
||||
img {
|
||||
margin: 0 0.2rem 0 0;
|
||||
width: 0.15rem;
|
||||
height: 0.15rem;
|
||||
}
|
||||
|
||||
span {
|
||||
font-size: 0.2rem;
|
||||
color: #666666;
|
||||
display: block;
|
||||
margin-right: 0.5rem;
|
||||
width: 120px;
|
||||
}
|
||||
|
||||
p {
|
||||
margin-bottom: 0;
|
||||
font-size: 0.2rem;
|
||||
color: #333333;
|
||||
display: -webkit-box;
|
||||
overflow: hidden;
|
||||
-webkit-line-clamp: 1;
|
||||
-webkit-box-orient: vertical;
|
||||
word-break: break-all;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,169 @@
|
|||
<!--
|
||||
* @Author: hisense.hucongqian
|
||||
* @Date: 2022-12-01 11:56:28
|
||||
* @LastEditors: hisense.hucongqian
|
||||
* @LastEditTime: 2022-12-01 11:54:40
|
||||
* @Description:数据标准详情页头部
|
||||
-->
|
||||
<template>
|
||||
<div class="algorithm-top-details">
|
||||
<div class="left">
|
||||
<div class="top">
|
||||
<a-tooltip placement="top">
|
||||
<template #title>{{ props.dataList.name }}</template>
|
||||
<span class="name">
|
||||
{{ props.dataList.name }}
|
||||
</span>
|
||||
</a-tooltip>
|
||||
<div class="label-content">
|
||||
<p class="lable-father">
|
||||
<span class="label" v-if="props.dataList.type">
|
||||
{{ props.dataList.type }}
|
||||
</span>
|
||||
<span class="label" v-if="componentType">
|
||||
{{ componentType }}
|
||||
</span>
|
||||
<span class="label" v-if="props.dataList.shareType">
|
||||
{{ props.dataList.shareType }}
|
||||
</span>
|
||||
<span class="label" v-if="props.dataList.shareCondition">
|
||||
{{ props.dataList.shareCondition }}
|
||||
</span>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="main">
|
||||
<a-tooltip placement="top">
|
||||
<template #title>应用领域:{{ businessArea }}</template>
|
||||
<div>应用领域:{{ businessArea }}</div>
|
||||
</a-tooltip>
|
||||
<a-tooltip placement="top">
|
||||
<template #title>{{ props.dataList.description }}</template>
|
||||
<div>
|
||||
{{ props.dataList.description }}
|
||||
</div>
|
||||
</a-tooltip>
|
||||
</div>
|
||||
</div>
|
||||
<div class="right"></div>
|
||||
</div>
|
||||
</template>
|
||||
<script setup>
|
||||
import { defineProps, ref, watch } from 'vue'
|
||||
const props = defineProps({
|
||||
dataList: { type: Object, default: null },
|
||||
})
|
||||
const businessArea = ref('')
|
||||
const componentType = ref('')
|
||||
if (props.dataList.infoList) {
|
||||
}
|
||||
console.log('val==========>', props.dataList.infoList)
|
||||
watch(
|
||||
() => props.dataList,
|
||||
(val) => {
|
||||
if (val) {
|
||||
}
|
||||
}
|
||||
)
|
||||
</script>
|
||||
<style lang="less" scoped>
|
||||
.algorithm-top-details {
|
||||
height: 6rem;
|
||||
padding: 1.8rem 0 0;
|
||||
background: url('~@/assets/detailsAll/sf_top_bg.png') no-repeat;
|
||||
background-size: 100%;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
.left {
|
||||
max-width: 7.2rem;
|
||||
color: #fff;
|
||||
margin-right: 0.8rem;
|
||||
|
||||
.top {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
span {
|
||||
font-size: 0.14rem;
|
||||
}
|
||||
.name {
|
||||
font-size: 0.4rem;
|
||||
margin-right: 0.2rem;
|
||||
max-width: 6rem;
|
||||
text-overflow: -o-ellipsis-lastline;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 1;
|
||||
-webkit-box-orient: vertical;
|
||||
word-break: break-all;
|
||||
}
|
||||
.label-content {
|
||||
position: relative;
|
||||
}
|
||||
.lable-father {
|
||||
position: absolute;
|
||||
min-width: 5.5rem;
|
||||
right: -5.5rem;
|
||||
top: 0;
|
||||
}
|
||||
.label {
|
||||
padding: 0.01rem 0.1rem;
|
||||
margin-right: 0.1rem;
|
||||
border-radius: 0.13rem;
|
||||
background: rgba(255, 255, 255, 0.4);
|
||||
}
|
||||
}
|
||||
.main {
|
||||
margin-top: 0.4rem;
|
||||
font-size: 0.18rem;
|
||||
line-height: 0.34rem;
|
||||
& > div:nth-of-type(1) {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
}
|
||||
& > div:nth-of-type(2) {
|
||||
margin-top: 0.2rem;
|
||||
max-height: 1rem;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 3;
|
||||
-webkit-box-orient: vertical;
|
||||
word-break: break-all;
|
||||
}
|
||||
}
|
||||
.bottom {
|
||||
margin-top: 0.4rem;
|
||||
display: flex;
|
||||
.ant-btn {
|
||||
height: 0.5rem;
|
||||
margin-right: 0.2rem;
|
||||
background: #ff8b55;
|
||||
border-radius: 0.06rem;
|
||||
font-size: 0.2rem;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
.ant-btn:nth-of-type(1) {
|
||||
width: 1.8rem;
|
||||
}
|
||||
.ant-btn:nth-of-type(2) {
|
||||
width: 2.2rem;
|
||||
}
|
||||
.ant-btn:nth-of-type(3) {
|
||||
width: 1.45rem;
|
||||
}
|
||||
}
|
||||
}
|
||||
.right {
|
||||
width: 5.8rem;
|
||||
height: 4rem;
|
||||
background: url('~@/assets/detailsAll/layer-service/layer-top-bg.png')
|
||||
no-repeat;
|
||||
background-size: 100%;
|
||||
margin-top: -0.4rem;
|
||||
}
|
||||
}
|
||||
</style>
|
|
@ -15,7 +15,7 @@
|
|||
<div class="details-pageconetent-left" v-else-if="Cardsname === '基础设施'">
|
||||
<detailsPageInfrastructureTree v-if="flag == '1'" />
|
||||
</div>
|
||||
<div class="top" v-if="Cardsname != '知识库' && Cardsname != '基础设施'">
|
||||
<div class="top" v-if="Cardsname != '基础设施'">
|
||||
<div class="resultListSearchInput-father">
|
||||
<div class="resultListSearchInput-son">
|
||||
模糊搜索
|
||||
|
@ -79,7 +79,7 @@
|
|||
<div class="top-content-father" :key="listKey">
|
||||
<template
|
||||
v-if="
|
||||
Cardsname == '组件服务' ||
|
||||
Cardsname == '组件服务' ||Cardsname == '知识库' ||
|
||||
Cardsname == '应用资源' ||
|
||||
Cardsname == ''
|
||||
"
|
||||
|
@ -278,10 +278,6 @@
|
|||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<KnowledgeBase
|
||||
:resourceList="resourceList"
|
||||
:resourceTotal="resourceTotal"
|
||||
></KnowledgeBase>
|
||||
</div>
|
||||
<!--客户反馈:能力集市-问答机器人属于互联网链接,先注释掉,不要删除。写一下注释,方便后面要放开的时候一下子找到。-->
|
||||
<!-- <div class="talk-monitor" @click="openMonitor">
|
||||
|
@ -317,7 +313,7 @@
|
|||
<div class="details-pageconetent-left" style="left: 0.16rem" v-else>
|
||||
<detailsPageInfrastructureTreeXha v-show="showFlag" />
|
||||
</div>
|
||||
<div class="top" v-if="Cardsname != '知识库' && Cardsname != '基础设施'">
|
||||
<div class="top" v-if="Cardsname != '基础设施'">
|
||||
<div class="top-title">
|
||||
<div
|
||||
v-for="item in titleName"
|
||||
|
@ -2581,7 +2577,7 @@
|
|||
span:nth-child(1) {
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
width: 0.68rem;
|
||||
width: 0.9rem;
|
||||
font-weight: 600;
|
||||
white-space: normal;
|
||||
text-align: center;
|
||||
|
|
|
@ -62,7 +62,7 @@
|
|||
// }
|
||||
.pageResource {
|
||||
position: absolute;
|
||||
top: 0.68rem;
|
||||
top: 1.2rem;
|
||||
left: -5.37rem;
|
||||
width: 176%;
|
||||
height: 90.5%;
|
||||
|
|
|
@ -13,7 +13,8 @@
|
|||
<IntegrationServiceOrder
|
||||
ref="integrationServiceOrderDom"
|
||||
v-if="
|
||||
selectCardsname === '融合服务' || selectCardsname === '赋能场景'
|
||||
selectCardsname === '融合服务' ||
|
||||
(selectCardsname === '赋能场景' && selectCardsname !== '知识库')
|
||||
"
|
||||
></IntegrationServiceOrder>
|
||||
<ul v-else>
|
||||
|
@ -310,8 +311,10 @@
|
|||
>
|
||||
<span>
|
||||
{{
|
||||
item.infoList.filter((val) => val.attrType == '组件类型')[0]
|
||||
.attrValue
|
||||
item.infoList.filter(
|
||||
(val) =>
|
||||
val.attrType == '组件类型' || val.attrType == '知识库类型'
|
||||
)[0].attrValue
|
||||
}}
|
||||
</span>
|
||||
</div>
|
||||
|
@ -337,7 +340,7 @@
|
|||
</div>
|
||||
<div class="btn">
|
||||
<div class="bottom" v-if="selectCardsname !== '基础设施'">
|
||||
<div>
|
||||
<div v-if="selectCardsname !== '知识库'">
|
||||
<!-- <div
|
||||
v-if="
|
||||
selectCardsname !== '数据资源' &&
|
||||
|
@ -395,7 +398,7 @@
|
|||
></span>
|
||||
</template>
|
||||
</div>
|
||||
<div class="sc">
|
||||
<div class="sc" v-if="selectCardsname !== '知识库'">
|
||||
<span
|
||||
class="sc-down"
|
||||
v-if="item.isCollect == 'false'"
|
||||
|
@ -426,6 +429,13 @@
|
|||
>
|
||||
查看详情
|
||||
</a-button>
|
||||
<a-button
|
||||
type="primary"
|
||||
@click.stop="downLoad(item)"
|
||||
v-if="whoShow1.itShowQingDao && selectCardsname == '知识库'"
|
||||
>
|
||||
下载
|
||||
</a-button>
|
||||
<a-button
|
||||
style="margin-left: 10px"
|
||||
v-show="
|
||||
|
@ -738,13 +748,21 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
// 下载
|
||||
const downLoad = (item) => {
|
||||
const a = document.createElement('a')
|
||||
a.href = item.infoList.filter(
|
||||
(val) => val.attrType === '标准文件'
|
||||
)[0].attrValue
|
||||
// a.download = item.infoList.filter(val =>val.attrType === '标准文件')[0].attrValue
|
||||
a.click()
|
||||
}
|
||||
|
||||
/**更换查询条件
|
||||
* val: 排序字段值
|
||||
* isFromFather: 是否来自父组件传值
|
||||
*/
|
||||
const changeCondition = (item, isFromFather = false) => {
|
||||
|
||||
console.log('item, isFromFather------------>', item, isFromFather)
|
||||
let newType = item.orderType == 'DESC' ? 'ASC' : 'DESC'
|
||||
if (isFromFather) {
|
||||
|
@ -919,6 +937,7 @@
|
|||
imgSrcZnsf,
|
||||
imgSrcKfzj,
|
||||
imgSrcYwzj,
|
||||
downLoad,
|
||||
}
|
||||
},
|
||||
beforeUnmount() {
|
||||
|
|
|
@ -8,139 +8,107 @@
|
|||
<template>
|
||||
<div>
|
||||
<div id="apply-container">
|
||||
<home-header :showView="showView" :target-flag = "targetFlag"></home-header>
|
||||
<home-header :showView="showView" :target-flag="targetFlag"></home-header>
|
||||
<detail-back></detail-back>
|
||||
<div class="detail-content">
|
||||
<details-view v-if="showView === 'details-view'"></details-view>
|
||||
<algorithm-details
|
||||
v-if="showView === 'algorithm-details'"
|
||||
></algorithm-details>
|
||||
<application-details
|
||||
v-else-if="showView === 'application-details'"
|
||||
></application-details>
|
||||
<developer-components
|
||||
v-else-if="showView === 'development-of-component'"
|
||||
></developer-components>
|
||||
<business-details
|
||||
v-else-if="showView === 'business-details'"
|
||||
></business-details>
|
||||
<layer-service v-else-if="showView === 'layer-service'"></layer-service>
|
||||
<details-view v-if="showView === 'details-view'"></details-view>
|
||||
<algorithm-details v-if="showView === 'algorithm-details'"></algorithm-details>
|
||||
<application-details v-else-if="showView === 'application-details'"></application-details>
|
||||
<developer-components v-else-if="showView === 'development-of-component'"></developer-components>
|
||||
<business-details v-else-if="showView === 'business-details'"></business-details>
|
||||
<layer-service v-else-if="showView === 'layer-service'"></layer-service>
|
||||
<governance-model v-else-if="showView === 'governance-model'"></governance-model>
|
||||
<standard-doc v-else-if="showView === 'standard-doc'"></standard-doc>
|
||||
</div>
|
||||
<home-footer></home-footer>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import HomeHeader from '@/views/home/components/header'
|
||||
import { defineComponent, reactive, ref } from 'vue'
|
||||
import DetailsView from './components/DetailsView.vue'
|
||||
import HomeFooter from '@/views/newHome/components/Footer'
|
||||
import AlgorithmDetails from '@/views/detailsAll/AlgorithmDetails'
|
||||
import ApplicationDetails from '@/views/detailsAll/ApplicationDetails'
|
||||
import DeveloperComponents from '@/views/detailsAll/DeveloperComponents'
|
||||
import BusinessDetails from '@/views/detailsAll/BusinessDetails'
|
||||
import LayerService from '@/views/detailsAll/LayerService'
|
||||
import detailBack from '@/views/home/detailBack.vue'
|
||||
import { selectOne } from '@/api/home'
|
||||
import { useRouter } from 'vue-router'
|
||||
export default defineComponent({
|
||||
name: '',
|
||||
props: {},
|
||||
components: {
|
||||
HomeHeader,
|
||||
DetailsView,
|
||||
HomeFooter,
|
||||
AlgorithmDetails,
|
||||
ApplicationDetails,
|
||||
DeveloperComponents,
|
||||
BusinessDetails,
|
||||
LayerService,
|
||||
detailBack
|
||||
},
|
||||
setup() {
|
||||
const formState = reactive({
|
||||
applyRequire: '',
|
||||
applyDept: '',
|
||||
applyName: '',
|
||||
applyPurpose: '',
|
||||
applySystem: '',
|
||||
})
|
||||
import HomeHeader from '@/views/home/components/header'
|
||||
import { defineComponent, reactive, ref } from 'vue'
|
||||
import DetailsView from './components/DetailsView.vue'
|
||||
import HomeFooter from '@/views/newHome/components/Footer'
|
||||
// import Standard from "@/views/detailsAll/StandardDoc "
|
||||
import AlgorithmDetails from '@/views/detailsAll/AlgorithmDetails'
|
||||
import ApplicationDetails from '@/views/detailsAll/ApplicationDetails'
|
||||
import DeveloperComponents from '@/views/detailsAll/DeveloperComponents'
|
||||
import BusinessDetails from '@/views/detailsAll/BusinessDetails'
|
||||
import LayerService from '@/views/detailsAll/LayerService'
|
||||
import GovernanceModel from '@/views/detailsAll/GovernanceModel'
|
||||
import StandardDoc from '@/views/detailsAll/StandardDoc'
|
||||
import detailBack from '@/views/home/detailBack.vue'
|
||||
import { selectOne } from '@/api/home'
|
||||
import { useRouter } from 'vue-router'
|
||||
export default defineComponent({
|
||||
name: '',
|
||||
props: {},
|
||||
components: {
|
||||
HomeHeader,
|
||||
DetailsView,
|
||||
HomeFooter,
|
||||
AlgorithmDetails,
|
||||
ApplicationDetails,
|
||||
DeveloperComponents,
|
||||
BusinessDetails,
|
||||
LayerService,
|
||||
detailBack,
|
||||
StandardDoc,
|
||||
GovernanceModel,
|
||||
|
||||
const options = ref([
|
||||
{
|
||||
value: '政法委',
|
||||
label: '政法委',
|
||||
},
|
||||
{
|
||||
value: '公安局',
|
||||
label: '公安局',
|
||||
},
|
||||
{
|
||||
value: '卫健委',
|
||||
label: '卫健委',
|
||||
},
|
||||
{
|
||||
value: '城市管理局',
|
||||
label: '城市管理局',
|
||||
},
|
||||
{
|
||||
value: '生态环境局',
|
||||
label: '生态环境局',
|
||||
},
|
||||
{
|
||||
value: '交通运输局',
|
||||
label: '交通运输局',
|
||||
},
|
||||
])
|
||||
const router = useRouter()
|
||||
const id = router.currentRoute.value.query.id
|
||||
const obj = JSON.parse(window.sessionStorage.getItem('preview'))
|
||||
let showView = ref('')
|
||||
const targetFlag= ref(true)
|
||||
const init = () => {
|
||||
if (id) {
|
||||
selectOne(id).then((res) => {
|
||||
if (res.data.data.type == '组件服务') {
|
||||
let detection = res.data.data.infoList.filter(
|
||||
(item) => item.attrType === '组件类型'
|
||||
)[0]
|
||||
if (detection) {
|
||||
res.data.data.infoList.map((item) => {
|
||||
if (item.attrType == '组件类型') {
|
||||
switch (item.attrValue) {
|
||||
case '智能算法':
|
||||
showView.value = 'algorithm-details'
|
||||
break
|
||||
case '开发组件':
|
||||
showView.value = 'development-of-component'
|
||||
break
|
||||
case '业务组件':
|
||||
showView.value = 'business-details'
|
||||
break
|
||||
case '图层服务':
|
||||
showView.value = 'layer-service'
|
||||
break
|
||||
default:
|
||||
break
|
||||
}
|
||||
}
|
||||
})
|
||||
} else {
|
||||
showView.value = 'algorithm-details'
|
||||
}
|
||||
} else {
|
||||
showView.value = 'application-details'
|
||||
}
|
||||
})
|
||||
} else if (obj) {
|
||||
console.log('obj============>', obj)
|
||||
if (obj.type == '组件服务') {
|
||||
let detection = obj.infoList.filter(
|
||||
},
|
||||
setup() {
|
||||
const formState = reactive({
|
||||
applyRequire: '',
|
||||
applyDept: '',
|
||||
applyName: '',
|
||||
applyPurpose: '',
|
||||
applySystem: '',
|
||||
})
|
||||
|
||||
const options = ref([
|
||||
{
|
||||
value: '政法委',
|
||||
label: '政法委',
|
||||
},
|
||||
{
|
||||
value: '公安局',
|
||||
label: '公安局',
|
||||
},
|
||||
{
|
||||
value: '卫健委',
|
||||
label: '卫健委',
|
||||
},
|
||||
{
|
||||
value: '城市管理局',
|
||||
label: '城市管理局',
|
||||
},
|
||||
{
|
||||
value: '生态环境局',
|
||||
label: '生态环境局',
|
||||
},
|
||||
{
|
||||
value: '交通运输局',
|
||||
label: '交通运输局',
|
||||
},
|
||||
])
|
||||
const router = useRouter()
|
||||
const id = router.currentRoute.value.query.id
|
||||
const obj = JSON.parse(window.sessionStorage.getItem('preview'))
|
||||
let showView = ref('')
|
||||
const targetFlag = ref(true)
|
||||
const init = () => {
|
||||
debugger
|
||||
if (id) {
|
||||
selectOne(id).then((res) => {
|
||||
if (res.data.data.type == '组件服务') {
|
||||
let detection = res.data.data.infoList.filter(
|
||||
(item) => item.attrType === '组件类型'
|
||||
)[0]
|
||||
if (detection) {
|
||||
obj.infoList.map((item) => {
|
||||
res.data.data.infoList.map((item) => {
|
||||
if (item.attrType == '组件类型') {
|
||||
switch (item.attrValue) {
|
||||
case '智能算法':
|
||||
|
@ -163,39 +131,121 @@
|
|||
} else {
|
||||
showView.value = 'algorithm-details'
|
||||
}
|
||||
} else if (res.data.data.type == '知识库') {
|
||||
let detection = res.data.data.infoList.find((item) => item.attrType === '知识库类型')
|
||||
console.log('detection---ww--------->', detection);
|
||||
if (detection) {
|
||||
res.data.data.infoList.map((item) => {
|
||||
if (item.attrType == '知识库类型') {
|
||||
switch (item.attrValue) {
|
||||
case '数据标准':
|
||||
showView.value = 'standard-doc'
|
||||
break
|
||||
case '治理模型':
|
||||
showView.value = 'governance-model'
|
||||
break
|
||||
default:
|
||||
showView.value = 'standard-doc'
|
||||
break
|
||||
}
|
||||
}
|
||||
})
|
||||
} else {
|
||||
showView.value = 'standard-doc'
|
||||
}
|
||||
} else {
|
||||
showView.value = 'application-details'
|
||||
showView.value = 'standard-doc'
|
||||
}
|
||||
})
|
||||
} else if (obj) {
|
||||
console.log('obj============>', obj)
|
||||
if (obj.type == '组件服务') {
|
||||
let detection = obj.infoList.filter(
|
||||
(item) => item.attrType === '组件类型'
|
||||
)[0]
|
||||
if (detection) {
|
||||
obj.infoList.map((item) => {
|
||||
if (item.attrType == '组件类型') {
|
||||
switch (item.attrValue) {
|
||||
case '智能算法':
|
||||
showView.value = 'algorithm-details'
|
||||
break
|
||||
case '开发组件':
|
||||
showView.value = 'development-of-component'
|
||||
break
|
||||
case '业务组件':
|
||||
showView.value = 'business-details'
|
||||
break
|
||||
case '图层服务':
|
||||
showView.value = 'layer-service'
|
||||
break
|
||||
default:
|
||||
break
|
||||
}
|
||||
}
|
||||
})
|
||||
} else {
|
||||
showView.value = 'algorithm-details'
|
||||
}
|
||||
} else if (obj.type == '知识库') {
|
||||
let detection = obj.infoList.filter(
|
||||
(item) => item.attrType === '知识库类型'
|
||||
)[0]
|
||||
if (detection) {
|
||||
obj.infoList.map((item) => {
|
||||
if (item.attrType == '知识库类型') {
|
||||
switch (item.attrValue) {
|
||||
case '数据标准':
|
||||
showView.value = 'standard-doc'
|
||||
break
|
||||
case '治理模型':
|
||||
showView.value = 'governance-model'
|
||||
break
|
||||
default:
|
||||
break
|
||||
}
|
||||
}
|
||||
})
|
||||
} else {
|
||||
showView.value = 'standard-doc'
|
||||
}
|
||||
} else {
|
||||
showView.value = 'standard-doc'
|
||||
}
|
||||
}
|
||||
init()
|
||||
|
||||
return {
|
||||
formState,
|
||||
options,
|
||||
showView,
|
||||
targetFlag,
|
||||
init,
|
||||
router,
|
||||
id,
|
||||
}
|
||||
},
|
||||
})
|
||||
}
|
||||
init()
|
||||
|
||||
return {
|
||||
formState,
|
||||
options,
|
||||
showView,
|
||||
targetFlag,
|
||||
init,
|
||||
router,
|
||||
id,
|
||||
}
|
||||
},
|
||||
})
|
||||
</script>
|
||||
|
||||
<style scoped lang="less"></style>
|
||||
<style>
|
||||
html,
|
||||
body {
|
||||
height: unset;
|
||||
}
|
||||
#apply-container {
|
||||
height: 100vh;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
}
|
||||
.detail-content{
|
||||
margin-top:90px;
|
||||
}
|
||||
<style scoped lang="less">
|
||||
|
||||
</style>
|
||||
<style>
|
||||
html,
|
||||
body {
|
||||
height: unset;
|
||||
}
|
||||
|
||||
#apply-container {
|
||||
height: 100vh;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.detail-content {
|
||||
margin-top: 90px;
|
||||
}
|
||||
</style>
|
||||
|
|
Loading…
Reference in New Issue