Merge branch 'hi-ucs-dev' of http://124.222.94.39:3001/wuhongjian/hi-ucs into hi-ucs-dev

This commit is contained in:
guoyue 2022-07-13 09:20:23 +08:00
commit 8acde6c897
28 changed files with 2529 additions and 1166 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.liangjunhua * @LastEditors: hisense.wuhongjian
* @LastEditTime: 2022-07-08 14:13:20 * @LastEditTime: 2022-07-11 18:56:36
* @Description: 告诉大家这是什么 * @Description: 告诉大家这是什么
--> -->
<!DOCTYPE html> <!DOCTYPE html>
@ -43,8 +43,9 @@
<script> <script>
// 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.238:8888/renren-admin'; window.SITE_CONFIG['apiURL'] = 'http://15.2.21.239:8888/renren-admin';
window.SITE_CONFIG['previewUrl'] = 'http://15.2.21.238:9796/';
// window.SITE_CONFIG['apiURL'] = 'http://15.2.23.141:8000/renren-admin'; // window.SITE_CONFIG['apiURL'] = 'http://15.2.23.141:8000/renren-admin';
// WebSocket地址 // WebSocket地址
window.SITE_CONFIG['socketURL'] ='ws://localhost:8080/renren-admin/websocket'; window.SITE_CONFIG['socketURL'] ='ws://localhost:8080/renren-admin/websocket';

View File

@ -19,14 +19,14 @@
$t("export") $t("export")
}}</el-button> }}</el-button>
</el-form-item> </el-form-item>
<el-form-item> <!-- <el-form-item>
<el-button <el-button
v-if="$hasPermission('ability:bsabilityai:save')" v-if="$hasPermission('ability:bsabilityai:save')"
type="primary" type="primary"
@click="addOrUpdateHandleAI()" @click="addOrUpdateHandleAI()"
>挂接</el-button >挂接</el-button
> >
</el-form-item> </el-form-item> -->
<el-form-item> <el-form-item>
<el-button <el-button
type="primary" type="primary"
@ -90,12 +90,19 @@
width="150" width="150"
> >
<template slot-scope="scope"> <template slot-scope="scope">
<el-button <!-- <el-button
v-if="$hasPermission('ability:bsabilityai:update')" v-if="$hasPermission('ability:bsabilityai:update')"
type="text" type="text"
size="small" size="small"
@click="UpdateHandle(scope.row)" @click="UpdateHandle(scope.row)"
>{{ $t("update") }}</el-button >{{ $t("update") }}</el-button
> -->
<el-button
v-if="$hasPermission('ability:bsabilityai:update')"
type="text"
size="small"
@click="UpdateData(scope.row)"
>{{ $t("update") }}</el-button
> >
<el-button <el-button
v-if="$hasPermission('ability:bsabilityai:delete')" v-if="$hasPermission('ability:bsabilityai:delete')"
@ -150,14 +157,14 @@
</span> </span>
</el-dialog> </el-dialog>
<el-dialog <el-dialog
:title="'上架'+radio" :title="submitFrom.id?'修改'+radio:'上架'+radio"
:visible.sync="showPutOnTheShelfFlag2" :visible.sync="showPutOnTheShelfFlag2"
:close-on-click-modal='false' :close-on-click-modal='false'
:close-on-press-escape='false' :close-on-press-escape='false'
:destroy-on-close='true' :destroy-on-close='true'
:before-close='clear' :before-close='clear'
width="50%"> width="50%">
<putOnTheShelf :putOnTheShelfList='putOnTheShelfList' @changeInfoList='changeInfoList' :type='radio'></putOnTheShelf> <putOnTheShelf :putOnTheShelfList='putOnTheShelfList' @changeInfoList='changeInfoList' :type='radio' :typeInput='typeInput'></putOnTheShelf>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button @click="clear"> </el-button> <el-button @click="clear"> </el-button>
<el-button type="primary" @click="submitData"> </el-button> <el-button type="primary" @click="submitData"> </el-button>
@ -219,7 +226,8 @@ export default {
id: '', id: '',
responseData: {}, responseData: {},
linkType: '' linkType: ''
} },
typeInput: '组件服务'
} }
}, },
watch: {}, watch: {},
@ -289,7 +297,6 @@ export default {
// this.addOrUpdateHandle(id) // this.addOrUpdateHandle(id)
this.addOrUpdateVisible = true this.addOrUpdateVisible = true
this.disabled = false this.disabled = false
console.log('显示数据=============》', val)
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.addOrUpdate.UpdateState = false this.$refs.addOrUpdate.UpdateState = false
this.$refs.addOrUpdate.dataFormShowDetails = val this.$refs.addOrUpdate.dataFormShowDetails = val
@ -298,7 +305,6 @@ export default {
this.disabled = true this.disabled = true
}, },
showDocument (val) { showDocument (val) {
console.log(val)
window.open( window.open(
window.SITE_CONFIG.frontUrl + '?id=' + val.id + '&&type=' + val.type, window.SITE_CONFIG.frontUrl + '?id=' + val.id + '&&type=' + val.type,
'_blank' '_blank'
@ -324,7 +330,6 @@ export default {
}) })
) )
.then(({ data: res }) => { .then(({ data: res }) => {
console.log('res', res)
if (res.code !== 0) { if (res.code !== 0) {
this.dataList = [] this.dataList = []
this.total = 0 this.total = 0
@ -354,32 +359,11 @@ export default {
fullScreen () { fullScreen () {
if (window.outerHeight === screen.availHeight) { if (window.outerHeight === screen.availHeight) {
if (window.outerWidth === screen.availWidth) { if (window.outerWidth === screen.availWidth) {
console.log(
'全屏1',
window.outerHeight,
screen.availHeight,
window.outerWidth,
screen.availWidth
)
this.qp = false this.qp = false
} else { } else {
console.log(
'不是全屏2',
window.outerHeight,
screen.availHeight,
window.outerWidth,
screen.availWidth
)
this.qp = true this.qp = true
} }
} else { } else {
console.log(
'不是全屏3',
window.outerHeight,
screen.availHeight,
window.outerWidth,
screen.availWidth
)
this.qp = true this.qp = true
} }
}, },
@ -400,10 +384,13 @@ export default {
handleIsShowRelatePopup (type) { handleIsShowRelatePopup (type) {
this.relateApplicationVisible = type this.relateApplicationVisible = type
}, },
// //
clear () { clear () {
console.log('清空----------------------------------------')
this.showPutOnTheShelfFlag = false this.showPutOnTheShelfFlag = false
this.showPutOnTheShelfFlag2 = false this.showPutOnTheShelfFlag2 = false
this.insertList = []
this.putOnTheShelfList = []
this.radio = '' this.radio = ''
this.submitFrom = { this.submitFrom = {
type: '组件服务', type: '组件服务',
@ -417,6 +404,7 @@ export default {
} }
] ]
} }
this.reset()
}, },
showPutOnTheShelf () { showPutOnTheShelf () {
this.showPutOnTheShelfFlag = true this.showPutOnTheShelfFlag = true
@ -429,19 +417,27 @@ export default {
this.showPutOnTheShelfFlag2 = true this.showPutOnTheShelfFlag2 = true
this.submitFrom.infoList[0].attrValue = this.radio this.submitFrom.infoList[0].attrValue = this.radio
this.putOnTheShelfList = this.insertList.children.filter(item => item.name === this.radio)[0].children this.putOnTheShelfList = this.insertList.children.filter(item => item.name === this.radio)[0].children
console.log('radio', this.radio)
}, },
changeInfoList (obj) { changeInfoList (obj) {
console.log(obj, this.submitFrom)
this.submitFrom.infoList = this.submitFrom.infoList.filter((item) => item.attrType !== obj.attrType) this.submitFrom.infoList = this.submitFrom.infoList.filter((item) => item.attrType !== obj.attrType)
this.submitFrom.infoList.push(obj) this.submitFrom.infoList.push(obj)
}, },
submitData () { submitData () {
console.log('编辑11111111111===============>', this.putOnTheShelfList)
const arr = [] const arr = []
this.putOnTheShelfList.map(item => { this.putOnTheShelfList.map(item => {
item.children.map(child => { item.children.map(child => {
if (child.children) { if (child.children) {
if (child.name === '算法优势' || child.name === '应用场景' || child.name === '功能介绍') { if (child.name === '算法优势' || child.name === '应用场景' || child.name === '功能介绍') {
arr.push(child.name) arr.push(child.name)
if (this.submitFrom.infoList.filter(value => value.attrType === child.name).length === 0) {
this.submitFrom.infoList.push({
attrType: child.name,
attrValue: child.note1,
delFlag: 0
})
}
} }
child.children.map(val => { child.children.map(val => {
arr.push(val.name) arr.push(val.name)
@ -483,12 +479,29 @@ export default {
case '部门联系人电话': case '部门联系人电话':
this.submitFrom.deptPhone = val.note1 this.submitFrom.deptPhone = val.note1
break break
case '归属部门':
this.submitFrom.deptId = val.note1
break
case '能力类型':
this.submitFrom.type = val.note1
break
default: default:
this.submitFrom.infoList.push({ if (val.type !== 'image' && val.type !== 'file' && val.type !== 'video') {
attrType: val.name, this.submitFrom.infoList.push({
attrValue: val.note1, attrType: val.name,
delFlag: 0 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 break
} }
} }
@ -497,7 +510,124 @@ 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))
console.log('表单数据=================>', this.submitFrom, this.putOnTheShelfList, arr) if (this.submitFrom.id) {
//
this.submitFrom.infoList.map(val => {
if (val.attrType === '组件类型') {
val.attrValue = this.radio
}
})
console.log('编辑===============>', this.submitFrom)
this.$http
.put('/resource/update', this.submitFrom)
.then(({ data: res }) => {
if (res.code !== 0) {
this.$message.error('修改失败!')
} else {
this.$message.success('修改成功!')
this.clear()
}
})
.catch(() => {})
} else {
this.$http
.post('/resource/insert?source= b', this.submitFrom)
.then(({ data: res }) => {
if (res.code !== 0) {
this.$message.error('上架失败!')
} else {
this.$message.success('上架成功!')
this.clear()
}
})
.catch(() => {})
}
},
//
UpdateData (item) {
this.$http.get('/category/getCategoryTree').then(res => {
this.insertList = res.data.data.filter(item => item.name === '组件服务一')[0]
this.radio = item.infoList.filter(val => val.attrType === '组件类型')[0].attrValue
this.putOnTheShelfList = this.insertList.children.filter(item => item.name === this.radio)[0].children
this.putOnTheShelfList.map(parent => {
parent.children.map(child => {
if (child.name === '算法优势' || child.name === '应用场景' || child.name === '功能介绍') {
const obj = item.infoList.filter(val => val.attrType === child.name)[0]
if (obj) {
child.note1 = obj.attrValue
}
} else {
if (child.children) {
child.children.map(data => {
if (data.name === '计费标准信息' || data.name === '常见问题') {
const obj = item.infoList.filter(val => val.attrType === child.name)[0]
if (obj) {
data.note1 = obj.attrValue
}
} else {
switch (data.name) {
case '算法名称':
case '应用名称':
case '组件名称':
case '图层名称':
data.note1 = item.name
break
case '算法描述':
case '应用描述':
case '组件描述':
case '图层描述':
data.note1 = item.description
break
case '共享条件':
data.note1 = item.shareCondition
break
case '共享类型':
data.note1 = item.shareType
break
case '服务接口':
data.note1 = item.apiUrl
break
case '接口请求方式':
data.note1 = item.apiMethodType
break
case '访问地址':
data.note1 = item.link
break
case '部门联系人':
data.note1 = item.deptContacts
break
case '部门联系人电话':
data.note1 = item.deptPhone
break
case '归属部门':
data.note1 = item.deptId
break
case '能力类型':
data.note1 = item.type
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
})
} }
} }
} }

View File

@ -19,13 +19,20 @@
$t("export") $t("export")
}}</el-button> }}</el-button>
</el-form-item> </el-form-item>
<el-form-item> <!-- <el-form-item>
<el-button <el-button
v-if="$hasPermission('ability:bsabilityai:save')" v-if="$hasPermission('ability:bsabilityai:save')"
type="primary" type="primary"
@click="addOrUpdateHandleServe()" @click="addOrUpdateHandleServe()"
>挂接</el-button >挂接</el-button
> >
</el-form-item> -->
<el-form-item>
<el-button
type="primary"
@click="showPutOnTheShelf()"
>上架</el-button
>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button <el-button
@ -85,7 +92,7 @@
v-if="$hasPermission('ability:bsabilityai:update')" v-if="$hasPermission('ability:bsabilityai:update')"
type="text" type="text"
size="small" size="small"
@click="UpdateHandle(scope.row)" @click="UpdateData(scope.row)"
>{{ $t("update") }}</el-button >{{ $t("update") }}</el-button
> >
<el-button <el-button
@ -153,63 +160,97 @@
@isShowRelatePopup="handleIsShowRelatePopupApply" @isShowRelatePopup="handleIsShowRelatePopupApply"
></relate-application> ></relate-application>
</div> </div>
<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 :putOnTheShelfList='putOnTheShelfList' @changeInfoList='changeInfoList' :type='radio' :typeInput='typeInput'></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> </el-card>
</template> </template>
<script> <script>
import mixinViewModule from "@/mixins/view-module"; import mixinViewModule from '@/mixins/view-module'
import AddOrUpdate from "./bsabilityservice-add-or-update"; import AddOrUpdate from './bsabilityservice-add-or-update'
import dictionaries from "@/utils/dictionaries"; import dictionaries from '@/utils/dictionaries'
import RelateApplication from "./bsabilityai-relate-application.vue"; import RelateApplication from './bsabilityai-relate-application.vue'
import qs from "qs"; import qs from 'qs'
import { type } from "os"; import { type } from 'os'
import putOnTheShelf from '@/views/modules/putOnTheShelf'
export default { export default {
mixins: [mixinViewModule], mixins: [mixinViewModule],
data() { data () {
return { return {
mixinViewModuleOptions: { mixinViewModuleOptions: {
getDataListURL: "/resource/page", getDataListURL: '/resource/page',
getDataListIsPage: true, getDataListIsPage: true,
exportURL: "/ability/bsabilityai/export", exportURL: '/ability/bsabilityai/export',
deleteURL: "/resource/delete", deleteURL: '/resource/delete',
deleteIsBatch: true, deleteIsBatch: true
}, },
disabled: false, disabled: false,
sceneArr: dictionaries.sceneArr, sceneArr: dictionaries.sceneArr,
fieldArr: dictionaries.fieldArr, fieldArr: dictionaries.fieldArr,
shareFormArr: dictionaries.shareFormArr, shareFormArr: dictionaries.shareFormArr,
dataForm: { dataForm: {
name: "", name: '',
creator: "", creator: '',
selectType: 0, selectType: 0,
delFlag: 0, delFlag: 0,
type: "应用资源", type: '应用资源'
}, },
qp: false, qp: false,
relateApplicationResourceVisible: false, relateApplicationResourceVisible: false,
relationData: {}, //穿 relationData: {}, // 穿
topNameArray: [], // topNameArray: [], //
}; radio: '应用资源',
insertList: [],
putOnTheShelfList: [],
showPutOnTheShelfFlag2: false,
submitFrom: {
type: '应用资源',
deptId: '',
delFlag: 0,
infoList: [
// {
// attrType: '',
// attrValue: '',
// delFlag: 0
// }
]
},
typeInput: '应用资源'
}
}, },
watch: {}, watch: {},
components: { components: {
AddOrUpdate, AddOrUpdate,
RelateApplication, RelateApplication,
putOnTheShelf
}, },
created() { created () {
this.dataForm.name = ""; this.dataForm.name = ''
this.dataForm.type = "应用资源"; this.dataForm.type = '应用资源'
}, },
mounted() { mounted () {
window.addEventListener("resize", this.a); window.addEventListener('resize', this.a)
this.fullScreen(); this.fullScreen()
}, },
methods: { methods: {
reset() { reset () {
this.$http this.$http
.get( .get(
this.mixinViewModuleOptions.getDataListURL + this.mixinViewModuleOptions.getDataListURL +
"?" + '?' +
qs.stringify({ qs.stringify({
// order: this.order, // order: this.order,
// orderField: this.orderField, // orderField: this.orderField,
@ -218,230 +259,471 @@ export default {
selectType: 0, selectType: 0,
limit: 10, limit: 10,
delFlag: 0, delFlag: 0,
creator: "", creator: '',
type: "应用资源", type: '应用资源',
name: "", name: ''
}) })
) )
.then(({ data: res }) => { .then(({ data: res }) => {
this.dataForm.name = ""; this.dataForm.name = ''
if (res.code !== 0) { if (res.code !== 0) {
this.dataList = []; this.dataList = []
this.total = 0; this.total = 0
return this.$message.error(res.msg); return this.$message.error(res.msg)
} }
this.dataList = this.mixinViewModuleOptions.getDataListIsPage this.dataList = this.mixinViewModuleOptions.getDataListIsPage
? res.data.list ? res.data.list
: res.data; : res.data
this.total = this.mixinViewModuleOptions.getDataListIsPage this.total = this.mixinViewModuleOptions.getDataListIsPage
? res.data.total ? res.data.total
: 0; : 0
if (this.mixinViewModuleOptions.requestCallback) { if (this.mixinViewModuleOptions.requestCallback) {
this.mixinViewModuleOptions.requestCallback(res.data); this.mixinViewModuleOptions.requestCallback(res.data)
} }
this.dataListLoading = false; this.dataListLoading = false
}) })
.catch(() => { .catch(() => {
this.dataListLoading = false; this.dataListLoading = false
}); })
}, },
showDetail(val) { showDetail (val) {
this.addOrUpdateVisible = true; this.addOrUpdateVisible = true
this.disabled = false; this.disabled = false
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.addOrUpdate.UpdateState = false; this.$refs.addOrUpdate.UpdateState = false
this.$refs.addOrUpdate.dataFormShowDetails = val; this.$refs.addOrUpdate.dataFormShowDetails = val
this.$refs.addOrUpdate.init(); this.$refs.addOrUpdate.init()
}); })
this.disabled = true; this.disabled = true
}, },
showDocument(val) { showDocument (val) {
console.log(val); console.log(val)
window.open( window.open(
window.SITE_CONFIG.frontUrl + "?id=" + val.id + "&&type=" + val.type, window.SITE_CONFIG.frontUrl + '?id=' + val.id + '&&type=' + val.type,
"_blank" '_blank'
); )
}, },
findValue(list, type) { findValue (list, type) {
const found = list.find((item) => item.attrType === type); const found = list.find((item) => item.attrType === type)
if (found) { if (found) {
return found.attrValue; return found.attrValue
} else { } else {
return "暂无数据"; return '暂无数据'
} }
}, },
getDataList2(names) { getDataList2 (names) {
if (names != null) { if (names != null) {
this.$http this.$http
.get( .get(
this.mixinViewModuleOptions.getDataListURL + this.mixinViewModuleOptions.getDataListURL +
"?" + '?' +
qs.stringify({ qs.stringify({
// order: this.order, // order: this.order,
// orderField: this.orderField, // orderField: this.orderField,
// type: '', // type: '',
pageNum: 1, pageNum: 1,
pageSize: this.limit, pageSize: this.limit,
type: "应用资源", type: '应用资源',
creator: "", creator: '',
selectType: 0, selectType: 0,
delFlag: 0, delFlag: 0,
name: names, name: names
}) })
) )
.then(({ data: res }) => { .then(({ data: res }) => {
if (res.code !== 0) { if (res.code !== 0) {
this.dataList = []; this.dataList = []
this.total = 0; this.total = 0
return this.$message.error(res.msg); return this.$message.error(res.msg)
} }
if (res.data.list.length !== 0) { if (res.data.list.length !== 0) {
this.dataList = res.data.list; this.dataList = res.data.list
this.total = this.mixinViewModuleOptions.getDataListIsPage this.total = this.mixinViewModuleOptions.getDataListIsPage
? res.data.total ? res.data.total
: 0; : 0
if (this.mixinViewModuleOptions.requestCallback) { if (this.mixinViewModuleOptions.requestCallback) {
this.mixinViewModuleOptions.requestCallback(res.data); this.mixinViewModuleOptions.requestCallback(res.data)
} }
this.dataListLoading = false; this.dataListLoading = false
} else { } else {
this.$message.error("未查询到相关信息"); this.$message.error('未查询到相关信息')
this.reset(); this.reset()
} }
}) })
.catch(() => { .catch(() => {
this.dataListLoading = false; this.dataListLoading = false
}); })
} else { } else {
this.$message.error("查询不能输入为空"); this.$message.error('查询不能输入为空')
} }
}, },
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, window.outerHeight,
screen.availHeight, screen.availHeight,
window.outerWidth, window.outerWidth,
screen.availWidth screen.availWidth
); )
this.qp = false; this.qp = false
} else { } else {
console.log( console.log(
"不是全屏2", '不是全屏2',
window.outerHeight, window.outerHeight,
screen.availHeight, screen.availHeight,
window.outerWidth, window.outerWidth,
screen.availWidth screen.availWidth
); )
this.qp = true; this.qp = true
} }
} else { } else {
console.log( console.log(
"不是全屏3", '不是全屏3',
window.outerHeight, window.outerHeight,
screen.availHeight, screen.availHeight,
window.outerWidth, window.outerWidth,
screen.availWidth screen.availWidth
); )
this.qp = true; this.qp = true
} }
}, },
// //
applyAndAssembly(val) { applyAndAssembly (val) {
console.log("vvvv", val); console.log('vvvv', val)
//idid,type // idid,type
let type = "组件服务"; const type = '组件服务'
let id = val.id; const id = val.id
this.$http this.$http
.get(`/dataResourceRel/queryResourceRelByKeyId`, { .get('/dataResourceRel/queryResourceRelByKeyId', {
params: { params: {
keyId: id, keyId: id,
type: type, type: type,
referenceName: "", referenceName: ''
}, }
}) })
.then(({ data: res }) => { .then(({ data: res }) => {
if (res.code !== 0) { if (res.code !== 0) {
return this.$message.error(res.msg); return this.$message.error(res.msg)
} }
console.log("rrrrressssz", res.data); console.log('rrrrressssz', res.data)
this.relateApplicationResourceVisible = true; this.relateApplicationResourceVisible = true
this.relationData = { this.relationData = {
id: id, id: id,
linkType: "1", linkType: '1',
responseData: res.data, responseData: res.data
}; }
this.topNameArray = ["未关联组件名称", "已关联组件名称"]; this.topNameArray = ['未关联组件名称', '已关联组件名称']
console.log(" this.relationData", this.relationData); console.log(' this.relationData', this.relationData)
// //
}); })
}, },
// //
applyAndDataResource(val) { applyAndDataResource (val) {
console.log("数据资源"); console.log('数据资源')
}, },
// //
applyAndProject(val) { applyAndProject (val) {
let type = "项目"; const type = '项目'
let id = val.id; const id = val.id
this.$http this.$http
.get(`/dataResourceRel/queryResourceRelByKeyId`, { .get('/dataResourceRel/queryResourceRelByKeyId', {
params: { params: {
keyId: id, keyId: id,
type: type, type: type,
referenceName: "", referenceName: ''
}, }
}) })
.then(({ data: res }) => { .then(({ data: res }) => {
if (res.code !== 0) { if (res.code !== 0) {
return this.$message.error(res.msg); return this.$message.error(res.msg)
} }
console.log("rrrrressssx", res.data); console.log('rrrrressssx', res.data)
this.relateApplicationResourceVisible = true; this.relateApplicationResourceVisible = true
this.relationData = { this.relationData = {
id: id, id: id,
linkType: "1", linkType: '1',
responseData: res.data, responseData: res.data
}; }
this.topNameArray = ["未关联项目名称", "已关联项目名称"]; this.topNameArray = ['未关联项目名称', '已关联项目名称']
// //
}); })
}, },
// //
applyAndInfrastructure(val) { applyAndInfrastructure (val) {
let type = "基础设施"; const type = '基础设施'
let id = val.id; const id = val.id
this.$http this.$http
.get(`/dataResourceRel/queryResourceRelByKeyId`, { .get('/dataResourceRel/queryResourceRelByKeyId', {
params: { params: {
keyId: id, keyId: id,
type: type, type: type,
referenceName: "", referenceName: ''
}, }
}) })
.then(({ data: res }) => { .then(({ data: res }) => {
if (res.code !== 0) { if (res.code !== 0) {
return this.$message.error(res.msg); return this.$message.error(res.msg)
} }
console.log("rrrrressssj", res.data); console.log('rrrrressssj', res.data)
this.relateApplicationResourceVisible = true; this.relateApplicationResourceVisible = true
this.relationData = { this.relationData = {
id: id, id: id,
linkType: "1", linkType: '1',
responseData: res.data, responseData: res.data
}; }
this.topNameArray = ["未关联基础设施名称", "已关联基础设施名称"]; this.topNameArray = ['未关联基础设施名称', '已关联基础设施名称']
// //
}); })
}, },
// //
handleIsShowRelatePopupApply(type) { handleIsShowRelatePopupApply (type) {
this.relateApplicationResourceVisible = type; this.relateApplicationResourceVisible = type
}, },
}, //
}; clear () {
this.showPutOnTheShelfFlag2 = false
this.insertList = []
this.putOnTheShelfList = []
this.radio = '应用资源'
this.submitFrom = {
type: '应用资源',
deptId: '',
delFlag: 0,
infoList: [
// {
// attrType: '',
// attrValue: '',
// delFlag: 0
// }
]
}
this.reset()
},
//
showPutOnTheShelf () {
this.showPutOnTheShelfFlag2 = true
this.$http.get('/category/getCategoryTree').then(res => {
this.insertList = res.data.data.filter(item => item.name === '应用资源一')[0]
console.log(this.insertList, this, this.radio, 'hhhhhhhhhhh')
this.putOnTheShelfList = this.insertList.children
})
},
changeInfoList (obj) {
this.submitFrom.infoList = this.submitFrom.infoList.filter((item) => item.attrType !== obj.attrType)
this.submitFrom.infoList.push(obj)
},
submitData () {
this.showPutOnTheShelfFlag2 = false
const arr = []
this.putOnTheShelfList.map(item => {
item.children.map(child => {
if (child.children) {
if (child.name === '算法优势' || child.name === '应用场景' || child.name === '功能介绍') {
arr.push(child.name)
if (this.submitFrom.infoList.filter(value => value.attrType === child.name).length === 0) {
this.submitFrom.infoList.push({
attrType: child.name,
attrValue: child.note1,
delFlag: 0
})
}
}
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)
}
if (val.note1) {
switch (val.name) {
case '算法名称':
case '应用名称':
case '组件名称':
case '图层名称':
this.submitFrom.name = val.note1
break
case '算法描述':
case '应用描述':
case '组件描述':
case '图层描述':
this.submitFrom.description = val.note1
break
case '共享条件':
this.submitFrom.shareCondition = val.note1
break
case '共享类型':
this.submitFrom.shareType = val.note1
break
case '服务接口':
this.submitFrom.apiUrl = val.note1
break
case '接口请求方式':
this.submitFrom.apiMethodType = val.note1
break
case '访问地址':
this.submitFrom.link = val.note1
break
case '部门联系人':
this.submitFrom.deptContacts = val.note1
break
case '部门联系人电话':
this.submitFrom.deptPhone = val.note1
break
case '归属部门':
this.submitFrom.deptId = val.note1
break
case '能力类型':
this.submitFrom.type = 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
}
})
console.log('编辑===============>', this.submitFrom)
this.$http
.put('/resource/update', this.submitFrom)
.then(({ data: res }) => {
if (res.code !== 0) {
this.$message.error('修改失败!')
} else {
this.$message.success('修改成功!')
this.clear()
}
})
.catch(() => {})
} else {
this.$http
.post('/resource/insert?source= b', this.submitFrom)
.then(({ data: res }) => {
if (res.code !== 0) {
this.$message.error('上架失败!')
} else {
this.$message.success('上架成功!')
this.clear()
}
})
.catch(() => {})
}
},
//
UpdateData (item) {
this.$http.get('/category/getCategoryTree').then(res => {
this.insertList = res.data.data.filter(item => item.name === '应用资源一')[0]
this.radio = '应用资源'
// this.radio = item.infoList.filter(val => val.attrType === '')[0].attrValue
this.putOnTheShelfList = this.insertList.children
// this.putOnTheShelfList = this.insertList.children.filter(item => item.name === this.radio)[0].children
this.putOnTheShelfList.map(parent => {
parent.children.map(child => {
if (child.name === '算法优势' || child.name === '应用场景' || child.name === '功能介绍') {
const obj = item.infoList.filter(val => val.attrType === child.name)[0]
if (obj) {
child.note1 = obj.attrValue
}
} else {
if (child.children) {
child.children.map(data => {
if (data.name === '计费标准信息' || data.name === '常见问题') {
const obj = item.infoList.filter(val => val.attrType === child.name)[0]
if (obj) {
data.note1 = obj.attrValue
}
} else {
switch (data.name) {
case '算法名称':
case '应用名称':
case '组件名称':
case '图层名称':
data.note1 = item.name
break
case '算法描述':
case '应用描述':
case '组件描述':
case '图层描述':
data.note1 = item.description
break
case '共享条件':
data.note1 = item.shareCondition
break
case '共享类型':
data.note1 = item.shareType
break
case '服务接口':
data.note1 = item.apiUrl
break
case '接口请求方式':
data.note1 = item.apiMethodType
break
case '访问地址':
data.note1 = item.link
break
case '部门联系人':
data.note1 = item.deptContacts
break
case '部门联系人电话':
data.note1 = item.deptPhone
break
case '归属部门':
data.note1 = item.deptId
break
case '能力类型':
data.note1 = item.type
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
})
}
}
}
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.el-tooltip__popper { .el-tooltip__popper {

View File

@ -48,8 +48,6 @@ export default {
}, },
methods: { methods: {
onSuccess (res, file) { onSuccess (res, file) {
console.log('limit', this.limit)
console.log(res, file, this.child)
if (res.code !== 0) { if (res.code !== 0) {
return this.$message.error('上传图片失败') return this.$message.error('上传图片失败')
} }
@ -88,10 +86,8 @@ export default {
} else { } else {
this.child.note1 = arr.join(';') this.child.note1 = arr.join(';')
} }
console.log(this.child.note1)
}, },
onPreview (file) { onPreview (file) {
console.log('点击预览===============>', file)
window.open(file.response.data) window.open(file.response.data)
}, },
onExceed (files, fileList) { onExceed (files, fileList) {

View File

@ -2,7 +2,7 @@
* @Author: hisense.liangjunhua * @Author: hisense.liangjunhua
* @Date: 2022-07-08 14:55:19 * @Date: 2022-07-08 14:55:19
* @LastEditors: hisense.liangjunhua * @LastEditors: hisense.liangjunhua
* @LastEditTime: 2022-07-08 17:23:58 * @LastEditTime: 2022-07-11 16:34:10
* @Description: 告诉大家这是什么 * @Description: 告诉大家这是什么
--> -->
<template> <template>
@ -41,7 +41,7 @@ export default {
data () { data () {
return { return {
apiURL: window.SITE_CONFIG.apiURL + '/upload?token=' + Cookies.get('ucsToken'), apiURL: window.SITE_CONFIG.apiURL + '/upload?token=' + Cookies.get('ucsToken'),
fileList: JSON.parse(JSON.stringify(this.list)) fileList: []
} }
}, },
methods: { methods: {
@ -53,25 +53,33 @@ export default {
}, },
handlePreview (file) { handlePreview (file) {
console.log(file) console.log(file)
window.open( if (file.response) {
window.SITE_CONFIG.previewUrl + window.open(
window.SITE_CONFIG.previewUrl +
'hisense_office/onlinePreview?url=' + 'hisense_office/onlinePreview?url=' +
btoa(encodeURI(file.response.data)) btoa(encodeURI(file.response.data))
) )
} else {
window.open(
window.SITE_CONFIG.previewUrl +
'hisense_office/onlinePreview?url=' +
btoa(encodeURI(file.url))
)
}
}, },
handleChange (file, fileList) { handleChange (file, fileList) {
console.log(file, fileList)
if (file.status === 'success') { if (file.status === 'success') {
if (file.response.msg === 'success') { if (file.response.msg === 'success') {
this.$message({ this.$message({
message: file.name + '上传成功', message: file.name + '上传成功',
type: 'success' type: 'success'
}) })
// this.data.note1 = file.response.data console.log(file, fileList)
this.$emit('changeInfoList', { this.$emit('changeInfoList', {
attrType: this.title, attrType: this.title,
attrValue: file.response.data, attrValue: file.response.data,
delFlag: 0 delFlag: 0,
note2: file.name
}) })
} else { } else {
this.$message.error(file.name + '上传失败') this.$message.error(file.name + '上传失败')
@ -83,12 +91,20 @@ export default {
} }
}, },
handleRemove (file) { handleRemove (file) {
console.log(file, '删除', this.title)
this.$emit('changeInfoList', { this.$emit('changeInfoList', {
attrType: this.title, attrType: this.title,
attrValue: '', attrValue: '',
delFlag: 0 delFlag: 0,
note2: null
}) })
} }
},
created () {
if (this.list.note1) {
this.fileList.push({ name: this.list.note2 || '--', url: this.list.note1 })
}
console.log('上传组件===================>', this.list, this.fileList)
} }
} }
</script> </script>

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' || type == 'radio'" v-else-if="(type === 'select' && name !== '归属部门') || type == 'radio'"
style="width: 240px" style="width: 240px"
v-model:value="data.note1" v-model:value="data.note1"
:placeholder="'请选择' + name"> :placeholder="'请选择' + name">
@ -30,6 +30,21 @@ js:
{{ itemSelect.dictLabel }} {{ itemSelect.dictLabel }}
</el-option> </el-option>
</el-select> </el-select>
<el-select
v-else-if="(type === 'select' && name === '归属部门')"
style="width: 240px"
v-model:value="data.note1"
filterable
placeholder="请输入关键词"
:loading="loading">
<el-option
v-for="(itemSelect) in options"
:key="itemSelect.id"
:label="itemSelect.name"
:value="itemSelect.id">
{{ itemSelect.name }}
</el-option>
</el-select>
<!-- 多选 --> <!-- 多选 -->
<div <div
v-else-if="type === 'checkBox'" v-else-if="type === 'checkBox'"
@ -82,16 +97,26 @@ export default {
if (this.data.isLinkToDic === 'true' && this.data.linkValue) { if (this.data.isLinkToDic === 'true' && this.data.linkValue) {
this.$http this.$http
.get(`/sys/dict/data/page?page=1&limit=20&dictTypeId=${this.data.linkValue}&deFlage=0`).then(({ data: res }) => { .get(`/sys/dict/data/page?page=1&limit=20&dictTypeId=${this.data.linkValue}&deFlage=0`).then(({ data: res }) => {
console.log(res, 'res')
const dataList = [] const dataList = []
res.data.list.forEach((element) => { res.data.list.forEach((element) => {
dataList.push(element) dataList.push(element)
console.log(dataList, 'this.options')
}) })
this.options = dataList this.options = dataList
console.log(this.options)
}) })
.catch(() => {}) .catch(() => {})
} else if (this.data.name === '归属部门') {
this.$http.get('/sys/dept/all').then(res => {
const dataList = []
res.data.data.forEach((element) => {
dataList.push(element)
})
this.options = dataList
if (!this.data.note1) {
this.$http.get('/sys/user/info').then(({ data: res }) => {
this.data.note1 = res.data.deptId
})
}
})
} }
}, },
chekBoxChange (list) { chekBoxChange (list) {
@ -102,10 +127,20 @@ export default {
str += ';' str += ';'
} }
}) })
// console.log(str)
this.data.note1 = str this.data.note1 = str
} }
}, },
created () {
if (this.data.name === '应用领域') {
if (this.data.note1) {
this.valueCheckBox = this.data.note1.split(';')
}
} else if (this.data.name === '发布端') {
if (this.data.note1) {
this.valueCheckBox = this.data.note1.split(';')
}
}
},
mounted () { mounted () {
this.selectOptions() this.selectOptions()
} }

View File

@ -2,7 +2,7 @@
* @Author: hisense.liangjunhua * @Author: hisense.liangjunhua
* @Date: 2022-07-08 09:54:50 * @Date: 2022-07-08 09:54:50
* @LastEditors: hisense.liangjunhua * @LastEditors: hisense.liangjunhua
* @LastEditTime: 2022-07-09 10:54:48 * @LastEditTime: 2022-07-11 16:18:00
* @Description: 多条数据特殊处理 * @Description: 多条数据特殊处理
--> -->
<template> <template>
@ -62,7 +62,8 @@ export default {
upload upload
}, },
props: { props: {
configure: Object configure: Object,
showData: Object
}, },
data () { data () {
return { return {
@ -75,7 +76,6 @@ export default {
const list = this.configure.list const list = this.configure.list
let flag = true let flag = true
list.forEach((item) => { list.forEach((item) => {
console.log(item)
if (item.type !== 'number' && !item.note1.length > 0) { if (item.type !== 'number' && !item.note1.length > 0) {
flag = false flag = false
} else if (item.type === 'number' && !item.note1 > 0) { } else if (item.type === 'number' && !item.note1 > 0) {
@ -88,7 +88,6 @@ export default {
obj[item.field] = item.note1 obj[item.field] = item.note1
}) })
this.data.push(obj) this.data.push(obj)
// console.log(data.value[title])
this.$emit('changeInfoList', { this.$emit('changeInfoList', {
attrType: title, attrType: title,
attrValue: JSON.stringify(this.data), attrValue: JSON.stringify(this.data),
@ -110,6 +109,18 @@ export default {
delFlag: 0 delFlag: 0
}) })
} }
},
created () {
console.log('特殊处理=============>', this.showData)
if (this.configure.name === '计费标准信息' || this.configure.name === '常见问题') {
if (this.showData.children[0].note1) {
this.data = JSON.parse(this.showData.children[0].note1)
}
} else {
if (this.showData.note1) {
this.data = JSON.parse(this.showData.note1)
}
}
} }
} }
</script> </script>

View File

@ -2,7 +2,7 @@
* @Author: hisense.liangjunhua * @Author: hisense.liangjunhua
* @Date: 2022-07-08 09:48:52 * @Date: 2022-07-08 09:48:52
* @LastEditors: hisense.liangjunhua * @LastEditors: hisense.liangjunhua
* @LastEditTime: 2022-07-09 10:57:07 * @LastEditTime: 2022-07-11 15:11:10
* @Description: 告诉大家这是什么 * @Description: 告诉大家这是什么
--> -->
<template> <template>
@ -12,16 +12,18 @@
<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'> <div v-for="item in child.children" :key="item.id" class='item'>
<span v-if="item.name != '来源应用'">{{ item.name }}</span> <span v-if="item.name != '来源应用' && item.name != '关联组件信息'">{{ 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> -->
<upload @changeInfoList='changeInfoList' :title='item.name' accept='.pdf,.ppt,.xlsx,.doc,.docx' :list="[]" v-else-if="item.type == 'file' && item.name !== '使用手册'" type="文件" btnName="上传附件" :maxCount="1" <upload @changeInfoList='changeInfoList' :title='item.name' accept='.jpg,.jpeg,.png' :list="item" v-if="item.type == 'image'" type="图片" btnName="上传图片" :maxCount="1"
:dataList="item" tip="支持文件类型大小不超过100M"></upload> :dataList="item" tip="支持文件类型大小不超过100M"></upload>
<upload @changeInfoList='changeInfoList' :title='item.name' accept='.pdf,.ppt,.xlsx,.doc,.docx' :list="[]" v-else-if="item.name == '使用手册'" type="文件" btnName="上传附件" :maxCount="1" :dataList="item" :busType="2" <upload @changeInfoList='changeInfoList' :title='item.name' accept='.pdf,.ppt,.xlsx,.doc,.docx' :list="item" v-else-if="item.type == 'file' && item.name !== '使用手册'" type="文件" btnName="上传附件" :maxCount="1"
:dataList="item" tip="支持文件类型大小不超过100M"></upload>
<upload @changeInfoList='changeInfoList' :title='item.name' accept='.pdf,.ppt,.xlsx,.doc,.docx' :list="item" v-else-if="item.name == '使用手册'" type="文件" btnName="上传附件" :maxCount="1" :dataList="item" :busType="2"
tip="支持文件类型大小不超过100M"></upload> tip="支持文件类型大小不超过100M"></upload>
<upload @changeInfoList='changeInfoList' :title='item.name' accept='.mp4' :list="[]" 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>
<input-select-checkbox :list="[]" v-else-if="item.type == 'text'" type="disabled" :data="item" :name="item.name" value="组件服务"></input-select-checkbox> <input-select-checkbox :list="[]" v-else-if="item.type == 'text'" type="disabled" :data="item" :name="item.name" :value="typeInput"></input-select-checkbox>
<input-select-checkbox :list="[]" v-else-if="item.type == 'text2'" type="disabled" :data="item" :name="item.name" :value="type"></input-select-checkbox> <input-select-checkbox :list="[]" v-else-if="item.type == 'text2'" 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"></input-select-checkbox>
@ -31,7 +33,7 @@
</div> </div>
</template> </template>
<template v-else> <template v-else>
<special :configure='judgmentType.filter(item => item.name==child.name)[0]' @changeInfoList='changeInfoList'></special> <special :configure='judgmentType.filter(item => item.name==child.name)[0]' :showData='child' @changeInfoList='changeInfoList'></special>
</template> </template>
</div> </div>
</div> </div>
@ -50,7 +52,8 @@ export default {
}, },
props: { props: {
type: String, type: String,
putOnTheShelfList: Array putOnTheShelfList: Array,
typeInput: String
}, },
data () { data () {
return { return {

View File

@ -0,0 +1,329 @@
<template>
<el-card shadow="never" class="aui-card--fill">
<div class="mod-sys__log-operation">
<el-form
:inline="true"
:model="dataForm"
@keyup.enter.native="getDataList()"
>
<el-form-item>
<el-select
v-model="dataForm.status"
:placeholder="$t('logOperation.status')"
clearable
>
<el-option
:label="$t('logOperation.status0')"
:value="0"
></el-option>
<el-option
:label="$t('logOperation.status1')"
:value="1"
></el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-input
v-model="dataForm.creatorName"
placeholder="请输入操作人"
></el-input>
</el-form-item>
<el-form-item>
<el-date-picker
v-model="value1"
type="datetimerange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
>
</el-date-picker>
</el-form-item>
<el-form-item>
<el-input
v-model="dataForm.operation"
placeholder="请输入操作名称"
></el-input>
</el-form-item>
<el-form-item>
<el-select
v-model="operationType"
placeholder="请选择操作类型"
clearable
>
<el-option
label="增加"
value="/renren-admin/resource%/insert"
></el-option>
<el-option
label="更新"
value="/renren-admin/resource%/update"
></el-option>
<el-option
label="删除"
value="/renren-admin/resource%/delete"
></el-option>
</el-select>
</el-form-item>
<el-form-item>
<el-button @click="getDataList()">{{ $t('query') }}</el-button>
</el-form-item>
<el-form-item>
<el-button @click="resetFunction()"> 重置 </el-button>
</el-form-item>
<!-- <el-form-item>
<el-button type="info" @click="exportHandle()">{{
$t('export')
}}</el-button>
</el-form-item> -->
</el-form>
<el-table
v-loading="dataListLoading"
:data="dataList"
border
@sort-change="dataListSortChangeHandle"
style="width: 100%"
:row-class-name="rowClassName"
>
<el-table-column
label="序号"
align="center"
prop="xh"
width="50"
></el-table-column>
<el-table-column
prop="operation"
label="操作名称"
header-align="center"
align="center"
></el-table-column>
<el-table-column
prop="creatorName"
label="操作人"
header-align="center"
align="center"
></el-table-column>
<el-table-column
prop="requestUriCharacters"
label="操作类型"
header-align="center"
width="100"
align="center"
:show-overflow-tooltip="true"
></el-table-column>
<el-table-column
prop="operationTable"
label="操作数据表"
header-align="center"
align="center"
width="120"
:show-overflow-tooltip="true"
></el-table-column>
<el-table-column
prop="status"
label="操作结果"
sortable="custom"
header-align="center"
align="center"
>
<template slot-scope="scope">
<el-tag v-if="scope.row.status === 0" size="small" type="danger">{{
$t('logOperation.status0')
}}</el-tag>
<el-tag v-else size="small" type="success">{{
$t('logOperation.status1')
}}</el-tag>
</template>
</el-table-column>
<el-table-column
prop="createDate"
label="操作时间"
sortable="custom"
header-align="center"
align="center"
width="180"
></el-table-column>
<el-table-column
prop="requestMethod"
label="操作方法"
header-align="center"
align="center"
></el-table-column>
<el-table-column
prop="requestParams"
label="传递参数"
header-align="center"
align="center"
width="120"
:show-overflow-tooltip="true"
></el-table-column>
<el-table-column
prop="resultData"
label="返回结果"
header-align="center"
width="150"
align="center"
:show-overflow-tooltip="true"
>
<template slot-scope="scope">
<div class="blue-font-color" @click="copyFunction(scope.row)">
复制
</div>
</template>
</el-table-column>
</el-table>
<el-pagination
:current-page="page"
:page-sizes="[10, 20, 50, 100]"
:page-size="limit"
:total="total"
layout="total, sizes, prev, pager, next, jumper"
@size-change="pageSizeChangeHandle"
@current-change="pageCurrentChangeHandle"
>
</el-pagination>
</div>
</el-card>
</template>
<script>
import mixinViewModule from '@/mixins/view-module'
export default {
mixins: [mixinViewModule],
data () {
return {
mixinViewModuleOptions: {
getDataListURL: '/sys/log/operation/page',
getDataListIsPage: true,
exportURL: '/sys/log/operation/export'
},
dataForm: {
status: '',
creatorName: '',
startDate: '',
endDate: '',
operation: '',
operationType: 'all'
},
operationType: '',
value1: ''
}
},
watch: {
value1 (val) {
val[0] = this.handleTime(val[0], 'yyyy-MM-dd HH:mm:ss')
this.dataForm.startDate = val[0]
val[1] = this.handleTime(val[1], 'yyyy-MM-dd HH:mm:ss')
this.dataForm.endDate = val[1]
},
dataList (val) {
if (val[0].requestUri) {
this.requestUriFunction()
}
},
operationType (val) {
if (val !== 'all') {
this.dataForm.operationType = val
}
}
},
methods: {
//
copyFunction (row) {
var data = row.resultData
var oInput = document.createElement('input')
oInput.value = data
document.body.appendChild(oInput)
oInput.select()
document.execCommand('Copy')
oInput.className = 'oInput'
oInput.style.display = 'none'
this.$message({
type: 'success',
message: this.$t('复制成功')
})
},
//
resetFunction () {
const params = {
status: '',
creatorName: '',
startDate: '',
endDate: '',
operation: '',
operationType: 'all'
}
this.value1 = '' //
this.operationType = '' //
this.page = 1
this.limit = 10
this.dataForm = params
this.getDataList() //
},
//
rowClassName ({ row, rowIndex }) {
row.xh = rowIndex + 1 + (this.page - 1) * this.limit
},
//
requestUriFunction () {
this.dataList.map((item, index) => {
const name = item.requestUri.substring(
item.requestUri.lastIndexOf('/') + 1
)
switch (name) {
case 'delete':
this.dataList[index].requestUriCharacters = '删除'
break
case 'update':
this.dataList[index].requestUriCharacters = '更新'
break
case 'insert':
this.dataList[index].requestUriCharacters = '增加'
break
}
})
},
//
handleTime (time, format) {
if (time == null || time == undefined || time == '') {
return ''
}
var t = new Date(time)
var tf = function (i) {
return (i < 10 ? '0' : '') + i
}
return format.replace(/yyyy|MM|dd|HH|mm|ss/g, function (a) {
switch (a) {
case 'yyyy':
return tf(t.getFullYear())
break
case 'MM':
return tf(t.getMonth() + 1)
break
case 'mm':
return tf(t.getMinutes())
break
case 'dd':
return tf(t.getDate())
break
case 'HH':
return tf(t.getHours())
break
case 'ss':
return tf(t.getSeconds())
break
}
})
}
},
mounted () {
this.$nextTick(() => {})
}
}
</script>
<style scoped lang="scss">
.blue-font-color:hover {
color: #0058e1;
cursor: pointer;
}
</style>

View File

@ -1,40 +1,169 @@
<template> <template>
<el-card shadow="never" class="aui-card--fill"> <el-card shadow="never" class="aui-card--fill">
<div class="mod-sys__log-operation"> <div class="mod-sys__log-operation">
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()"> <el-form
:inline="true"
:model="dataForm"
@keyup.enter.native="getDataList()"
>
<el-form-item> <el-form-item>
<el-select v-model="dataForm.status" :placeholder="$t('logOperation.status')" clearable> <el-select
<el-option :label="$t('logOperation.status0')" :value="0"></el-option> v-model="dataForm.status"
<el-option :label="$t('logOperation.status1')" :value="1"></el-option> :placeholder="$t('logOperation.status')"
clearable
>
<el-option
:label="$t('logOperation.status0')"
:value="0"
></el-option>
<el-option
:label="$t('logOperation.status1')"
:value="1"
></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item>
<el-input
v-model="dataForm.creatorName"
placeholder="请输入操作人"
></el-input>
</el-form-item>
<el-form-item>
<el-date-picker
v-model="value1"
type="datetimerange"
range-separator="至"
start-placeholder="开始日期"
end-placeholder="结束日期"
>
</el-date-picker>
</el-form-item>
<el-form-item>
<el-input
v-model="dataForm.operation"
placeholder="请输入操作名称"
></el-input>
</el-form-item>
<el-form-item> <el-form-item>
<el-button @click="getDataList()">{{ $t('query') }}</el-button> <el-button @click="getDataList()">{{ $t('query') }}</el-button>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-button type="info" @click="exportHandle()">{{ $t('export') }}</el-button> <el-button @click="resetFunction()"> 重置 </el-button>
</el-form-item> </el-form-item>
<!-- <el-form-item>
<el-button type="info" @click="exportHandle()">{{
$t('export')
}}</el-button>
</el-form-item> -->
</el-form> </el-form>
<el-table v-loading="dataListLoading" :data="dataList" border @sort-change="dataListSortChangeHandle" style="width: 100%;"> <el-table
<el-table-column prop="creatorName" :label="$t('logOperation.creatorName')" header-align="center" align="center"></el-table-column> v-loading="dataListLoading"
<el-table-column prop="operation" :label="$t('logOperation.operation')" header-align="center" align="center"></el-table-column> :data="dataList"
<el-table-column prop="requestUri" :label="$t('logOperation.requestUri')" header-align="center" align="center"></el-table-column> border
<el-table-column prop="requestMethod" :label="$t('logOperation.requestMethod')" header-align="center" align="center"></el-table-column> @sort-change="dataListSortChangeHandle"
<el-table-column prop="requestParams" :label="$t('logOperation.requestParams')" header-align="center" align="center" width="150" :show-overflow-tooltip="true"></el-table-column> style="width: 100%"
<el-table-column prop="requestTime" :label="$t('logOperation.requestTime')" sortable="custom" header-align="center" align="center"> :row-class-name="rowClassName"
>
<el-table-column
label="序号"
align="center"
prop="xh"
width="50"
></el-table-column>
<el-table-column
prop="operation"
label="操作名称"
header-align="center"
align="center"
></el-table-column>
<el-table-column
prop="creatorName"
label="操作人"
header-align="center"
align="center"
></el-table-column>
<el-table-column
prop="createDate"
label="操作时间"
sortable="custom"
header-align="center"
align="center"
width="180"
></el-table-column>
<el-table-column
prop="ip"
label="客户端IP"
header-align="center"
align="center"
></el-table-column>
<el-table-column
prop="requestUri"
label="请求地址"
header-align="center"
align="center"
></el-table-column>
<el-table-column
prop="requestMethod"
:label="$t('logOperation.requestMethod')"
header-align="center"
align="center"
></el-table-column>
<el-table-column
prop="requestParams"
:label="$t('logOperation.requestParams')"
header-align="center"
align="center"
width="150"
:show-overflow-tooltip="true"
></el-table-column>
<el-table-column
label="返回结果"
header-align="center"
width="150"
align="center"
:show-overflow-tooltip="true"
>
<template slot-scope="scope">
<div class="blue-font-color" @click="copyFunction(scope.row)">
复制
</div>
</template>
</el-table-column>
<el-table-column
prop="requestTime"
:label="$t('logOperation.requestTime')"
sortable="custom"
header-align="center"
align="center"
>
<template slot-scope="scope"> <template slot-scope="scope">
{{ `${scope.row.requestTime}ms` }} {{ `${scope.row.requestTime}ms` }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="status" :label="$t('logOperation.status')" sortable="custom" header-align="center" align="center"> <el-table-column
prop="status"
:label="$t('logOperation.status')"
sortable="custom"
header-align="center"
align="center"
>
<template slot-scope="scope"> <template slot-scope="scope">
<el-tag v-if="scope.row.status === 0" size="small" type="danger">{{ $t('logOperation.status0') }}</el-tag> <el-tag v-if="scope.row.status === 0" size="small" type="danger">{{
<el-tag v-else size="small" type="success">{{ $t('logOperation.status1') }}</el-tag> $t('logOperation.status0')
}}</el-tag>
<el-tag v-else size="small" type="success">{{
$t('logOperation.status1')
}}</el-tag>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="ip" :label="$t('logOperation.ip')" header-align="center" align="center"></el-table-column> <!-- <el-table-column
<el-table-column prop="userAgent" :label="$t('logOperation.userAgent')" header-align="center" align="center" width="150" :show-overflow-tooltip="true"></el-table-column> prop="userAgent"
<el-table-column prop="createDate" :label="$t('logOperation.createDate')" sortable="custom" header-align="center" align="center" width="180"></el-table-column> :label="$t('logOperation.userAgent')"
header-align="center"
align="center"
width="150"
:show-overflow-tooltip="true"
></el-table-column> -->
</el-table> </el-table>
<el-pagination <el-pagination
:current-page="page" :current-page="page"
@ -43,7 +172,8 @@
:total="total" :total="total"
layout="total, sizes, prev, pager, next, jumper" layout="total, sizes, prev, pager, next, jumper"
@size-change="pageSizeChangeHandle" @size-change="pageSizeChangeHandle"
@current-change="pageCurrentChangeHandle"> @current-change="pageCurrentChangeHandle"
>
</el-pagination> </el-pagination>
</div> </div>
</el-card> </el-card>
@ -61,9 +191,98 @@ export default {
exportURL: '/sys/log/operation/export' exportURL: '/sys/log/operation/export'
}, },
dataForm: { dataForm: {
status: '' status: '',
creatorName: '',
startDate: '',
endDate: '',
operation: ''
},
value1: ''
}
},
watch: {
value1 (val) {
val[0] = this.handleTime(val[0], 'yyyy-MM-dd HH:mm:ss')
this.dataForm.startDate = val[0]
val[1] = this.handleTime(val[1], 'yyyy-MM-dd HH:mm:ss')
this.dataForm.endDate = val[1]
}
},
methods: {
//
copyFunction (row) {
var data = row.resultData
var oInput = document.createElement('input')
oInput.value = data
document.body.appendChild(oInput)
oInput.select()
document.execCommand('Copy')
oInput.className = 'oInput'
oInput.style.display = 'none'
this.$message({
type: 'success',
message: this.$t('复制成功')
})
},
//
resetFunction () {
const params = {
status: '',
creatorName: '',
startDate: '',
endDate: '',
operation: '',
operationType: 'all'
} }
this.value1 = '' //
this.operationType = '' //
this.page = 1
this.limit = 10
this.dataForm = params
this.getDataList() //
},
//
rowClassName ({ row, rowIndex }) {
row.xh = rowIndex + 1 + (this.page - 1) * this.limit
},
//
handleTime (time, format) {
if (time == null || time == undefined || time == '') {
return ''
}
var t = new Date(time)
var tf = function (i) {
return (i < 10 ? '0' : '') + i
}
return format.replace(/yyyy|MM|dd|HH|mm|ss/g, function (a) {
switch (a) {
case 'yyyy':
return tf(t.getFullYear())
break
case 'MM':
return tf(t.getMonth() + 1)
break
case 'mm':
return tf(t.getMinutes())
break
case 'dd':
return tf(t.getDate())
break
case 'HH':
return tf(t.getHours())
break
case 'ss':
return tf(t.getSeconds())
break
}
})
} }
} }
} }
</script> </script>
<style scoped lang="scss">
.blue-font-color:hover {
color: #0058e1;
cursor: pointer;
}
</style>

View File

@ -1,8 +1,8 @@
<!-- <!--
* @Author: hisense.wuhongjian * @Author: hisense.wuhongjian
* @Date: 2022-03-29 16:45:25 * @Date: 2022-03-29 16:45:25
* @LastEditors: hisense.liangjunhua * @LastEditors: hisense.wuhongjian
* @LastEditTime: 2022-07-09 15:05:57 * @LastEditTime: 2022-07-11 18:10:24
* @Description: 告诉大家这是什么 * @Description: 告诉大家这是什么
--> -->
<!DOCTYPE html> <!DOCTYPE html>
@ -49,7 +49,7 @@
window.SITE_CONFIG['backUrl'] = 'http://15.2.21.238:9797'; window.SITE_CONFIG['backUrl'] = 'http://15.2.21.238:9797';
window.SITE_CONFIG['previewUrl'] = 'http://15.2.21.238:9796/'; window.SITE_CONFIG['previewUrl'] = 'http://15.2.21.238:9796/';
window.SITE_CONFIG['frontUrl'] = 'http://15.2.21.238:9796/document/#/devModelFile/'; window.SITE_CONFIG['frontUrl'] = 'http://15.2.21.238:9796/document/#/devModelFile/';
window.SITE_CONFIG['apiURL'] = 'http://15.2.21.238:8888/renren-admin'; window.SITE_CONFIG['apiURL'] = 'http://15.2.21.239:8888/renren-admin';
window.SITE_CONFIG['POI_URL'] = 'http://15.2.21.238:8090/iserver/services/addressmatch-qingdaoPOI181015/restjsr/v1/address'; window.SITE_CONFIG['POI_URL'] = 'http://15.2.21.238:8090/iserver/services/addressmatch-qingdaoPOI181015/restjsr/v1/address';
// 穿透版本 // 穿透版本
// window.SITE_CONFIG['backUrl'] = 'http://124.222.94.39:9797'; // window.SITE_CONFIG['backUrl'] = 'http://124.222.94.39:9797';
@ -126,4 +126,4 @@
<!-- built files will be auto injected --> <!-- built files will be auto injected -->
</body> </body>
</html> </html>

View File

@ -1,8 +1,8 @@
/* /*
* @Author: hisense.wuhongjian * @Author: hisense.wuhongjian
* @Date: 2022-04-20 17:16:35 * @Date: 2022-04-20 17:16:35
* @LastEditors: hisense.liangjunhua * @LastEditors: hisense.wuhongjian
* @LastEditTime: 2022-06-22 14:57:16 * @LastEditTime: 2022-07-11 19:02:33
* @Description: 告诉大家这是什么 * @Description: 告诉大家这是什么
*/ */
import request from '@/utils/request' import request from '@/utils/request'
@ -46,6 +46,10 @@ export function correct(params) {
export function paddleocr(params) { export function paddleocr(params) {
return axios.post('http://15.72.183.90:7008/paddleocr', params, config2) return axios.post('http://15.72.183.90:7008/paddleocr', params, config2)
} }
//
export function algo(params) {
return axios.post('http://15.72.184.10:8888/api/algo', params, config2)
}
// - // -
export function count() { export function count() {

View File

@ -7,6 +7,13 @@ export function getMyProcessInstancePage(params) {
params, params,
}) })
} }
export function getTabilityapplication(params) {
return request({
url: '/processForm/tabilityapplication/my_page',
method: 'get',
params,
})
}
// //
export function getSgcList(params) { export function getSgcList(params) {
@ -231,3 +238,11 @@ export function queryResourceRelByKeyId(params) {
params, params,
}) })
} }
//
export function filesUpload(data) {
return request({
url: window.SITE_CONFIG.apiURL + '/upload',
method: 'post',
data,
})
}

View File

@ -29,12 +29,13 @@ const handleCode = (code, msg, res) => {
// message.error(msg || '') // message.error(msg || '')
store.dispatch('user/resetAll').catch(() => {}) store.dispatch('user/resetAll').catch(() => {})
if (res.token) { debugger
console.log('存在token信息', res.token) // if (res.token) {
setAccessToken(res.token) // console.log('token', res.token)
const token = getAccessToken() // setAccessToken(res.token)
console.log('验证token信息', token) // const token = getAccessToken()
} // console.log('token', token)
// }
// // location.reload() // // location.reload()
// if (redirect) { // if (redirect) {
@ -71,8 +72,10 @@ const instance = axios.create({
*/ */
instance.interceptors.request.use( instance.interceptors.request.use(
(config) => { (config) => {
if (store.getters['user/accessToken']) debugger
config.headers[tokenName] = store.getters['user/accessToken'] const token = getAccessToken()
if (token)
config.headers[tokenName] = token
if ( if (
config.data && config.data &&
config.headers['Content-Type'] === config.headers['Content-Type'] ===
@ -101,10 +104,12 @@ 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
if (response.headers.token) { debugger
if (code=='0' && response.headers.token) {
setAccessToken(response.headers.token) setAccessToken(response.headers.token)
} else { } else {
if (response.headers.redirect) { const token = getAccessToken()
if (response.headers.redirect && !token) {
// window.location.href = response.headers.redirect // window.location.href = response.headers.redirect
window.location.replace(response.headers.redirect) window.location.replace(response.headers.redirect)
return return
@ -154,16 +159,21 @@ instance.interceptors.response.use(
// } // }
}, },
(error) => { (error) => {
debugger
console.log('接口error', error) console.log('接口error', error)
if (loadingInstance) loadingInstance.close() if (loadingInstance) loadingInstance.close()
const { response, message } = error const { response, message } = error
if (error.response && error.response.data) { if (error.response) {
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) {
// 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.reject(error) // 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-08 18:55:28 * @LastEditTime: 2022-07-11 16:39:36
* @Description: 告诉大家这是什么 * @Description: 告诉大家这是什么
*/ */
/** /**
@ -33,8 +33,9 @@
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
next() next()
} else { } else {
let accessRoutes = [] let accessRoutes = []
@ -45,6 +46,7 @@
if (routesWhiteList.indexOf(to.path) !== -1) { if (routesWhiteList.indexOf(to.path) !== -1) {
next() next()
} else { } else {
//
getUserInfo().then(res=>{ getUserInfo().then(res=>{
console.log(res) console.log(res)
router.replace('/home') router.replace('/home')

View File

@ -192,6 +192,7 @@
], ],
}, },
]) ])
let shiyongshouce = ref({})
const navList = ref([]) const navList = ref([])
const navList2 = ref([]) const navList2 = ref([])
const fileList = ref({}) const fileList = ref({})
@ -315,6 +316,9 @@
} }
init() init()
mybus.on('chageDataFrom', (obj) => { mybus.on('chageDataFrom', (obj) => {
if (obj.attrType == '技术文档' && obj.attrValue != null) {
shiyongshouce.value = obj
}
dataFrom.value.infoList = dataFrom.value.infoList.filter( dataFrom.value.infoList = dataFrom.value.infoList.filter(
(item) => item.attrType !== obj.attrType (item) => item.attrType !== obj.attrType
) )
@ -322,6 +326,13 @@
obj.attrValue = '' obj.attrValue = ''
} }
dataFrom.value.infoList.push(obj) dataFrom.value.infoList.push(obj)
if (shiyongshouce.value.attrValue) {
dataFrom.value.infoList.map((syscitem, syscindex) => {
if (syscitem.attrType == '技术文档') {
dataFrom.value.infoList[syscindex] = shiyongshouce.value
}
})
}
console.log('数据变更=================》', obj, dataFrom.value.infoList) console.log('数据变更=================》', obj, dataFrom.value.infoList)
}) })
mybus.on('chageFileList', (obj) => { mybus.on('chageFileList', (obj) => {

View File

@ -99,6 +99,7 @@
import mybus from '@/myplugins/mybus' import mybus from '@/myplugins/mybus'
const showView = ref('基本信息') const showView = ref('基本信息')
const router = useRouter() const router = useRouter()
let shiyongshouce = ref({})
const navList = ref([]) const navList = ref([])
const navList2 = ref([]) const navList2 = ref([])
const fileList = ref({}) const fileList = ref({})
@ -285,7 +286,9 @@
} }
init() init()
mybus.on('chageDataFrom', (obj) => { mybus.on('chageDataFrom', (obj) => {
console.log(obj, dataFrom.value.infoList) if (obj.attrType == '技术文档' && obj.attrValue != null) {
shiyongshouce.value = obj
}
dataFrom.value.infoList = dataFrom.value.infoList.filter( dataFrom.value.infoList = dataFrom.value.infoList.filter(
(item) => item.attrType !== obj.attrType (item) => item.attrType !== obj.attrType
) )
@ -293,6 +296,14 @@
obj.attrValue = '' obj.attrValue = ''
} }
dataFrom.value.infoList.push(obj) dataFrom.value.infoList.push(obj)
if (shiyongshouce.value.attrValue) {
dataFrom.value.infoList.map((syscitem, syscindex) => {
if (syscitem.attrType == '技术文档') {
dataFrom.value.infoList[syscindex] = shiyongshouce.value
}
})
}
console.log('数据变更=================》', obj, dataFrom.value.infoList)
}) })
mybus.on('chageFileList', (obj) => { mybus.on('chageFileList', (obj) => {
fileList.value = obj fileList.value = obj

View File

@ -173,6 +173,7 @@
], ],
}, },
]) ])
let shiyongshouce = ref({})
const navList = ref([]) const navList = ref([])
const navList2 = ref([]) const navList2 = ref([])
const fileList = ref({}) const fileList = ref({})
@ -297,6 +298,9 @@
} }
init() init()
mybus.on('chageDataFrom', (obj) => { mybus.on('chageDataFrom', (obj) => {
if (obj.attrType == '使用手册' && obj.attrValue != null) {
shiyongshouce.value = obj
}
dataFrom.value.infoList = dataFrom.value.infoList.filter( dataFrom.value.infoList = dataFrom.value.infoList.filter(
(item) => item.attrType !== obj.attrType (item) => item.attrType !== obj.attrType
) )
@ -304,6 +308,13 @@
obj.attrValue = '' obj.attrValue = ''
} }
dataFrom.value.infoList.push(obj) dataFrom.value.infoList.push(obj)
if (shiyongshouce.value.attrValue) {
dataFrom.value.infoList.map((syscitem, syscindex) => {
if (syscitem.attrType == '使用手册') {
dataFrom.value.infoList[syscindex] = shiyongshouce.value
}
})
}
console.log('数据变更=================》', obj, dataFrom.value.infoList) console.log('数据变更=================》', obj, dataFrom.value.infoList)
}) })
mybus.on('chageFileList', (obj) => { mybus.on('chageFileList', (obj) => {

View File

@ -173,6 +173,7 @@
], ],
}, },
]) ])
let shiyongshouce = ref({})
const navList = ref([]) const navList = ref([])
const navList2 = ref([]) const navList2 = ref([])
const fileList = ref({}) const fileList = ref({})
@ -297,6 +298,9 @@
} }
init() init()
mybus.on('chageDataFrom', (obj) => { mybus.on('chageDataFrom', (obj) => {
if (obj.attrType == '技术文档' && obj.attrValue != null) {
shiyongshouce.value = obj
}
dataFrom.value.infoList = dataFrom.value.infoList.filter( dataFrom.value.infoList = dataFrom.value.infoList.filter(
(item) => item.attrType !== obj.attrType (item) => item.attrType !== obj.attrType
) )
@ -304,6 +308,13 @@
obj.attrValue = '' obj.attrValue = ''
} }
dataFrom.value.infoList.push(obj) dataFrom.value.infoList.push(obj)
if (shiyongshouce.value.attrValue) {
dataFrom.value.infoList.map((syscitem, syscindex) => {
if (syscitem.attrType == '技术文档') {
dataFrom.value.infoList[syscindex] = shiyongshouce.value
}
})
}
console.log('数据变更=================》', obj, dataFrom.value.infoList) console.log('数据变更=================》', obj, dataFrom.value.infoList)
}) })
mybus.on('chageFileList', (obj) => { mybus.on('chageFileList', (obj) => {

View File

@ -0,0 +1,69 @@
<!--
* @Author: hisense.wuhongjian
* @Date: 2022-04-19 17:18:48
* @LastEditors: hisense.wuhongjian
* @LastEditTime: 2022-05-06 19:11:32
* @Description: markdown编辑器
-->
<template>
<editor
v-model="text"
:iconfontJs="iconfontJs"
pageFullScreen
@save="saveText"
></editor>
</template>
<script setup>
import { defineComponent, ref, defineProps } from 'vue'
import { message } from 'ant-design-vue'
import Editor from 'md-editor-v3'
import { pinyin } from 'pinyin-pro'
// import FileSaver from 'file-saver'
import 'md-editor-v3/lib/style.css'
import * as fontJs from '/public/static/js/font.js'
import { filesUpload } from '@/api/personalCenter'
import mybus from '@/myplugins/mybus'
let text = ref('')
let iconfontJs = fontJs
const props = defineProps({
data: { type: Array, default: null },
})
function saveText(file) {
const blob = new Blob([file], {
type: 'md',
})
let myfile = new File([blob], '技术文档.md')
var formData = new FormData()
const type = pinyin('技术文档', {
pattern: 'initial',
}).replace(/\s*/g, '')
formData.append('fileName', '技术文档' + '.md')
formData.append('type', type)
formData.append('file', myfile) // 'file' HTTP Post, file File
// formData.append('name', this.route.currentRoute.query.id + '.md')
// FileSaver.saveAs(blob, '.md')
filesUpload(formData).then((resData) => {
const res = resData.data.data
text.value = res
mybus.emit('showTextFunctionEmit', false)
let infoList = ref({
attrType: '技术文档',
attrValue: res,
delFlag: 0,
})
mybus.emit('chageDataFrom', infoList.value)
console.log('res', res)
if (res.data.code === 0) {
message.success('保存成功')
} else {
message.error('保存失败')
}
})
}
</script>
<style scoped>
.md-fullscreen {
z-index: 10;
}
</style>

View File

@ -121,6 +121,7 @@
], ],
}, },
]) ])
let shiyongshouce = ref({})
const navList = ref([]) const navList = ref([])
const navList2 = ref([]) const navList2 = ref([])
const fileList = ref({}) const fileList = ref({})
@ -245,6 +246,9 @@
} }
init() init()
mybus.on('chageDataFrom', (obj) => { mybus.on('chageDataFrom', (obj) => {
if (obj.attrType == '技术文档' && obj.attrValue != null) {
shiyongshouce.value = obj
}
dataFrom.value.infoList = dataFrom.value.infoList.filter( dataFrom.value.infoList = dataFrom.value.infoList.filter(
(item) => item.attrType !== obj.attrType (item) => item.attrType !== obj.attrType
) )
@ -252,6 +256,13 @@
obj.attrValue = '' obj.attrValue = ''
} }
dataFrom.value.infoList.push(obj) dataFrom.value.infoList.push(obj)
if (shiyongshouce.value.attrValue) {
dataFrom.value.infoList.map((syscitem, syscindex) => {
if (syscitem.attrType == '技术文档') {
dataFrom.value.infoList[syscindex] = shiyongshouce.value
}
})
}
console.log('数据变更=================》', obj, dataFrom.value.infoList) console.log('数据变更=================》', obj, dataFrom.value.infoList)
}) })
mybus.on('chageFileList', (obj) => { mybus.on('chageFileList', (obj) => {

File diff suppressed because it is too large Load Diff

View File

@ -26,9 +26,9 @@
<div class="bg bg4"></div> <div class="bg bg4"></div>
<div class="top-left"> <div class="top-left">
<div class="text"> <div class="text">
<p>错误内容 {{ errorWord }}</p> <p>返回结果 {{ errorWord }}</p>
<p>错误位置 {{ errorWordIndex }}</p> <!-- <p>错误位置 {{ errorWordIndex }}</p>
<p>识别内容 {{ errorWordContent }}</p> <p>识别内容 {{ errorWordContent }}</p> -->
<span></span> <span></span>
</div> </div>
</div> </div>
@ -43,26 +43,37 @@
</template> </template>
<script setup> <script setup>
import { ref } from 'vue' import { ref } from 'vue'
import { correct } from '@/api/file' import { correct,algo } from '@/api/file'
import { useRouter } from 'vue-router'
const router = useRouter()
// const keyId = router.currentRoute.value.query.id
const wordValue = ref('') const wordValue = ref('')
wordValue.value = router.currentRoute.value.query.data
const errorWord = ref('') const errorWord = ref('')
const errorWordIndex = ref('') // const errorWordIndex = ref('')
const errorWordContent = ref('') // const errorWordContent = ref('')
const correctWord = () => { const correctWord = () => {
const param = { const param = {
sentence: wordValue.value, // sentence: wordValue.value,
company: router.currentRoute.value.query.company,
algorithmName: router.currentRoute.value.query.algorithmName,
data: wordValue.value,
type: router.currentRoute.value.query.type
} }
correct(param).then((res) => { // correct(param).then((res) => {
// wordContent.value = res.data.data // // wordContent.value = res.data.data
Object.keys(res.data.data).forEach((key) => { // Object.keys(res.data.data).forEach((key) => {
console.log(key) // console.log(key)
errorWord.value = key // errorWord.value = key
}) // })
Object.values(res.data.data).forEach((val) => { // Object.values(res.data.data).forEach((val) => {
console.log(val) // console.log(val)
errorWordIndex.value = val.ix // errorWordIndex.value = val.ix
errorWordContent.value = val.value // errorWordContent.value = val.value
}) // })
// })
algo(param).then(res=>{
errorWord.value = res.data.text_data
}) })
} }
</script> </script>

View File

@ -144,11 +144,11 @@
dataFrom.value.content[1].childrenContent.push(itemContent) dataFrom.value.content[1].childrenContent.push(itemContent)
}) })
} }
// let obj = { let obj = {
// attrType: '访', attrType: '访问地址',
// attrValue: props.dataList.link || '------', attrValue: props.dataList.link || '------',
// } }
// dataFrom.value.content[0].childrenContent.push(obj) dataFrom.value.content[0].childrenContent.push(obj)
} }
} }
) )

View File

@ -8,7 +8,12 @@
<template> <template>
<div class="application-navigation" v-if="navList.length > 0"> <div class="application-navigation" v-if="navList.length > 0">
<template v-for="nav in navList" :key="nav.key"> <template v-for="nav in navList" :key="nav.key">
<div class="nav" :class="{ select: nav.key == select }" v-if="nav.show" @click="selectNav(nav.key)"> <div
class="nav"
:class="{ select: nav.key == select }"
v-if="nav.show"
@click="selectNav(nav.key)"
>
{{ nav.name }} {{ nav.name }}
<span class="line"></span> <span class="line"></span>
</div> </div>
@ -16,179 +21,179 @@
</div> </div>
</template> </template>
<script setup> <script setup>
import { ref, defineProps, watch } from 'vue' import { ref, defineProps, watch } from 'vue'
import mybus from '@/myplugins/mybus' import mybus from '@/myplugins/mybus'
import { useRouter } from 'vue-router' import { useRouter } from 'vue-router'
import { queryPartAppByKeyId } from '@/api/home' import { queryPartAppByKeyId } from '@/api/home'
// //
const router = useRouter() const router = useRouter()
const keyId = router.currentRoute.value.query.id const keyId = router.currentRoute.value.query.id
const navList = ref([ const navList = ref([
{ {
name: '应用展示', name: '应用展示',
key: 'application-presentation', key: 'application-presentation',
}, },
{ {
name: '功能介绍', name: '功能介绍',
key: 'function-introduction', key: 'function-introduction',
}, },
{ {
name: '使用能力', name: '使用能力',
key: 'ability-to-use', key: 'ability-to-use',
}, },
{ {
name: '部署与安全', name: '部署与安全',
key: 'deployment-and-security', key: 'deployment-and-security',
}, },
{ {
name: '归属部门与服务商', name: '归属部门与服务商',
key: 'department-and-service-provider', key: 'department-and-service-provider',
}, },
{ {
name: '常见问题', name: '常见问题',
key: 'common-problem', key: 'common-problem',
}, },
]) ])
const props = defineProps({ const props = defineProps({
selectNow: { type: String, default: '' }, selectNow: { type: String, default: '' },
dataList: { type: Object, default: null }, dataList: { type: Object, default: null },
associatedComponents: { type: Array, default: null }, associatedComponents: { type: Array, default: null },
})
const select = ref('application-associated-ability')
const list = ref([])
// id
if (keyId) {
let params = {
keyId: keyId,
type: '组件服务',
}
queryPartAppByKeyId(params).then((res) => {
console.log('ressssssss', res)
if (res.data.data.length != 0) {
//
navList.value.unshift({
name: '关联组件',
key: 'application-associated-ability',
show: true,
})
list.value.unshift('关联组件')
}
}) })
} const select = ref('application-associated-ability')
const selectNav = (key) => { const list = ref([])
select.value = key // id
mybus.emit('flyToView', select.value) if (keyId) {
} let params = {
if (props.dataList.infoList) { keyId: keyId,
list.value = [] type: '组件服务',
props.dataList.infoList.map((item) => {
if (
item.attrType === '功能介绍' ||
item.attrType === '常见问题' ||
item.attrType === '使用能力' ||
item.attrType === '关联组件'
) {
list.value.push(item.attrType)
} else if (item.attrType === '应用展示视频') {
list.value.push('应用展示')
} }
}) queryPartAppByKeyId(params).then((res) => {
list.value.unshift('关联组件') console.log('ressssssss', res)
list.value.push('部署与安全') if (res.data.data.length != 0) {
list.value.push('归属部门与服务商') //
navList.value.forEach((item) => { navList.value.unshift({
console.log(item) name: '关联组件',
if (list.value.indexOf(item.name) > -1) { key: 'application-associated-ability',
item.show = true show: true,
} })
}) list.value.unshift('关联组件')
if (list.value.length > 0) {
if (navList.value.filter((item) => item.name === list.value[0])[0]) {
select.value = navList.value.filter(
(item) => (item.name === '关联组件') | (item.name === list.value[0])
)[0].key
}
}
console.log('11111111111111111111111111', list.value, navList.value)
}
watch(
() => props.selectNow,
(newValue) => {
select.value = newValue
}
)
watch(
() => props.dataList,
(val) => {
if (val) {
list.value = []
val.infoList.map((item) => {
if (
item.attrType === '功能介绍' ||
item.attrType === '常见问题' ||
item.attrType === '使用能力' ||
item.attrType === '关联组件'
) {
list.value.push(item.attrType)
} else if (item.attrType === '应用展示视频') {
list.value.push('应用展示')
}
})
list.value.unshift('关联组件')
list.value.push('部署与安全')
list.value.push('归属部门与服务商')
navList.value.forEach((item) => {
console.log(item)
if (list.value.indexOf(item.name) > -1) {
item.show = true
}
})
if (list.value.length > 0) {
if (navList.value.filter((item) => item.name === list.value[0])[0]) {
select.value = navList.value.filter(
(item) =>
(item.name === '关联组件') | (item.name === list.value[0])
)[0].key
}
} }
console.log('11111111111111111111111111', list.value, navList.value) })
}
} }
) const selectNav = (key) => {
select.value = key
mybus.emit('flyToView', select.value)
}
if (props.dataList.infoList) {
list.value = []
props.dataList.infoList.map((item) => {
if (
item.attrType === '功能介绍' ||
item.attrType === '常见问题' ||
item.attrType === '使用能力' ||
item.attrType === '关联组件'
) {
list.value.push(item.attrType)
} else if (item.attrType === '应用展示视频') {
list.value.push('应用展示')
}
})
list.value.unshift('关联组件')
list.value.push('部署与安全')
list.value.push('归属部门与服务商')
navList.value.forEach((item) => {
console.log(item)
if (list.value.indexOf(item.name) > -1) {
item.show = true
}
})
if (list.value.length > 0) {
if (navList.value.filter((item) => item.name === list.value[0])[0]) {
select.value = navList.value.filter(
(item) => (item.name === '关联组件') | (item.name === list.value[0])
)[0].key
}
}
console.log('11111111111111111111111111', list.value, navList.value)
}
watch(
() => props.selectNow,
(newValue) => {
select.value = newValue
}
)
watch(
() => props.dataList,
(val) => {
if (val) {
list.value = []
val.infoList.map((item) => {
if (
item.attrType === '功能介绍' ||
item.attrType === '常见问题' ||
item.attrType === '使用能力' ||
item.attrType === '关联组件'
) {
list.value.push(item.attrType)
} else if (item.attrType === '应用展示视频') {
list.value.push('应用展示')
}
})
list.value.unshift('关联组件')
list.value.push('部署与安全')
list.value.push('归属部门与服务商')
navList.value.forEach((item) => {
console.log(item)
if (list.value.indexOf(item.name) > -1) {
item.show = true
}
})
if (list.value.length > 0) {
if (navList.value.filter((item) => item.name === list.value[0])[0]) {
select.value = navList.value.filter(
(item) =>
(item.name === '关联组件') | (item.name === list.value[0])
)[0].key
}
}
console.log('11111111111111111111111111', list.value, navList.value)
}
}
)
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.application-navigation { .application-navigation {
width: 19.12rem; width: 19.12rem;
height: 0.84rem; height: 0.84rem;
line-height: 0.8rem; line-height: 0.8rem;
display: flex;
justify-content: space-around;
font-size: 0.24rem;
color: #666;
background: #fff;
padding: 0 3rem;
box-shadow: 0rem 0.05rem 0.1rem #f2f3fb;
position: relative;
.nav {
cursor: pointer;
display: flex; display: flex;
flex-direction: column; justify-content: space-around;
justify-content: space-between; font-size: 0.24rem;
align-items: center; color: #666;
background: #fff;
padding: 0 3rem;
box-shadow: 0rem 0.05rem 0.1rem #f2f3fb;
position: relative;
.line { .nav {
width: 0.4rem; cursor: pointer;
height: 0.04rem; display: flex;
flex-direction: column;
justify-content: space-between;
align-items: center;
.line {
width: 0.4rem;
height: 0.04rem;
}
}
.select {
color: #526aff;
.line {
background: #526aff;
}
} }
} }
.select {
color: #526aff;
.line {
background: #526aff;
}
}
}
</style> </style>

View File

@ -2,10 +2,17 @@
<template> <template>
<div class="application-deployment-and-security"> <div class="application-deployment-and-security">
<div class="title"> <div class="title">
<DetalsTitle :title="dataFrom.title" :type="dataFrom.englishTitle"></DetalsTitle> <DetalsTitle
:title="dataFrom.title"
:type="dataFrom.englishTitle"
></DetalsTitle>
</div> </div>
<div class="content"> <div class="content">
<div v-for="(item, index) in dataFrom.content" :key="index" class="content-card"> <div
v-for="(item, index) in dataFrom.content"
:key="index"
class="content-card"
>
<div class="card-title">{{ item.childrenTitle }}</div> <div class="card-title">{{ item.childrenTitle }}</div>
<div class="card-content"> <div class="card-content">
<div v-for="carditem in item.childrenContent" :key="carditem"> <div v-for="carditem in item.childrenContent" :key="carditem">
@ -24,206 +31,208 @@
</template> </template>
<script setup> <script setup>
import DetalsTitle from '@/views/detailsAll/components/DetalsTitle' import DetalsTitle from '@/views/detailsAll/components/DetalsTitle'
import { ref, defineProps, watch } from 'vue' import { ref, defineProps, watch } from 'vue'
let dataFrom = ref({ let dataFrom = ref({
title: '归属部门与服务商', title: '归属部门与服务商',
englishTitle: 'DEPARTMENT&ERVICE', englishTitle: 'DEPARTMENT&ERVICE',
content: [ content: [
{ {
childrenTitle: '归属部门信息', childrenTitle: '归属部门信息',
childrenContent: [], childrenContent: [],
}, },
{ {
childrenTitle: '服务商信息', childrenTitle: '服务商信息',
childrenContent: [], childrenContent: [],
}, },
], ],
}) })
console.log(dataFrom.value) console.log(dataFrom.value)
// //
const props = defineProps({ const props = defineProps({
dataList: { type: Object, default: null }, dataList: { type: Object, default: null },
}) })
if (props.dataList.infoList) { if (props.dataList.infoList) {
let obj = { let obj = {
attrType: '部门名称', attrType: '部门名称',
attrValue: props.dataList.deptName || '------', attrValue: props.dataList.deptName || '------',
} }
dataFrom.value.content[0].childrenContent[0] = obj dataFrom.value.content[0].childrenContent[0] = obj
let deptContacts = { let deptContacts = {
attrType: '部门联系人', attrType: '部门联系人',
attrValue: '', attrValue: '',
} }
dataFrom.value.content[0].childrenContent[1] = deptContacts dataFrom.value.content[0].childrenContent[1] = deptContacts
let deptPhone = { let deptPhone = {
attrType: '部门联系电话', attrType: '部门联系电话',
attrValue: '', attrValue: '',
} }
dataFrom.value.content[0].childrenContent[2] = deptPhone dataFrom.value.content[0].childrenContent[2] = deptPhone
props.dataList.infoList.map((item) => { props.dataList.infoList.map((item) => {
if (
item.attrType === '服务商' ||
item.attrType === '服务商联系人' ||
item.attrType === '服务商联系电话' ||
item.attrType.indexOf('服务商名') != -1
) {
if ( if (
item.attrType === '服务商' || item.attrType === '服务商' ||
item.attrType === '服务商联系人' ||
item.attrType === '服务商联系电话' ||
item.attrType.indexOf('服务商名') != -1 item.attrType.indexOf('服务商名') != -1
) { ) {
dataFrom.value.content[1].childrenContent[0] = item
if (dataFrom.value.content[1].childrenContent[0].attrValue == '') {
dataFrom.value.content[1].childrenContent[0].attrValue = '------'
}
} else if (item.attrType === '服务商联系人') {
dataFrom.value.content[1].childrenContent[1] = item
if (dataFrom.value.content[1].childrenContent[1].attrValue == '') {
dataFrom.value.content[1].childrenContent[1].attrValue = '------'
}
} else if (item.attrType === '服务商联系电话') {
dataFrom.value.content[1].childrenContent[2] = item
if (dataFrom.value.content[1].childrenContent[2].attrValue == '') {
dataFrom.value.content[1].childrenContent[2].attrValue = '------'
}
}
} else if (item.attrType === '部门联系人') {
deptContacts.attrValue = item.attrValue || '------'
} else if (item.attrType === '部门联系人电话') {
deptPhone.attrValue = item.attrValue || '------'
}
})
console.log('obj', dataFrom.value)
}
watch(
() => props.dataList,
(val) => {
if (val) {
// dataFrom.value.content[0].childrenContent = []
// dataFrom.value.content[1].childrenContent = []
let obj = {
attrType: '部门名称',
attrValue: props.dataList.deptName || '------',
}
dataFrom.value.content[0].childrenContent[0] = obj
let deptContacts = {
attrType: '部门联系人',
attrValue: props.dataList.deptContacts || '------',
}
dataFrom.value.content[0].childrenContent[1] = deptContacts
let deptPhone = {
attrType: '部门联系电话',
attrValue: props.dataList.deptPhone || '------',
}
dataFrom.value.content[0].childrenContent[2] = deptPhone
props.dataList.infoList.map((item) => {
if ( if (
item.attrType === '服务商' || item.attrType === '服务商' ||
item.attrType === '服务商联系人' ||
item.attrType === '服务商联系电话' ||
item.attrType.indexOf('服务商名') != -1 item.attrType.indexOf('服务商名') != -1
) { ) {
dataFrom.value.content[1].childrenContent[0] = item
if (dataFrom.value.content[1].childrenContent[0].attrValue == '') {
dataFrom.value.content[1].childrenContent[0].attrValue = '------'
}
} else if (item.attrType === '服务商联系人') {
dataFrom.value.content[1].childrenContent[1] = item
if (dataFrom.value.content[1].childrenContent[1].attrValue == '') {
dataFrom.value.content[1].childrenContent[1].attrValue = '------'
}
} else if (item.attrType === '服务商联系电话') {
dataFrom.value.content[1].childrenContent[2] = item
if (dataFrom.value.content[1].childrenContent[2].attrValue == '') {
dataFrom.value.content[1].childrenContent[2].attrValue = '------'
}
}
} else if (item.attrType === '部门联系人') {
deptContacts.attrValue = item.attrValue || '------'
} else if (item.attrType === '部门联系人电话') {
deptPhone.attrValue = item.attrValue || '------'
}
})
console.log('obj', dataFrom.value)
}
watch(
() => props.dataList,
(val) => {
if (val) {
// dataFrom.value.content[0].childrenContent = []
// dataFrom.value.content[1].childrenContent = []
let obj = {
attrType: '部门名称',
attrValue: props.dataList.deptName || '------',
}
dataFrom.value.content[0].childrenContent[0] = obj
let deptContacts = {
attrType: '部门联系人',
attrValue: props.dataList.deptContacts || '------',
}
dataFrom.value.content[0].childrenContent[1] = deptContacts
let deptPhone = {
attrType: '部门联系电话',
attrValue: props.dataList.deptPhone || '------',
}
dataFrom.value.content[0].childrenContent[2] = deptPhone
props.dataList.infoList.map((item) => {
if ( if (
item.attrType === '服务商' || item.attrType === '服务商' ||
item.attrType === '服务商联系人' ||
item.attrType === '服务商联系电话' ||
item.attrType.indexOf('服务商名') != -1 item.attrType.indexOf('服务商名') != -1
) { ) {
dataFrom.value.content[1].childrenContent.push(item)
if ( if (
dataFrom.value.content[1].childrenContent[0].attrValue == '' item.attrType === '服务商' ||
item.attrType.indexOf('服务商名') != -1
) { ) {
dataFrom.value.content[1].childrenContent[0].attrValue = dataFrom.value.content[1].childrenContent.push(item)
'------' if (
} dataFrom.value.content[1].childrenContent[0].attrValue == ''
} else if (item.attrType === '服务商联系人') { ) {
dataFrom.value.content[1].childrenContent[1] = item dataFrom.value.content[1].childrenContent[0].attrValue =
if ( '------'
dataFrom.value.content[1].childrenContent[1].attrValue == '' }
) { } else if (item.attrType === '服务商联系人') {
dataFrom.value.content[1].childrenContent[1].attrValue = dataFrom.value.content[1].childrenContent[1] = item
'------' if (
} dataFrom.value.content[1].childrenContent[1].attrValue == ''
} else if (item.attrType === '服务商联系电话') { ) {
dataFrom.value.content[1].childrenContent[2] = item dataFrom.value.content[1].childrenContent[1].attrValue =
if ( '------'
dataFrom.value.content[1].childrenContent[2].attrValue == '' }
) { } else if (item.attrType === '服务商联系电话') {
dataFrom.value.content[1].childrenContent[2].attrValue = dataFrom.value.content[1].childrenContent[2] = item
'------' if (
dataFrom.value.content[1].childrenContent[2].attrValue == ''
) {
dataFrom.value.content[1].childrenContent[2].attrValue =
'------'
}
} }
} else if (item.attrType === '部门联系人') {
deptContacts.attrValue = item.attrValue || '------'
} else if (item.attrType === '部门联系人电话') {
deptPhone.attrValue = item.attrValue || '------'
} }
} else if (item.attrType === '部门联系人') { })
deptContacts.attrValue = item.attrValue || '------' console.log('obj', dataFrom.value)
} else if (item.attrType === '部门联系人电话') { }
deptPhone.attrValue = item.attrValue || '------'
}
})
console.log('obj', dataFrom.value)
} }
} )
)
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.application-deployment-and-security { .application-deployment-and-security {
padding: 0.8rem 0; padding: 0.8rem 0;
display: flex;
flex-direction: column;
align-items: center;
.title {
margin-bottom: 0.3rem;
}
.content {
display: flex; display: flex;
width: 13rem; flex-direction: column;
justify-content: space-between; align-items: center;
.content-card { .title {
height: 1.5rem; margin-bottom: 0.3rem;
width: 6.2rem; }
border-radius: 0.2rem;
background: linear-gradient(to right, .content {
rgba(113, 132, 252, 0.4),
rgba(148, 163, 252, 0.4));
padding: 0 0.3rem;
display: flex; display: flex;
flex-direction: column; width: 13rem;
justify-content: center; justify-content: space-between;
.card-title { .content-card {
font-size: 0.26rem; height: 1.5rem;
color: #212956; width: 6.2rem;
margin-bottom: 0.2rem; border-radius: 0.2rem;
line-height: 0.26rem; background: linear-gradient(
} to right,
rgba(113, 132, 252, 0.4),
rgba(148, 163, 252, 0.4)
);
padding: 0 0.3rem;
display: flex;
flex-direction: column;
justify-content: center;
.card-content { .card-title {
white-space: nowrap; font-size: 0.26rem;
color: #212956;
div { margin-bottom: 0.2rem;
display: inline-block; line-height: 0.26rem;
margin-right: 0.2rem;
color: rgba(33, 41, 86, 0.8);
font-size: 0.2rem;
max-width: 2.8rem;
div {
max-width: 2.8rem;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-box-orient: vertical;
-webkit-line-clamp: 1;
}
} }
div:first-child { .card-content {
display: block; white-space: nowrap;
div {
display: inline-block;
margin-right: 0.2rem;
color: rgba(33, 41, 86, 0.8);
font-size: 0.2rem;
max-width: 2.8rem;
div {
max-width: 2.8rem;
// overflow: hidden;
// text-overflow: ellipsis;
// display: -webkit-box;
// -webkit-box-orient: vertical;
// -webkit-line-clamp: 1;
}
}
div:first-child {
display: block;
}
} }
} }
} }
} }
}
</style> </style>

View File

@ -138,6 +138,7 @@
let obj = props.dataList.infoList.filter( let obj = props.dataList.infoList.filter(
(item) => item.attrType === '技术文档' (item) => item.attrType === '技术文档'
)[0] )[0]
debugger
console.log('dataFrom.value.link', obj.attrValue) console.log('dataFrom.value.link', obj.attrValue)
window.open( window.open(
window.SITE_CONFIG.previewUrl + window.SITE_CONFIG.previewUrl +
@ -149,6 +150,7 @@
let obj = props.dataList.infoList.filter( let obj = props.dataList.infoList.filter(
(item) => item.attrType === '使用手册' (item) => item.attrType === '使用手册'
)[0] )[0]
debugger
console.log('dataFrom.value.link', obj.attrValue) console.log('dataFrom.value.link', obj.attrValue)
window.open( window.open(
window.SITE_CONFIG.previewUrl + window.SITE_CONFIG.previewUrl +

View File

@ -138,7 +138,7 @@
muted: false, // muted: false, //
webFullScreen: false, webFullScreen: false,
speedRate: ['0.75', '1.0', '1.25', '1.5', '2.0'], // speedRate: ['0.75', '1.0', '1.25', '1.5', '2.0'], //
autoPlay: true, // autoPlay: false, //
loop: false, // loop: false, //
mirror: false, // mirror: false, //
ligthOff: false, // ligthOff: false, //