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
* @Date: 2022-04-11 10:11:40
* @LastEditors: hisense.liangjunhua
* @LastEditTime: 2022-07-08 14:13:20
* @LastEditors: hisense.wuhongjian
* @LastEditTime: 2022-07-11 18:56:36
* @Description: 告诉大家这是什么
-->
<!DOCTYPE html>
@ -43,8 +43,9 @@
<script>
// window.SITE_CONFIG['apiURL'] = 'http://15.2.21.166:8888/renren-admin';
// window.SITE_CONFIG['apiURL'] = 'http://124.222.94.39:8888/renren-admin';
window.SITE_CONFIG['apiURL'] = 'http://10.16.5.35:8888/renren-admin';
// window.SITE_CONFIG['apiURL'] = 'http://15.2.21.238:8888/renren-admin';
// window.SITE_CONFIG['apiURL'] = 'http://10.16.5.35:8888/renren-admin';
window.SITE_CONFIG['apiURL'] = 'http://15.2.21.239:8888/renren-admin';
window.SITE_CONFIG['previewUrl'] = 'http://15.2.21.238:9796/';
// window.SITE_CONFIG['apiURL'] = 'http://15.2.23.141:8000/renren-admin';
// WebSocket地址
window.SITE_CONFIG['socketURL'] ='ws://localhost:8080/renren-admin/websocket';

View File

@ -19,14 +19,14 @@
$t("export")
}}</el-button>
</el-form-item>
<el-form-item>
<!-- <el-form-item>
<el-button
v-if="$hasPermission('ability:bsabilityai:save')"
type="primary"
@click="addOrUpdateHandleAI()"
>挂接</el-button
>
</el-form-item>
</el-form-item> -->
<el-form-item>
<el-button
type="primary"
@ -90,12 +90,19 @@
width="150"
>
<template slot-scope="scope">
<el-button
<!-- <el-button
v-if="$hasPermission('ability:bsabilityai:update')"
type="text"
size="small"
@click="UpdateHandle(scope.row)"
>{{ $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
v-if="$hasPermission('ability:bsabilityai:delete')"
@ -150,14 +157,14 @@
</span>
</el-dialog>
<el-dialog
:title="'上架'+radio"
: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'></putOnTheShelf>
<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>
@ -219,7 +226,8 @@ export default {
id: '',
responseData: {},
linkType: ''
}
},
typeInput: '组件服务'
}
},
watch: {},
@ -289,7 +297,6 @@ export default {
// this.addOrUpdateHandle(id)
this.addOrUpdateVisible = true
this.disabled = false
console.log('显示数据=============》', val)
this.$nextTick(() => {
this.$refs.addOrUpdate.UpdateState = false
this.$refs.addOrUpdate.dataFormShowDetails = val
@ -298,7 +305,6 @@ export default {
this.disabled = true
},
showDocument (val) {
console.log(val)
window.open(
window.SITE_CONFIG.frontUrl + '?id=' + val.id + '&&type=' + val.type,
'_blank'
@ -324,7 +330,6 @@ export default {
})
)
.then(({ data: res }) => {
console.log('res', res)
if (res.code !== 0) {
this.dataList = []
this.total = 0
@ -354,32 +359,11 @@ export default {
fullScreen () {
if (window.outerHeight === screen.availHeight) {
if (window.outerWidth === screen.availWidth) {
console.log(
'全屏1',
window.outerHeight,
screen.availHeight,
window.outerWidth,
screen.availWidth
)
this.qp = false
} else {
console.log(
'不是全屏2',
window.outerHeight,
screen.availHeight,
window.outerWidth,
screen.availWidth
)
this.qp = true
}
} else {
console.log(
'不是全屏3',
window.outerHeight,
screen.availHeight,
window.outerWidth,
screen.availWidth
)
this.qp = true
}
},
@ -400,10 +384,13 @@ export default {
handleIsShowRelatePopup (type) {
this.relateApplicationVisible = type
},
//
//
clear () {
console.log('清空----------------------------------------')
this.showPutOnTheShelfFlag = false
this.showPutOnTheShelfFlag2 = false
this.insertList = []
this.putOnTheShelfList = []
this.radio = ''
this.submitFrom = {
type: '组件服务',
@ -417,6 +404,7 @@ export default {
}
]
}
this.reset()
},
showPutOnTheShelf () {
this.showPutOnTheShelfFlag = true
@ -429,19 +417,27 @@ export default {
this.showPutOnTheShelfFlag2 = true
this.submitFrom.infoList[0].attrValue = this.radio
this.putOnTheShelfList = this.insertList.children.filter(item => item.name === this.radio)[0].children
console.log('radio', this.radio)
},
changeInfoList (obj) {
console.log(obj, this.submitFrom)
this.submitFrom.infoList = this.submitFrom.infoList.filter((item) => item.attrType !== obj.attrType)
this.submitFrom.infoList.push(obj)
},
submitData () {
console.log('编辑11111111111===============>', this.putOnTheShelfList)
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)
@ -483,12 +479,29 @@ export default {
case '部门联系人电话':
this.submitFrom.deptPhone = val.note1
break
case '归属部门':
this.submitFrom.deptId = val.note1
break
case '能力类型':
this.submitFrom.type = val.note1
break
default:
this.submitFrom.infoList.push({
attrType: val.name,
attrValue: val.note1,
delFlag: 0
})
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
}
}
@ -497,7 +510,124 @@ export default {
})
})
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")
}}</el-button>
</el-form-item>
<el-form-item>
<!-- <el-form-item>
<el-button
v-if="$hasPermission('ability:bsabilityai:save')"
type="primary"
@click="addOrUpdateHandleServe()"
>挂接</el-button
>
</el-form-item> -->
<el-form-item>
<el-button
type="primary"
@click="showPutOnTheShelf()"
>上架</el-button
>
</el-form-item>
<el-form-item>
<el-button
@ -85,7 +92,7 @@
v-if="$hasPermission('ability:bsabilityai:update')"
type="text"
size="small"
@click="UpdateHandle(scope.row)"
@click="UpdateData(scope.row)"
>{{ $t("update") }}</el-button
>
<el-button
@ -153,63 +160,97 @@
@isShowRelatePopup="handleIsShowRelatePopupApply"
></relate-application>
</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>
</template>
<script>
import mixinViewModule from "@/mixins/view-module";
import AddOrUpdate from "./bsabilityservice-add-or-update";
import dictionaries from "@/utils/dictionaries";
import RelateApplication from "./bsabilityai-relate-application.vue";
import qs from "qs";
import { type } from "os";
import mixinViewModule from '@/mixins/view-module'
import AddOrUpdate from './bsabilityservice-add-or-update'
import dictionaries from '@/utils/dictionaries'
import RelateApplication from './bsabilityai-relate-application.vue'
import qs from 'qs'
import { type } from 'os'
import putOnTheShelf from '@/views/modules/putOnTheShelf'
export default {
mixins: [mixinViewModule],
data() {
data () {
return {
mixinViewModuleOptions: {
getDataListURL: "/resource/page",
getDataListURL: '/resource/page',
getDataListIsPage: true,
exportURL: "/ability/bsabilityai/export",
deleteURL: "/resource/delete",
deleteIsBatch: true,
exportURL: '/ability/bsabilityai/export',
deleteURL: '/resource/delete',
deleteIsBatch: true
},
disabled: false,
sceneArr: dictionaries.sceneArr,
fieldArr: dictionaries.fieldArr,
shareFormArr: dictionaries.shareFormArr,
dataForm: {
name: "",
creator: "",
name: '',
creator: '',
selectType: 0,
delFlag: 0,
type: "应用资源",
type: '应用资源'
},
qp: false,
relateApplicationResourceVisible: false,
relationData: {}, //穿
relationData: {}, // 穿
topNameArray: [], //
};
radio: '应用资源',
insertList: [],
putOnTheShelfList: [],
showPutOnTheShelfFlag2: false,
submitFrom: {
type: '应用资源',
deptId: '',
delFlag: 0,
infoList: [
// {
// attrType: '',
// attrValue: '',
// delFlag: 0
// }
]
},
typeInput: '应用资源'
}
},
watch: {},
components: {
AddOrUpdate,
RelateApplication,
putOnTheShelf
},
created() {
this.dataForm.name = "";
this.dataForm.type = "应用资源";
created () {
this.dataForm.name = ''
this.dataForm.type = '应用资源'
},
mounted() {
window.addEventListener("resize", this.a);
this.fullScreen();
mounted () {
window.addEventListener('resize', this.a)
this.fullScreen()
},
methods: {
reset() {
reset () {
this.$http
.get(
this.mixinViewModuleOptions.getDataListURL +
"?" +
'?' +
qs.stringify({
// order: this.order,
// orderField: this.orderField,
@ -218,230 +259,471 @@ export default {
selectType: 0,
limit: 10,
delFlag: 0,
creator: "",
type: "应用资源",
name: "",
creator: '',
type: '应用资源',
name: ''
})
)
.then(({ data: res }) => {
this.dataForm.name = "";
this.dataForm.name = ''
if (res.code !== 0) {
this.dataList = [];
this.total = 0;
return this.$message.error(res.msg);
this.dataList = []
this.total = 0
return this.$message.error(res.msg)
}
this.dataList = this.mixinViewModuleOptions.getDataListIsPage
? res.data.list
: res.data;
: res.data
this.total = this.mixinViewModuleOptions.getDataListIsPage
? res.data.total
: 0;
: 0
if (this.mixinViewModuleOptions.requestCallback) {
this.mixinViewModuleOptions.requestCallback(res.data);
this.mixinViewModuleOptions.requestCallback(res.data)
}
this.dataListLoading = false;
this.dataListLoading = false
})
.catch(() => {
this.dataListLoading = false;
});
this.dataListLoading = false
})
},
showDetail(val) {
this.addOrUpdateVisible = true;
this.disabled = false;
showDetail (val) {
this.addOrUpdateVisible = true
this.disabled = false
this.$nextTick(() => {
this.$refs.addOrUpdate.UpdateState = false;
this.$refs.addOrUpdate.dataFormShowDetails = val;
this.$refs.addOrUpdate.init();
});
this.disabled = true;
this.$refs.addOrUpdate.UpdateState = false
this.$refs.addOrUpdate.dataFormShowDetails = val
this.$refs.addOrUpdate.init()
})
this.disabled = true
},
showDocument(val) {
console.log(val);
showDocument (val) {
console.log(val)
window.open(
window.SITE_CONFIG.frontUrl + "?id=" + val.id + "&&type=" + val.type,
"_blank"
);
window.SITE_CONFIG.frontUrl + '?id=' + val.id + '&&type=' + val.type,
'_blank'
)
},
findValue(list, type) {
const found = list.find((item) => item.attrType === type);
findValue (list, type) {
const found = list.find((item) => item.attrType === type)
if (found) {
return found.attrValue;
return found.attrValue
} else {
return "暂无数据";
return '暂无数据'
}
},
getDataList2(names) {
getDataList2 (names) {
if (names != null) {
this.$http
.get(
this.mixinViewModuleOptions.getDataListURL +
"?" +
'?' +
qs.stringify({
// order: this.order,
// orderField: this.orderField,
// type: '',
pageNum: 1,
pageSize: this.limit,
type: "应用资源",
creator: "",
type: '应用资源',
creator: '',
selectType: 0,
delFlag: 0,
name: names,
name: names
})
)
.then(({ data: res }) => {
if (res.code !== 0) {
this.dataList = [];
this.total = 0;
return this.$message.error(res.msg);
this.dataList = []
this.total = 0
return this.$message.error(res.msg)
}
if (res.data.list.length !== 0) {
this.dataList = res.data.list;
this.dataList = res.data.list
this.total = this.mixinViewModuleOptions.getDataListIsPage
? res.data.total
: 0;
: 0
if (this.mixinViewModuleOptions.requestCallback) {
this.mixinViewModuleOptions.requestCallback(res.data);
this.mixinViewModuleOptions.requestCallback(res.data)
}
this.dataListLoading = false;
this.dataListLoading = false
} else {
this.$message.error("未查询到相关信息");
this.reset();
this.$message.error('未查询到相关信息')
this.reset()
}
})
.catch(() => {
this.dataListLoading = false;
});
this.dataListLoading = false
})
} else {
this.$message.error("查询不能输入为空");
this.$message.error('查询不能输入为空')
}
},
fullScreen() {
fullScreen () {
if (window.outerHeight === screen.availHeight) {
if (window.outerWidth === screen.availWidth) {
console.log(
"全屏1",
'全屏1',
window.outerHeight,
screen.availHeight,
window.outerWidth,
screen.availWidth
);
this.qp = false;
)
this.qp = false
} else {
console.log(
"不是全屏2",
'不是全屏2',
window.outerHeight,
screen.availHeight,
window.outerWidth,
screen.availWidth
);
this.qp = true;
)
this.qp = true
}
} else {
console.log(
"不是全屏3",
'不是全屏3',
window.outerHeight,
screen.availHeight,
window.outerWidth,
screen.availWidth
);
this.qp = true;
)
this.qp = true
}
},
//
applyAndAssembly(val) {
console.log("vvvv", val);
//idid,type
let type = "组件服务";
let id = val.id;
//
applyAndAssembly (val) {
console.log('vvvv', val)
// idid,type
const type = '组件服务'
const id = val.id
this.$http
.get(`/dataResourceRel/queryResourceRelByKeyId`, {
.get('/dataResourceRel/queryResourceRelByKeyId', {
params: {
keyId: id,
type: type,
referenceName: "",
},
referenceName: ''
}
})
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
return this.$message.error(res.msg)
}
console.log("rrrrressssz", res.data);
this.relateApplicationResourceVisible = true;
console.log('rrrrressssz', res.data)
this.relateApplicationResourceVisible = true
this.relationData = {
id: id,
linkType: "1",
responseData: res.data,
};
this.topNameArray = ["未关联组件名称", "已关联组件名称"];
console.log(" this.relationData", this.relationData);
//
});
linkType: '1',
responseData: res.data
}
this.topNameArray = ['未关联组件名称', '已关联组件名称']
console.log(' this.relationData', this.relationData)
//
})
},
//
applyAndDataResource(val) {
console.log("数据资源");
//
applyAndDataResource (val) {
console.log('数据资源')
},
//
applyAndProject(val) {
let type = "项目";
let id = val.id;
//
applyAndProject (val) {
const type = '项目'
const id = val.id
this.$http
.get(`/dataResourceRel/queryResourceRelByKeyId`, {
.get('/dataResourceRel/queryResourceRelByKeyId', {
params: {
keyId: id,
type: type,
referenceName: "",
},
referenceName: ''
}
})
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
return this.$message.error(res.msg)
}
console.log("rrrrressssx", res.data);
this.relateApplicationResourceVisible = true;
console.log('rrrrressssx', res.data)
this.relateApplicationResourceVisible = true
this.relationData = {
id: id,
linkType: "1",
responseData: res.data,
};
this.topNameArray = ["未关联项目名称", "已关联项目名称"];
//
});
linkType: '1',
responseData: res.data
}
this.topNameArray = ['未关联项目名称', '已关联项目名称']
//
})
},
//
applyAndInfrastructure(val) {
let type = "基础设施";
let id = val.id;
//
applyAndInfrastructure (val) {
const type = '基础设施'
const id = val.id
this.$http
.get(`/dataResourceRel/queryResourceRelByKeyId`, {
.get('/dataResourceRel/queryResourceRelByKeyId', {
params: {
keyId: id,
type: type,
referenceName: "",
},
referenceName: ''
}
})
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
return this.$message.error(res.msg)
}
console.log("rrrrressssj", res.data);
this.relateApplicationResourceVisible = true;
console.log('rrrrressssj', res.data)
this.relateApplicationResourceVisible = true
this.relationData = {
id: id,
linkType: "1",
responseData: res.data,
};
this.topNameArray = ["未关联基础设施名称", "已关联基础设施名称"];
//
});
linkType: '1',
responseData: res.data
}
this.topNameArray = ['未关联基础设施名称', '已关联基础设施名称']
//
})
},
//
handleIsShowRelatePopupApply(type) {
this.relateApplicationResourceVisible = type;
handleIsShowRelatePopupApply (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>
<style lang="scss" scoped>
.el-tooltip__popper {

View File

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

View File

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

View File

@ -19,7 +19,7 @@ js:
<a-input v-if="type == 'input'" v-model:value="data.note1" :placeholder="'请输入' + name" />
<!-- 下拉框 -->
<el-select
v-else-if="type === 'select' || type == 'radio'"
v-else-if="(type === 'select' && name !== '归属部门') || type == 'radio'"
style="width: 240px"
v-model:value="data.note1"
:placeholder="'请选择' + name">
@ -30,6 +30,21 @@ js:
{{ itemSelect.dictLabel }}
</el-option>
</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
v-else-if="type === 'checkBox'"
@ -82,16 +97,26 @@ export default {
if (this.data.isLinkToDic === 'true' && this.data.linkValue) {
this.$http
.get(`/sys/dict/data/page?page=1&limit=20&dictTypeId=${this.data.linkValue}&deFlage=0`).then(({ data: res }) => {
console.log(res, 'res')
const dataList = []
res.data.list.forEach((element) => {
dataList.push(element)
console.log(dataList, 'this.options')
})
this.options = dataList
console.log(this.options)
})
.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) {
@ -102,10 +127,20 @@ export default {
str += ';'
}
})
// console.log(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 () {
this.selectOptions()
}

View File

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

View File

@ -2,7 +2,7 @@
* @Author: hisense.liangjunhua
* @Date: 2022-07-08 09:48:52
* @LastEditors: hisense.liangjunhua
* @LastEditTime: 2022-07-09 10:57:07
* @LastEditTime: 2022-07-11 15:11:10
* @Description: 告诉大家这是什么
-->
<template>
@ -12,16 +12,18 @@
<template v-if='judgmentType.filter(item => item.name==child.name).length === 0'>
<div class="top">{{child.name}}</div>
<div v-for="item in child.children" :key="item.id" class='item'>
<span v-if="item.name != '来源应用'">{{ item.name }}</span>
<upload :list="[]" v-if="item.type == 'image'" type="图片" btnName="上传图片" :maxCount="1" :data="item"
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"
<span v-if="item.name != '来源应用' && item.name != '关联组件信息'">{{ item.name }}</span>
<!-- <upload :list="[]" v-if="item.type == 'image'" type="图片" btnName="上传图片" :maxCount="1" :data="item"
tip="支持图片类型大小不超过100M"></upload> -->
<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>
<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>
<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>
<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 == '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>
@ -31,7 +33,7 @@
</div>
</template>
<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>
</div>
</div>
@ -50,7 +52,8 @@ export default {
},
props: {
type: String,
putOnTheShelfList: Array
putOnTheShelfList: Array,
typeInput: String
},
data () {
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>
<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
: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
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-button @click="getDataList()">{{ $t('query') }}</el-button>
</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-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%;">
<el-table-column prop="creatorName" :label="$t('logOperation.creatorName')" header-align="center" align="center"></el-table-column>
<el-table-column prop="operation" :label="$t('logOperation.operation')" header-align="center" align="center"></el-table-column>
<el-table-column prop="requestUri" :label="$t('logOperation.requestUri')" 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 prop="requestTime" :label="$t('logOperation.requestTime')" sortable="custom" header-align="center" align="center">
<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="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">
{{ `${scope.row.requestTime}ms` }}
</template>
</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">
<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>
<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="ip" :label="$t('logOperation.ip')" header-align="center" align="center"></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>
<el-table-column prop="createDate" :label="$t('logOperation.createDate')" sortable="custom" header-align="center" align="center" width="180"></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> -->
</el-table>
<el-pagination
:current-page="page"
@ -43,7 +172,8 @@
:total="total"
layout="total, sizes, prev, pager, next, jumper"
@size-change="pageSizeChangeHandle"
@current-change="pageCurrentChangeHandle">
@current-change="pageCurrentChangeHandle"
>
</el-pagination>
</div>
</el-card>
@ -61,9 +191,98 @@ export default {
exportURL: '/sys/log/operation/export'
},
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>
<style scoped lang="scss">
.blue-font-color:hover {
color: #0058e1;
cursor: pointer;
}
</style>

View File

@ -1,8 +1,8 @@
<!--
* @Author: hisense.wuhongjian
* @Date: 2022-03-29 16:45:25
* @LastEditors: hisense.liangjunhua
* @LastEditTime: 2022-07-09 15:05:57
* @LastEditors: hisense.wuhongjian
* @LastEditTime: 2022-07-11 18:10:24
* @Description: 告诉大家这是什么
-->
<!DOCTYPE html>
@ -49,7 +49,7 @@
window.SITE_CONFIG['backUrl'] = 'http://15.2.21.238:9797';
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['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['backUrl'] = 'http://124.222.94.39:9797';

View File

@ -1,8 +1,8 @@
/*
* @Author: hisense.wuhongjian
* @Date: 2022-04-20 17:16:35
* @LastEditors: hisense.liangjunhua
* @LastEditTime: 2022-06-22 14:57:16
* @LastEditors: hisense.wuhongjian
* @LastEditTime: 2022-07-11 19:02:33
* @Description: 告诉大家这是什么
*/
import request from '@/utils/request'
@ -46,6 +46,10 @@ export function correct(params) {
export function paddleocr(params) {
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() {

View File

@ -7,6 +7,13 @@ export function getMyProcessInstancePage(params) {
params,
})
}
export function getTabilityapplication(params) {
return request({
url: '/processForm/tabilityapplication/my_page',
method: 'get',
params,
})
}
//
export function getSgcList(params) {
@ -231,3 +238,11 @@ export function queryResourceRelByKeyId(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 || '')
store.dispatch('user/resetAll').catch(() => {})
if (res.token) {
console.log('存在token信息', res.token)
setAccessToken(res.token)
const token = getAccessToken()
console.log('验证token信息', token)
}
debugger
// if (res.token) {
// console.log('token', res.token)
// setAccessToken(res.token)
// const token = getAccessToken()
// console.log('token', token)
// }
// // location.reload()
// if (redirect) {
@ -71,8 +72,10 @@ const instance = axios.create({
*/
instance.interceptors.request.use(
(config) => {
if (store.getters['user/accessToken'])
config.headers[tokenName] = store.getters['user/accessToken']
debugger
const token = getAccessToken()
if (token)
config.headers[tokenName] = token
if (
config.data &&
config.headers['Content-Type'] ===
@ -101,10 +104,12 @@ instance.interceptors.response.use(
console.log('接口返回REDIRECT', response.headers.redirect)
response['Access-Control-Expose-Headers'] = 'redirect'
const { code, message } = response.data
if (response.headers.token) {
debugger
if (code=='0' && response.headers.token) {
setAccessToken(response.headers.token)
} else {
if (response.headers.redirect) {
const token = getAccessToken()
if (response.headers.redirect && !token) {
// window.location.href = response.headers.redirect
window.location.replace(response.headers.redirect)
return
@ -154,16 +159,21 @@ instance.interceptors.response.use(
// }
},
(error) => {
debugger
console.log('接口error', error)
if (loadingInstance) loadingInstance.close()
const { response, message } = error
if (error.response && error.response.data) {
if (error.response) {
console.log('接口返回', response)
console.log('接口返回headers', response.headers)
console.log('接口返回REDIRECT', response.headers.redirect)
// if (response.headers.token) {
// setAccessToken(response.headers.token)
// }
if (response.headers.redirect) {
window.location.replace(response.headers.redirect)
return Promise.reject(error)
// return Promise.resolve()
}
const { status, data } = response

View File

@ -2,7 +2,7 @@
* @Author: hisense.wuhongjian
* @Date: 2022-04-01 17:23:11
* @LastEditors: hisense.wuhongjian
* @LastEditTime: 2022-07-08 18:55:28
* @LastEditTime: 2022-07-11 16:39:36
* @Description: 告诉大家这是什么
*/
/**
@ -33,8 +33,9 @@
if (!loginInterception) hasToken = true
console.log('hasToken存在巨大问题', hasToken)
if (hasToken) {
setAccessToken(hasToken)
// setAccessToken(hasToken)
await store.dispatch('user/getUserInfo')
debugger
next()
} else {
let accessRoutes = []
@ -45,6 +46,7 @@
if (routesWhiteList.indexOf(to.path) !== -1) {
next()
} else {
//
getUserInfo().then(res=>{
console.log(res)
router.replace('/home')

View File

@ -192,6 +192,7 @@
],
},
])
let shiyongshouce = ref({})
const navList = ref([])
const navList2 = ref([])
const fileList = ref({})
@ -315,6 +316,9 @@
}
init()
mybus.on('chageDataFrom', (obj) => {
if (obj.attrType == '技术文档' && obj.attrValue != null) {
shiyongshouce.value = obj
}
dataFrom.value.infoList = dataFrom.value.infoList.filter(
(item) => item.attrType !== obj.attrType
)
@ -322,6 +326,13 @@
obj.attrValue = ''
}
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) => {

View File

@ -99,6 +99,7 @@
import mybus from '@/myplugins/mybus'
const showView = ref('基本信息')
const router = useRouter()
let shiyongshouce = ref({})
const navList = ref([])
const navList2 = ref([])
const fileList = ref({})
@ -285,7 +286,9 @@
}
init()
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(
(item) => item.attrType !== obj.attrType
)
@ -293,6 +296,14 @@
obj.attrValue = ''
}
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) => {
fileList.value = obj

View File

@ -173,6 +173,7 @@
],
},
])
let shiyongshouce = ref({})
const navList = ref([])
const navList2 = ref([])
const fileList = ref({})
@ -297,6 +298,9 @@
}
init()
mybus.on('chageDataFrom', (obj) => {
if (obj.attrType == '使用手册' && obj.attrValue != null) {
shiyongshouce.value = obj
}
dataFrom.value.infoList = dataFrom.value.infoList.filter(
(item) => item.attrType !== obj.attrType
)
@ -304,6 +308,13 @@
obj.attrValue = ''
}
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) => {

View File

@ -173,6 +173,7 @@
],
},
])
let shiyongshouce = ref({})
const navList = ref([])
const navList2 = ref([])
const fileList = ref({})
@ -297,6 +298,9 @@
}
init()
mybus.on('chageDataFrom', (obj) => {
if (obj.attrType == '技术文档' && obj.attrValue != null) {
shiyongshouce.value = obj
}
dataFrom.value.infoList = dataFrom.value.infoList.filter(
(item) => item.attrType !== obj.attrType
)
@ -304,6 +308,13 @@
obj.attrValue = ''
}
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) => {

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 navList2 = ref([])
const fileList = ref({})
@ -245,6 +246,9 @@
}
init()
mybus.on('chageDataFrom', (obj) => {
if (obj.attrType == '技术文档' && obj.attrValue != null) {
shiyongshouce.value = obj
}
dataFrom.value.infoList = dataFrom.value.infoList.filter(
(item) => item.attrType !== obj.attrType
)
@ -252,6 +256,13 @@
obj.attrValue = ''
}
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) => {

File diff suppressed because it is too large Load Diff

View File

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

View File

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

View File

@ -8,7 +8,12 @@
<template>
<div class="application-navigation" v-if="navList.length > 0">
<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 }}
<span class="line"></span>
</div>
@ -16,179 +21,179 @@
</div>
</template>
<script setup>
import { ref, defineProps, watch } from 'vue'
import mybus from '@/myplugins/mybus'
import { useRouter } from 'vue-router'
import { queryPartAppByKeyId } from '@/api/home'
//
const router = useRouter()
const keyId = router.currentRoute.value.query.id
const navList = ref([
{
name: '应用展示',
key: 'application-presentation',
},
{
name: '功能介绍',
key: 'function-introduction',
},
{
name: '使用能力',
key: 'ability-to-use',
},
{
name: '部署与安全',
key: 'deployment-and-security',
},
{
name: '归属部门与服务商',
key: 'department-and-service-provider',
},
{
name: '常见问题',
key: 'common-problem',
},
])
const props = defineProps({
selectNow: { type: String, default: '' },
dataList: { type: Object, 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('关联组件')
}
import { ref, defineProps, watch } from 'vue'
import mybus from '@/myplugins/mybus'
import { useRouter } from 'vue-router'
import { queryPartAppByKeyId } from '@/api/home'
//
const router = useRouter()
const keyId = router.currentRoute.value.query.id
const navList = ref([
{
name: '应用展示',
key: 'application-presentation',
},
{
name: '功能介绍',
key: 'function-introduction',
},
{
name: '使用能力',
key: 'ability-to-use',
},
{
name: '部署与安全',
key: 'deployment-and-security',
},
{
name: '归属部门与服务商',
key: 'department-and-service-provider',
},
{
name: '常见问题',
key: 'common-problem',
},
])
const props = defineProps({
selectNow: { type: String, default: '' },
dataList: { type: Object, default: null },
associatedComponents: { type: Array, default: null },
})
}
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('应用展示')
const select = ref('application-associated-ability')
const list = ref([])
// id
if (keyId) {
let params = {
keyId: keyId,
type: '组件服务',
}
})
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
}
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('关联组件')
}
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>
<style lang="less" scoped>
.application-navigation {
width: 19.12rem;
height: 0.84rem;
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;
.application-navigation {
width: 19.12rem;
height: 0.84rem;
line-height: 0.8rem;
display: flex;
flex-direction: column;
justify-content: space-between;
align-items: center;
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;
.line {
width: 0.4rem;
height: 0.04rem;
.nav {
cursor: pointer;
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>

View File

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

View File

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

View File

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