Merge branch 'hi-ucs-dev' of http://124.222.94.39:3001/wuhongjian/hi-ucs into hi-ucs-dev
This commit is contained in:
commit
8acde6c897
|
@ -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';
|
||||
|
|
|
@ -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:
|
||||
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
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
//根据id和类型查询已关联的组件,将id,type和查出来的数据传递给组件
|
||||
let type = "组件服务";
|
||||
let id = val.id;
|
||||
// 应用与组件
|
||||
applyAndAssembly (val) {
|
||||
console.log('vvvv', val)
|
||||
// 根据id和类型查询已关联的组件,将id,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 {
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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)
|
||||
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>
|
||||
|
|
|
@ -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()
|
||||
}
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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>
|
|
@ -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>
|
||||
|
|
|
@ -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';
|
||||
|
|
|
@ -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() {
|
||||
|
|
|
@ -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,
|
||||
})
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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')
|
||||
|
|
|
@ -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) => {
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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) => {
|
||||
|
|
|
@ -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) => {
|
||||
|
|
|
@ -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>
|
|
@ -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) => {
|
||||
|
|
|
@ -16,14 +16,21 @@
|
|||
<template v-if="title.isConfigure">
|
||||
<div class="bottom">
|
||||
<div class="items" v-if="data[title.name].length > 0">
|
||||
<div class="item" v-for="(val, index) in data[title.name]" :key="'key1' + val.name + index">
|
||||
<div
|
||||
class="item"
|
||||
v-for="(val, index) in data[title.name]"
|
||||
:key="'key1' + val.name + index"
|
||||
>
|
||||
<p>
|
||||
<span>{{ title.name }}-{{ index + 1 }}</span>
|
||||
<span></span>
|
||||
</p>
|
||||
<p v-for="attr in props.configure.filter(
|
||||
<p
|
||||
v-for="attr in props.configure.filter(
|
||||
(item, index2) => item.name === title.name
|
||||
)[0].list" :key="'key2' + attr.name + index2">
|
||||
)[0].list"
|
||||
:key="'key2' + attr.name + index2"
|
||||
>
|
||||
<span>{{ attr.name }}</span>
|
||||
<span v-if="attr.type === 'image'">
|
||||
<a-image :width="85" :height="60" :src="val.img" />
|
||||
|
@ -37,19 +44,51 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="add">添加更多{{ title.name }}</div>
|
||||
<div class="form" v-for="(val, index) in props.configure.filter(
|
||||
<div
|
||||
class="form"
|
||||
v-for="(val, index) in props.configure.filter(
|
||||
(item) => item.name === title.name
|
||||
)[0].list" :key="'key3' + val.name + index">
|
||||
)[0].list"
|
||||
:key="'key3' + val.name + index"
|
||||
>
|
||||
<span>{{ val.name }}</span>
|
||||
<a-input v-model:value="val.note1" :maxlength="24" :placeholder="'请填写' + val.name + ',不超过24个字符'"
|
||||
v-if="val.type == 'input'" />
|
||||
<a-textarea v-model:value="val.note1" :showCount="true" :maxlength="200" :placeholder="'请填写' + val.name"
|
||||
v-else-if="val.type == 'textArea'" />
|
||||
<a-input-number v-model:value="val.note1" :min="0" :max="9999" :step="0.01" string-mode
|
||||
:placeholder="'请填写' + val.name" v-else-if="val.type == 'number'" />
|
||||
<a-radio-group v-model:value="val.note1" :options="val.options" v-else-if="val.type == 'radio'" />
|
||||
<upload :key="showKey" type="图片" btnName="上传图片" :maxCount="1" :data="val" :list="[]" tip="支持图片类型,大小不超过100M"
|
||||
v-else-if="val.type == 'image'"></upload>
|
||||
<a-input
|
||||
v-model:value="val.note1"
|
||||
:maxlength="24"
|
||||
:placeholder="'请填写' + val.name + ',不超过24个字符'"
|
||||
v-if="val.type == 'input'"
|
||||
/>
|
||||
<a-textarea
|
||||
v-model:value="val.note1"
|
||||
:showCount="true"
|
||||
:maxlength="200"
|
||||
:placeholder="'请填写' + val.name"
|
||||
v-else-if="val.type == 'textArea'"
|
||||
/>
|
||||
<a-input-number
|
||||
v-model:value="val.note1"
|
||||
:min="0"
|
||||
:max="9999"
|
||||
:step="0.01"
|
||||
string-mode
|
||||
:placeholder="'请填写' + val.name"
|
||||
v-else-if="val.type == 'number'"
|
||||
/>
|
||||
<a-radio-group
|
||||
v-model:value="val.note1"
|
||||
:options="val.options"
|
||||
v-else-if="val.type == 'radio'"
|
||||
/>
|
||||
<upload
|
||||
:key="showKey"
|
||||
type="图片"
|
||||
btnName="上传图片"
|
||||
:maxCount="1"
|
||||
:data="val"
|
||||
:list="[]"
|
||||
tip="支持图片类型,大小不超过100M"
|
||||
v-else-if="val.type == 'image'"
|
||||
></upload>
|
||||
</div>
|
||||
<div class="submit">
|
||||
<a-button type="primary" @click="add(title.name)">提交</a-button>
|
||||
|
@ -60,77 +99,173 @@
|
|||
<div class="bottom">
|
||||
<div class="form" v-for="item in title.children" :key="item.id">
|
||||
<span>{{ item.name }}</span>
|
||||
<a-input v-if="item.type == 'input'" v-model:value="item.note1" :placeholder="'请输入' + item.name" />
|
||||
<a-radio-group v-else-if="item.type == 'radio'" v-model:value="item.note1" :options="item.options" />
|
||||
<a-input v-else-if="item.type == 'text'" v-model:value="item.note1" :placeholder="'请输入' + item.name"
|
||||
:disabled="true" />
|
||||
<a-input v-else-if="item.type == 'text2'" v-model:value="item.note1" :placeholder="'请输入' + item.name"
|
||||
:disabled="true" />
|
||||
<a-textarea v-else-if="item.type == 'textArea'" v-model:value="item.note1" :showCount="true"
|
||||
:maxlength="200" :placeholder="'请输入' + item.name" />
|
||||
<upload v-else-if="item.type == 'image'" type="图片" btnName="上传图片" :maxCount="1" :data="item"
|
||||
:list="props.imgList" tip="支持图片类型,大小不超过100M"></upload>
|
||||
<upload v-else-if="item.type == 'file' && item.name !== '使用手册'" type="文件" btnName="上传附件" :maxCount="1"
|
||||
:data="item" :list="props.fileList" tip="支持文件类型,大小不超过100M"></upload>
|
||||
<upload v-else-if="item.name == '使用手册'" type="文件" btnName="上传附件" :maxCount="1" :data="item" :busType="2"
|
||||
:list="props.fileList2" tip="支持文件类型,大小不超过100M"></upload>
|
||||
<upload v-else-if="item.type == 'video'" type="视频" btnName="上传视频" :maxCount="1" :data="item"
|
||||
:list="props.videoList" tip="支持视频类型,大小不超过100M"></upload>
|
||||
<a-input
|
||||
v-if="item.type == 'input'"
|
||||
v-model:value="item.note1"
|
||||
:placeholder="'请输入' + item.name"
|
||||
/>
|
||||
<a-radio-group
|
||||
v-else-if="item.type == 'radio'"
|
||||
v-model:value="item.note1"
|
||||
:options="item.options"
|
||||
/>
|
||||
<a-input
|
||||
v-else-if="item.type == 'text'"
|
||||
v-model:value="item.note1"
|
||||
:placeholder="'请输入' + item.name"
|
||||
:disabled="true"
|
||||
/>
|
||||
<a-input
|
||||
v-else-if="item.type == 'text2'"
|
||||
v-model:value="item.note1"
|
||||
:placeholder="'请输入' + item.name"
|
||||
:disabled="true"
|
||||
/>
|
||||
<a-textarea
|
||||
v-else-if="item.type == 'textArea'"
|
||||
v-model:value="item.note1"
|
||||
:showCount="true"
|
||||
:maxlength="200"
|
||||
:placeholder="'请输入' + item.name"
|
||||
/>
|
||||
<upload
|
||||
v-else-if="item.type == 'image'"
|
||||
type="图片"
|
||||
btnName="上传图片"
|
||||
:maxCount="1"
|
||||
:data="item"
|
||||
:list="props.imgList"
|
||||
tip="支持图片类型,大小不超过100M"
|
||||
></upload>
|
||||
<upload
|
||||
v-else-if="item.type == 'file' && item.name !== '使用手册'"
|
||||
type="文件"
|
||||
btnName="上传附件"
|
||||
:maxCount="1"
|
||||
:data="item"
|
||||
:list="props.fileList"
|
||||
tip="支持文件类型,大小不超过100M"
|
||||
></upload>
|
||||
<upload
|
||||
v-else-if="item.name == '使用手册'"
|
||||
type="文件"
|
||||
btnName="上传附件"
|
||||
:maxCount="1"
|
||||
:data="item"
|
||||
:busType="2"
|
||||
:list="props.fileList2"
|
||||
tip="支持文件类型,大小不超过100M"
|
||||
></upload>
|
||||
<div
|
||||
class="Technical-text"
|
||||
v-else-if="item.type == 'richText'"
|
||||
@click="showTextFunction()"
|
||||
>
|
||||
编辑富文本
|
||||
</div>
|
||||
<upload
|
||||
v-else-if="item.type == 'video'"
|
||||
type="视频"
|
||||
btnName="上传视频"
|
||||
:maxCount="1"
|
||||
:data="item"
|
||||
:list="props.videoList"
|
||||
tip="支持视频类型,大小不超过100M"
|
||||
></upload>
|
||||
<a-button v-else-if="item.type == 'dialog'" @click="sourceClick">
|
||||
请选择来源应用
|
||||
</a-button>
|
||||
<a-button v-else-if="item.type == 'dialog2'" @click="componentsClick">
|
||||
<a-button
|
||||
v-else-if="item.type == 'dialog2'"
|
||||
@click="componentsClick"
|
||||
>
|
||||
请选择关联组件
|
||||
</a-button>
|
||||
<a-select v-else-if="item.type == 'select'" style="width: 240px" v-model:value="item.note1"
|
||||
:placeholder="'请选择' + item.name">
|
||||
<a-select-option v-for="(itemSelect, indexSelect) in item.options" :key="indexSelect"
|
||||
:value="itemSelect.dictLabel">
|
||||
<a-select
|
||||
v-else-if="item.type == 'select'"
|
||||
style="width: 240px"
|
||||
v-model:value="item.note1"
|
||||
:placeholder="'请选择' + item.name"
|
||||
>
|
||||
<a-select-option
|
||||
v-for="(itemSelect, indexSelect) in item.options"
|
||||
:key="indexSelect"
|
||||
:value="itemSelect.dictLabel"
|
||||
>
|
||||
{{ itemSelect.dictLabel }}
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
<div v-else-if="item.type == 'checkBox'" class="application-Area" id="application-Area" :key="showKey">
|
||||
<div v-for="(itemson, indexson) in item.options" :key="indexson" class="application-Area-son"
|
||||
@click="ApplicationArea(item, itemson)" :class="
|
||||
<div
|
||||
v-else-if="item.type == 'checkBox'"
|
||||
class="application-Area"
|
||||
id="application-Area"
|
||||
:key="showKey"
|
||||
>
|
||||
<div
|
||||
v-for="(itemson, indexson) in item.options"
|
||||
:key="indexson"
|
||||
class="application-Area-son"
|
||||
@click="ApplicationArea(item, itemson)"
|
||||
:class="
|
||||
item.note2.indexOf(itemson.dictLabel) != -1
|
||||
? 'application-Area-down'
|
||||
: ''
|
||||
">
|
||||
"
|
||||
>
|
||||
{{ itemson.dictLabel }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="AssociatedApplication">
|
||||
<a-modal v-model:visible="visibleAssociatedApplication" :title="titleName" @ok="handleOk"
|
||||
@cancel="handleCancel" style="width: 960px">
|
||||
<a-modal
|
||||
v-model:visible="visibleAssociatedApplication"
|
||||
:title="titleName"
|
||||
@ok="handleOk"
|
||||
@cancel="handleCancel"
|
||||
style="width: 960px"
|
||||
>
|
||||
<div>
|
||||
<a-transfer v-model:target-keys="targetKeys" v-model:selected-keys="selectedKeys"
|
||||
:data-source="mockData" :titles="titles" :render="(item) => item.title" @change="handleChange"
|
||||
@selectChange="handleSelectChange" />
|
||||
<a-transfer
|
||||
v-model:target-keys="targetKeys"
|
||||
v-model:selected-keys="selectedKeys"
|
||||
:data-source="mockData"
|
||||
:titles="titles"
|
||||
:render="(item) => item.title"
|
||||
@change="handleChange"
|
||||
@selectChange="handleSelectChange"
|
||||
/>
|
||||
</div>
|
||||
</a-modal>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
</div>
|
||||
<div
|
||||
v-show="showText"
|
||||
class="fuwenbenbianjiqi"
|
||||
style="width: 100px; height: 100px; z-index: 10000"
|
||||
>
|
||||
<VueTemplateDemo></VueTemplateDemo>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script setup>
|
||||
import { ref, defineProps, watch, onMounted } from 'vue'
|
||||
import mybus from '@/myplugins/mybus'
|
||||
import upload from '@/views/components/upload'
|
||||
import { message } from 'ant-design-vue'
|
||||
import {
|
||||
import { ref, defineProps, watch, onMounted } from 'vue'
|
||||
import mybus from '@/myplugins/mybus'
|
||||
import upload from '@/views/components/upload'
|
||||
import { message } from 'ant-design-vue'
|
||||
import {
|
||||
getCategoryTreePage,
|
||||
queryApplicationRelByResourceId,
|
||||
queryResourceRelByKeyId,
|
||||
} from '@/api/personalCenter'
|
||||
import { useRouter } from 'vue-router'
|
||||
|
||||
const router = useRouter()
|
||||
const abilityToType = router.currentRoute.value.query.abilityToType
|
||||
const componentTypeValue = router.currentRoute.value.query.componentTypeValue
|
||||
const props = defineProps({
|
||||
filesUpload,
|
||||
} from '@/api/personalCenter'
|
||||
import VueTemplateDemo from '@/views/capacityOnTheShelf/FilesUpload.vue'
|
||||
import { useRouter } from 'vue-router'
|
||||
const router = useRouter()
|
||||
const abilityToType = router.currentRoute.value.query.abilityToType
|
||||
const componentTypeValue = router.currentRoute.value.query.componentTypeValue
|
||||
const props = defineProps({
|
||||
// 展示数据
|
||||
refData: { type: Object, default: null },
|
||||
// 表单数据
|
||||
|
@ -188,13 +323,13 @@ const props = defineProps({
|
|||
// }
|
||||
// ]
|
||||
// }]
|
||||
})
|
||||
// console.log('props==========>', props)
|
||||
const data = ref({
|
||||
})
|
||||
// console.log('props==========>', props)
|
||||
const data = ref({
|
||||
list: [],
|
||||
})
|
||||
const showKey = ref(0)
|
||||
props.refData.children.map((item) => {
|
||||
})
|
||||
const showKey = ref(0)
|
||||
props.refData.children.map((item) => {
|
||||
if (item.name == '基本信息') {
|
||||
item.children.map((val) => {
|
||||
if (val.name == '能力类型') {
|
||||
|
@ -214,8 +349,8 @@ props.refData.children.map((item) => {
|
|||
} else {
|
||||
item.isConfigure = false
|
||||
}
|
||||
})
|
||||
let arr = props.refData.children.filter((item) => {
|
||||
})
|
||||
let arr = props.refData.children.filter((item) => {
|
||||
if (props.configure) {
|
||||
if (!item.isConfigure) {
|
||||
return item
|
||||
|
@ -223,10 +358,10 @@ let arr = props.refData.children.filter((item) => {
|
|||
} else {
|
||||
return item
|
||||
}
|
||||
})
|
||||
data.value.list = []
|
||||
// 获取字典数据
|
||||
arr.forEach((val) => {
|
||||
})
|
||||
data.value.list = []
|
||||
// 获取字典数据
|
||||
arr.forEach((val) => {
|
||||
val.children.forEach((item) => {
|
||||
if (item.isLinkToDic === 'true' && item.linkValue) {
|
||||
getCategoryTreePage({
|
||||
|
@ -251,8 +386,8 @@ arr.forEach((val) => {
|
|||
data.value.list.push(item)
|
||||
}
|
||||
})
|
||||
})
|
||||
if (props.dataFrom) {
|
||||
})
|
||||
if (props.dataFrom) {
|
||||
// console.log(props.dataFrom, data.value.list)
|
||||
props.dataFrom.infoList.forEach((item) => {
|
||||
if (
|
||||
|
@ -274,8 +409,18 @@ if (props.dataFrom) {
|
|||
// item.note1 = item.attrValue.split(';')
|
||||
}
|
||||
})
|
||||
}
|
||||
const add = (title) => {
|
||||
}
|
||||
//显示富文本
|
||||
let showText = ref(false)
|
||||
const showTextFunction = () => {
|
||||
showText.value = true
|
||||
}
|
||||
mybus.on('showTextFunctionEmit', (show) => {
|
||||
console.log('ssdcsd')
|
||||
showText.value = show
|
||||
})
|
||||
mybus.off('func')
|
||||
const add = (title) => {
|
||||
console.log(title, 'title')
|
||||
let list = props.configure.filter((item) => item.name === title)[0].list
|
||||
let flag = true
|
||||
|
@ -306,16 +451,16 @@ const add = (title) => {
|
|||
} else {
|
||||
message.warning('请填写完整')
|
||||
}
|
||||
}
|
||||
const del = (title, index) => {
|
||||
}
|
||||
const del = (title, index) => {
|
||||
data.value[title].splice(index, 1)
|
||||
mybus.emit('chageDataFrom', {
|
||||
attrType: title,
|
||||
attrValue: JSON.stringify(data.value[title]),
|
||||
delFlag: 0,
|
||||
})
|
||||
}
|
||||
const ApplicationArea = (item, itemson) => {
|
||||
}
|
||||
const ApplicationArea = (item, itemson) => {
|
||||
// console.log(item, itemson)
|
||||
if (item.note2.indexOf(itemson.dictLabel) === -1) {
|
||||
item.note2.push(itemson.dictLabel)
|
||||
|
@ -327,14 +472,14 @@ const ApplicationArea = (item, itemson) => {
|
|||
attrValue: item.note2.join(';'),
|
||||
delFlag: 0,
|
||||
})
|
||||
}
|
||||
// 来源应用
|
||||
const visibleAssociatedApplication = ref(false)
|
||||
const mockData = ref([])
|
||||
const titles = ref(['未关联的应用名称', '已关联的应用名称'])
|
||||
const titleName = ref('关联应用')
|
||||
}
|
||||
// 来源应用
|
||||
const visibleAssociatedApplication = ref(false)
|
||||
const mockData = ref([])
|
||||
const titles = ref(['未关联的应用名称', '已关联的应用名称'])
|
||||
const titleName = ref('关联应用')
|
||||
|
||||
const sourceClick = () => {
|
||||
const sourceClick = () => {
|
||||
visibleAssociatedApplication.value = true
|
||||
queryApplicationRelByResourceId({
|
||||
referenceId: 0,
|
||||
|
@ -349,9 +494,9 @@ const sourceClick = () => {
|
|||
})
|
||||
})
|
||||
})
|
||||
}
|
||||
// 关联组件
|
||||
const componentsClick = () => {
|
||||
}
|
||||
// 关联组件
|
||||
const componentsClick = () => {
|
||||
titles.value = ['未关联的组件名称', '已关联的组件名称']
|
||||
titleName.value = '关联组件'
|
||||
|
||||
|
@ -371,21 +516,21 @@ const componentsClick = () => {
|
|||
})
|
||||
})
|
||||
})
|
||||
}
|
||||
const targetKeys = ref([])
|
||||
const selectedKeys = ref([])
|
||||
}
|
||||
const targetKeys = ref([])
|
||||
const selectedKeys = ref([])
|
||||
|
||||
const handleChange = (nextTargetKeys, direction, moveKeys) => {
|
||||
const handleChange = (nextTargetKeys, direction, moveKeys) => {
|
||||
console.log('targetKeys: ', nextTargetKeys)
|
||||
console.log('direction: ', direction)
|
||||
console.log('moveKeys: ', moveKeys)
|
||||
}
|
||||
}
|
||||
|
||||
const handleSelectChange = (sourceSelectedKeys, targetSelectedKeys) => {
|
||||
const handleSelectChange = (sourceSelectedKeys, targetSelectedKeys) => {
|
||||
console.log('targetSelectedKeys: ', targetSelectedKeys)
|
||||
}
|
||||
}
|
||||
|
||||
const handleOk = (e) => {
|
||||
const handleOk = (e) => {
|
||||
console.log(e)
|
||||
visibleAssociatedApplication.value = false
|
||||
// console.log('2222222222222', props.refData)
|
||||
|
@ -394,13 +539,13 @@ const handleOk = (e) => {
|
|||
item.note1 = targetKeys.value + ''
|
||||
}
|
||||
})
|
||||
}
|
||||
const handleCancel = (e) => {
|
||||
}
|
||||
const handleCancel = (e) => {
|
||||
console.log(e)
|
||||
visibleAssociatedApplication.value = false
|
||||
}
|
||||
}
|
||||
|
||||
watch(data.value.list, (newProps, oldProps) => {
|
||||
watch(data.value.list, (newProps, oldProps) => {
|
||||
// console.log(newProps, oldProps)
|
||||
newProps.forEach((val) => {
|
||||
// console.log('数据发生改变==========>', val)
|
||||
|
@ -432,18 +577,32 @@ watch(data.value.list, (newProps, oldProps) => {
|
|||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
})
|
||||
</script>
|
||||
<style lang="less" scoped>
|
||||
.put-on-the-shelf {
|
||||
.put-on-the-shelf {
|
||||
height: 680px;
|
||||
overflow: scroll;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
padding: 50px 100px 25px;
|
||||
.Technical-text {
|
||||
height: 30px;
|
||||
width: 100px;
|
||||
border: 1px solid #bbd3ef;
|
||||
border-radius: 6px;
|
||||
background: #edf4fc;
|
||||
color: #0087ff;
|
||||
font-size: 14px;
|
||||
text-align: center;
|
||||
line-height: 30px;
|
||||
}
|
||||
.Technical-text:hover {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
&>div {
|
||||
& > div {
|
||||
width: 100%;
|
||||
margin-top: 60px;
|
||||
|
||||
|
@ -488,7 +647,7 @@ watch(data.value.list, (newProps, oldProps) => {
|
|||
}
|
||||
}
|
||||
|
||||
p:nth-of-type(1)>span:nth-of-type(1) {
|
||||
p:nth-of-type(1) > span:nth-of-type(1) {
|
||||
font-size: 18px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
@ -574,12 +733,12 @@ watch(data.value.list, (newProps, oldProps) => {
|
|||
}
|
||||
}
|
||||
|
||||
&>div:nth-of-type(1) {
|
||||
& > div:nth-of-type(1) {
|
||||
margin-top: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.application-Area {
|
||||
.application-Area {
|
||||
width: 570px;
|
||||
display: grid;
|
||||
margin-top: -5px;
|
||||
|
@ -605,68 +764,68 @@ watch(data.value.list, (newProps, oldProps) => {
|
|||
background: #0087ff;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
:deep(.ant-image-img) {
|
||||
:deep(.ant-image-img) {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
object-fit: contain;
|
||||
}
|
||||
}
|
||||
|
||||
:deep(.ant-modal) {
|
||||
:deep(.ant-modal) {
|
||||
width: 960px;
|
||||
}
|
||||
}
|
||||
|
||||
:deep(.ant-transfer-list) {
|
||||
:deep(.ant-transfer-list) {
|
||||
width: 39.5%;
|
||||
height: 520px;
|
||||
}
|
||||
}
|
||||
|
||||
:deep(.ant-transfer-operation) {
|
||||
:deep(.ant-transfer-operation) {
|
||||
flex-direction: row-reverse;
|
||||
margin: 0 30px;
|
||||
}
|
||||
}
|
||||
|
||||
:deep(.ant-btn) {
|
||||
:deep(.ant-btn) {
|
||||
width: 56px;
|
||||
height: 40px;
|
||||
border-radius: 4px;
|
||||
}
|
||||
}
|
||||
|
||||
:deep(.ant-btn:first-child) {
|
||||
:deep(.ant-btn:first-child) {
|
||||
margin-left: 4px;
|
||||
}
|
||||
}
|
||||
|
||||
:deep(.ant-modal-footer) {
|
||||
:deep(.ant-modal-footer) {
|
||||
border: 0;
|
||||
}
|
||||
}
|
||||
|
||||
:deep(.ant-modal-header) {
|
||||
:deep(.ant-modal-header) {
|
||||
border: 0;
|
||||
}
|
||||
}
|
||||
|
||||
:deep(.ant-modal-title) {
|
||||
:deep(.ant-modal-title) {
|
||||
line-height: 24px;
|
||||
font-size: 18px;
|
||||
color: #303133;
|
||||
}
|
||||
}
|
||||
|
||||
:deep(.ant-transfer-list-header) {
|
||||
:deep(.ant-transfer-list-header) {
|
||||
background: #f5f7fa;
|
||||
}
|
||||
}
|
||||
|
||||
:deep(.ant-transfer-list-header-selected) {
|
||||
:deep(.ant-transfer-list-header-selected) {
|
||||
display: flex;
|
||||
width: 90%;
|
||||
flex-direction: row-reverse;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
}
|
||||
|
||||
:deep(.ant-transfer-list-header-title) {
|
||||
:deep(.ant-transfer-list-header-title) {
|
||||
font-size: 16px;
|
||||
color: #303133;
|
||||
font-weight: 400;
|
||||
text-align: left;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -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>
|
||||
|
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
)
|
||||
|
|
|
@ -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,14 +21,14 @@
|
|||
</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([
|
||||
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',
|
||||
|
@ -48,16 +53,16 @@ const navList = ref([
|
|||
name: '常见问题',
|
||||
key: 'common-problem',
|
||||
},
|
||||
])
|
||||
const props = defineProps({
|
||||
])
|
||||
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) {
|
||||
})
|
||||
const select = ref('application-associated-ability')
|
||||
const list = ref([])
|
||||
// 根据能力id查询是否存在关联应用
|
||||
if (keyId) {
|
||||
let params = {
|
||||
keyId: keyId,
|
||||
type: '组件服务',
|
||||
|
@ -74,12 +79,12 @@ if (keyId) {
|
|||
list.value.unshift('关联组件')
|
||||
}
|
||||
})
|
||||
}
|
||||
const selectNav = (key) => {
|
||||
}
|
||||
const selectNav = (key) => {
|
||||
select.value = key
|
||||
mybus.emit('flyToView', select.value)
|
||||
}
|
||||
if (props.dataList.infoList) {
|
||||
}
|
||||
if (props.dataList.infoList) {
|
||||
list.value = []
|
||||
props.dataList.infoList.map((item) => {
|
||||
if (
|
||||
|
@ -110,14 +115,14 @@ if (props.dataList.infoList) {
|
|||
}
|
||||
}
|
||||
console.log('11111111111111111111111111', list.value, navList.value)
|
||||
}
|
||||
watch(
|
||||
}
|
||||
watch(
|
||||
() => props.selectNow,
|
||||
(newValue) => {
|
||||
select.value = newValue
|
||||
}
|
||||
)
|
||||
watch(
|
||||
)
|
||||
watch(
|
||||
() => props.dataList,
|
||||
(val) => {
|
||||
if (val) {
|
||||
|
@ -154,10 +159,10 @@ watch(
|
|||
console.log('11111111111111111111111111', list.value, navList.value)
|
||||
}
|
||||
}
|
||||
)
|
||||
)
|
||||
</script>
|
||||
<style lang="less" scoped>
|
||||
.application-navigation {
|
||||
.application-navigation {
|
||||
width: 19.12rem;
|
||||
height: 0.84rem;
|
||||
line-height: 0.8rem;
|
||||
|
@ -190,5 +195,5 @@ watch(
|
|||
background: #526aff;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -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,9 +31,9 @@
|
|||
</template>
|
||||
|
||||
<script setup>
|
||||
import DetalsTitle from '@/views/detailsAll/components/DetalsTitle'
|
||||
import { ref, defineProps, watch } from 'vue'
|
||||
let dataFrom = ref({
|
||||
import DetalsTitle from '@/views/detailsAll/components/DetalsTitle'
|
||||
import { ref, defineProps, watch } from 'vue'
|
||||
let dataFrom = ref({
|
||||
title: '归属部门与服务商',
|
||||
englishTitle: 'DEPARTMENT&ERVICE',
|
||||
content: [
|
||||
|
@ -39,13 +46,13 @@ let dataFrom = ref({
|
|||
childrenContent: [],
|
||||
},
|
||||
],
|
||||
})
|
||||
console.log(dataFrom.value)
|
||||
//数据初始化
|
||||
const props = defineProps({
|
||||
})
|
||||
console.log(dataFrom.value)
|
||||
//数据初始化
|
||||
const props = defineProps({
|
||||
dataList: { type: Object, default: null },
|
||||
})
|
||||
if (props.dataList.infoList) {
|
||||
})
|
||||
if (props.dataList.infoList) {
|
||||
let obj = {
|
||||
attrType: '部门名称',
|
||||
attrValue: props.dataList.deptName || '------',
|
||||
|
@ -95,8 +102,8 @@ if (props.dataList.infoList) {
|
|||
})
|
||||
|
||||
console.log('obj', dataFrom.value)
|
||||
}
|
||||
watch(
|
||||
}
|
||||
watch(
|
||||
() => props.dataList,
|
||||
(val) => {
|
||||
if (val) {
|
||||
|
@ -161,11 +168,11 @@ watch(
|
|||
console.log('obj', dataFrom.value)
|
||||
}
|
||||
}
|
||||
)
|
||||
)
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.application-deployment-and-security {
|
||||
.application-deployment-and-security {
|
||||
padding: 0.8rem 0;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
@ -184,9 +191,11 @@ watch(
|
|||
height: 1.5rem;
|
||||
width: 6.2rem;
|
||||
border-radius: 0.2rem;
|
||||
background: linear-gradient(to right,
|
||||
background: linear-gradient(
|
||||
to right,
|
||||
rgba(113, 132, 252, 0.4),
|
||||
rgba(148, 163, 252, 0.4));
|
||||
rgba(148, 163, 252, 0.4)
|
||||
);
|
||||
padding: 0 0.3rem;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
@ -211,11 +220,11 @@ watch(
|
|||
|
||||
div {
|
||||
max-width: 2.8rem;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
display: -webkit-box;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-line-clamp: 1;
|
||||
// overflow: hidden;
|
||||
// text-overflow: ellipsis;
|
||||
// display: -webkit-box;
|
||||
// -webkit-box-orient: vertical;
|
||||
// -webkit-line-clamp: 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -225,5 +234,5 @@ watch(
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -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 +
|
||||
|
|
|
@ -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, //关灯模式
|
||||
|
|
Loading…
Reference in New Issue