This commit is contained in:
guoyue 2022-07-28 10:19:01 +08:00
commit 20de75e0dd
45 changed files with 2309 additions and 973 deletions

View File

@ -34,6 +34,7 @@
"lodash": "^4.17.19", "lodash": "^4.17.19",
"monaco-editor": "^0.20.0", "monaco-editor": "^0.20.0",
"monaco-editor-webpack-plugin": "^1.9.0", "monaco-editor-webpack-plugin": "^1.9.0",
"pinyin-pro": "^3.11.0",
"qs": "^6.9.4", "qs": "^6.9.4",
"quill": "^1.3.7", "quill": "^1.3.7",
"sass": "^1.51.0", "sass": "^1.51.0",

View File

@ -1,8 +1,8 @@
<!-- <!--
* @Author: hisense.wuhongjian * @Author: hisense.wuhongjian
* @Date: 2022-04-11 10:11:40 * @Date: 2022-04-11 10:11:40
* @LastEditors: hisense.liangjunhua * @LastEditors: hisense.wuhongjian
* @LastEditTime: 2022-07-21 15:03:51 * @LastEditTime: 2022-07-26 20:23:13
* @Description: 告诉大家这是什么 * @Description: 告诉大家这是什么
--> -->
<!DOCTYPE html> <!DOCTYPE html>
@ -27,7 +27,8 @@
'isTab': true, // 是否通过tab展示内容? 'isTab': true, // 是否通过tab展示内容?
'iframeURL': '' // 是否通过iframe嵌套展示内容? (以http[s]://开头, 自动匹配) 'iframeURL': '' // 是否通过iframe嵌套展示内容? (以http[s]://开头, 自动匹配)
}; };
window.SITE_CONFIG['frontUrl'] = 'http://15.2.21.243:9796/#/vueTemplateDemo'; window.SITE_CONFIG['frontUrl'] = 'http://localhost:8080/#/vueTemplateDemo';
// window.SITE_CONFIG['frontUrl'] = 'http://15.2.21.243:9796/#/vueTemplateDemo';
// window.SITE_CONFIG['frontUrl'] = 'http://124.222.94.39:9796/#/vueTemplateDemo'; // window.SITE_CONFIG['frontUrl'] = 'http://124.222.94.39:9796/#/vueTemplateDemo';
// window.SITE_CONFIG['frontUrl'] = 'http://15.72.183.90:7008/#/vueTemplateDemo'; // window.SITE_CONFIG['frontUrl'] = 'http://15.72.183.90:7008/#/vueTemplateDemo';
// window.SITE_CONFIG['frontUrl'] = 'http://10.134.135.9:9797/#/vueTemplateDemo'; // window.SITE_CONFIG['frontUrl'] = 'http://10.134.135.9:9797/#/vueTemplateDemo';
@ -45,7 +46,7 @@
// window.SITE_CONFIG['apiURL'] = 'http://124.222.94.39:8888/renren-admin'; // window.SITE_CONFIG['apiURL'] = 'http://124.222.94.39:8888/renren-admin';
// window.SITE_CONFIG['apiURL'] = 'http://10.16.5.35:8888/renren-admin'; // window.SITE_CONFIG['apiURL'] = 'http://10.16.5.35:8888/renren-admin';
window.SITE_CONFIG['apiURL'] = 'http://15.2.21.236:8888/renren-admin'; window.SITE_CONFIG['apiURL'] = 'http://15.2.21.236:8888/renren-admin';
window.SITE_CONFIG['previewUrl'] = 'http://15.2.21.236:9796/'; window.SITE_CONFIG['previewUrl'] = 'http://localhost:8080/';
// window.SITE_CONFIG['apiURL'] = 'http://15.2.23.141:8000/renren-admin'; // window.SITE_CONFIG['apiURL'] = 'http://15.2.23.141:8000/renren-admin';
// WebSocket地址 // WebSocket地址
window.SITE_CONFIG['socketURL'] ='ws://localhost:8080/renren-admin/websocket'; window.SITE_CONFIG['socketURL'] ='ws://localhost:8080/renren-admin/websocket';

View File

@ -100,25 +100,25 @@
</nav> </nav>
</template> </template>
<script> <script>
import { messages } from "@/i18n"; import { messages } from '@/i18n'
import screenfull from "screenfull"; import screenfull from 'screenfull'
import UpdatePassword from "./main-navbar-update-password"; import UpdatePassword from './main-navbar-update-password'
import { clearLoginInfo } from "@/utils"; import { clearLoginInfo } from '@/utils'
// import Cookies from 'js-cookie' // import Cookies from 'js-cookie'
// var socket = null // var socket = null
export default { export default {
inject: ["refresh"], inject: ['refresh'],
data() { data () {
return { return {
i18nMessages: messages, i18nMessages: messages,
updatePasswordVisible: false, updatePasswordVisible: false,
messageTip: false, messageTip: false
}; }
}, },
components: { components: {
UpdatePassword, UpdatePassword
}, },
created() { created () {
// var vue = this // var vue = this
// socket = new WebSocket(`${window.SITE_CONFIG['socketURL']}?token=${Cookies.get('token')}`) // socket = new WebSocket(`${window.SITE_CONFIG['socketURL']}?token=${Cookies.get('token')}`)
// socket.onopen = function () {} // socket.onopen = function () {}
@ -144,70 +144,70 @@ export default {
// } // }
// //
this.getUnReadCount(); this.getUnReadCount()
}, },
methods: { methods: {
myNoticeRouter() { myNoticeRouter () {
this.$router.replace("notice-notice-user"); this.$router.replace('notice-notice-user')
}, },
getUnReadCount() { getUnReadCount () {
this.$http this.$http
.get("/sys/notice/mynotice/unread") .get('/sys/notice/mynotice/unread')
.then(({ data: res }) => { .then(({ data: res }) => {
if (res.code !== 0) { if (res.code !== 0) {
return this.$message.error(res.msg); return this.$message.error(res.msg)
} }
if (res.data > 0) { if (res.data > 0) {
this.messageTip = true; this.messageTip = true
} }
}) })
.catch(() => {}); .catch(() => {})
}, },
// //
fullscreenHandle() { fullscreenHandle () {
if (!screenfull.enabled) { if (!screenfull.enabled) {
return this.$message({ return this.$message({
message: this.$t("fullscreen.prompt"), message: this.$t('fullscreen.prompt'),
type: "warning", type: 'warning',
duration: 500, duration: 500
}); })
} }
screenfull.toggle(); screenfull.toggle()
}, },
// //
updatePasswordHandle() { updatePasswordHandle () {
this.updatePasswordVisible = true; this.updatePasswordVisible = true
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.updatePassword.init(); this.$refs.updatePassword.init()
}); })
}, },
// 退 // 退
logoutHandle() { logoutHandle () {
this.$confirm( this.$confirm(
this.$t("prompt.info", { handle: this.$t("logout") }), this.$t('prompt.info', { handle: this.$t('logout') }),
this.$t("prompt.title"), this.$t('prompt.title'),
{ {
confirmButtonText: this.$t("confirm"), confirmButtonText: this.$t('confirm'),
cancelButtonText: this.$t("cancel"), cancelButtonText: this.$t('cancel'),
type: "warning", type: 'warning'
} }
) )
.then(() => { .then(() => {
this.$http this.$http
.post("/logout") .post('/logout')
.then(({ data: res }) => { .then(({ data: res }) => {
if (res.code !== 0) { if (res.code !== 0) {
return this.$message.error(res.msg); return this.$message.error(res.msg)
} }
clearLoginInfo(); clearLoginInfo()
this.$router.push({ name: "login" }); this.$router.push({ name: 'login' })
}) })
.catch(() => {}); .catch(() => {})
}) })
.catch(() => {}); .catch(() => {})
}, }
}, }
}; }
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
@font-face { @font-face {

View File

@ -16,122 +16,122 @@
</template> </template>
<script> <script>
import MainNavbar from "./main-navbar"; import MainNavbar from './main-navbar'
import MainSidebar from "./main-sidebar"; import MainSidebar from './main-sidebar'
import MainContent from "./main-content"; import MainContent from './main-content'
import MainThemeTools from "./main-theme-tools"; import MainThemeTools from './main-theme-tools'
import debounce from "lodash/debounce"; import debounce from 'lodash/debounce'
import { isURL } from "@/utils/validate"; import { isURL } from '@/utils/validate'
export default { export default {
provide() { provide () {
return { return {
// //
refresh() { refresh () {
this.$store.state.contentIsNeedRefresh = true; this.$store.state.contentIsNeedRefresh = true
this.$nextTick(() => { this.$nextTick(() => {
this.$store.state.contentIsNeedRefresh = false; this.$store.state.contentIsNeedRefresh = false
}); })
}, }
}; }
}, },
data() { data () {
return { return {
loading: true, loading: true
}; }
}, },
components: { components: {
MainNavbar, MainNavbar,
MainSidebar, MainSidebar,
MainContent, MainContent,
MainThemeTools, MainThemeTools
}, },
watch: { watch: {
$route: "routeHandle", $route: 'routeHandle'
}, },
created() { created () {
this.windowResizeHandle(); this.windowResizeHandle()
this.routeHandle(this.$route); this.routeHandle(this.$route)
Promise.all([this.getUserInfo(), this.getPermissions()]).then(() => { Promise.all([this.getUserInfo(), this.getPermissions()]).then(() => {
this.loading = false; this.loading = false
}); })
}, },
methods: { methods: {
// //
windowResizeHandle() { windowResizeHandle () {
this.$store.state.sidebarFold = this.$store.state.sidebarFold =
document.documentElement["clientWidth"] <= 992 || false; document.documentElement.clientWidth <= 992 || false
window.addEventListener( window.addEventListener(
"resize", 'resize',
debounce(() => { debounce(() => {
this.$store.state.sidebarFold = this.$store.state.sidebarFold =
document.documentElement["clientWidth"] <= 992 || false; document.documentElement.clientWidth <= 992 || false
}, 150) }, 150)
); )
}, },
// , // ,
routeHandle(route) { routeHandle (route) {
if (!route.meta.isTab) { if (!route.meta.isTab) {
return false; return false
} }
let tab = {}; let tab = {}
let routeName = route.name; let routeName = route.name
let routeMeta = route.meta; const routeMeta = route.meta
if (route.name === "iframe") { if (route.name === 'iframe') {
let url = route.query.url || ""; const url = route.query.url || ''
if (!isURL(url)) { if (!isURL(url)) {
return false; return false
} }
let key = route.query.key || new Date().getTime(); const key = route.query.key || new Date().getTime()
routeName = `${routeName}_${key}`; routeName = `${routeName}_${key}`
routeMeta.title = key.toString(); routeMeta.title = key.toString()
routeMeta.menuId = route.query.menuId || ""; routeMeta.menuId = route.query.menuId || ''
routeMeta.iframeURL = url; routeMeta.iframeURL = url
} }
tab = this.$store.state.contentTabs.filter( tab = this.$store.state.contentTabs.filter(
(item) => item.name === routeName (item) => item.name === routeName
)[0]; )[0]
if (!tab) { if (!tab) {
tab = { tab = {
...window.SITE_CONFIG["contentTabDefault"], ...window.SITE_CONFIG.contentTabDefault,
...routeMeta, ...routeMeta,
name: routeName, name: routeName,
params: { ...route.params }, params: { ...route.params },
query: { ...route.query }, query: { ...route.query }
}; }
this.$store.state.contentTabs = this.$store.state.contentTabs =
this.$store.state.contentTabs.concat(tab); this.$store.state.contentTabs.concat(tab)
} }
this.$store.state.sidebarMenuActiveName = tab.menuId; this.$store.state.sidebarMenuActiveName = tab.menuId
this.$store.state.contentTabsActiveName = tab.name; this.$store.state.contentTabsActiveName = tab.name
}, },
// //
getUserInfo() { getUserInfo () {
return this.$http return this.$http
.get("/sys/user/info") .get('/sys/user/info')
.then(({ data: res }) => { .then(({ data: res }) => {
if (res.code !== 0) { if (res.code !== 0) {
return this.$message.error(res.msg); return this.$message.error(res.msg)
} }
this.$store.state.user.id = res.data.id; this.$store.state.user.id = res.data.id
this.$store.state.user.name = res.data.username; this.$store.state.user.name = res.data.realName
this.$store.state.user.superAdmin = res.data.superAdmin; this.$store.state.user.superAdmin = res.data.superAdmin
}) })
.catch(() => {}); .catch(() => {})
}, },
// //
getPermissions() { getPermissions () {
return this.$http return this.$http
.get("/sys/menu/permissions") .get('/sys/menu/permissions')
.then(({ data: res }) => { .then(({ data: res }) => {
if (res.code !== 0) { if (res.code !== 0) {
return this.$message.error(res.msg); return this.$message.error(res.msg)
} }
window.SITE_CONFIG["permissions"] = res.data; window.SITE_CONFIG.permissions = res.data
}) })
.catch(() => {}); .catch(() => {})
}, }
}, }
}; }
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.aui-content__wrapper { .aui-content__wrapper {

View File

@ -50,7 +50,7 @@
border border
@selection-change="dataListSelectionChangeHandle" @selection-change="dataListSelectionChangeHandle"
style="width: 100%" style="width: 100%"
:height="qp ? '650px' : '650px'" height="650px"
> >
<el-table-column <el-table-column
type="selection" type="selection"
@ -126,7 +126,7 @@
fixed="right" fixed="right"
header-align="center" header-align="center"
align="center" align="center"
width="300" width="150"
> >
<template slot-scope="scope"> <template slot-scope="scope">
<!-- <el-button <!-- <el-button
@ -241,6 +241,7 @@ import mixinViewModule from '@/mixins/view-module'
import AddOrUpdate from './bsabilityai-add-or-update' import AddOrUpdate from './bsabilityai-add-or-update'
import dictionaries from '@/utils/dictionaries' import dictionaries from '@/utils/dictionaries'
import qs from 'qs' import qs from 'qs'
import { pinyin } from 'pinyin-pro'
import RelateApplication from './bsabilityai-relate-application.vue' import RelateApplication from './bsabilityai-relate-application.vue'
import putOnTheShelf from '@/views/modules/putOnTheShelf' import putOnTheShelf from '@/views/modules/putOnTheShelf'
export default { export default {
@ -284,7 +285,7 @@ export default {
selectType: 0, selectType: 0,
type: '组件服务' type: '组件服务'
}, },
qp: false, // qp: false,
// //
relateApplicationVisible: false, relateApplicationVisible: false,
relateInfo: { relateInfo: {
@ -292,7 +293,10 @@ export default {
responseData: {}, responseData: {},
linkType: '' linkType: ''
}, },
typeInput: '组件服务' typeInput: '组件服务',
uuidOne: '',
uuidTwo: '',
uuidSnum: ''
} }
}, },
watch: {}, watch: {},
@ -306,8 +310,8 @@ export default {
this.dataForm.type = '组件服务' this.dataForm.type = '组件服务'
}, },
mounted () { mounted () {
window.addEventListener('resize', this.a) // window.addEventListener('resize', this.a)
this.fullScreen() // this.fullScreen()
}, },
methods: { methods: {
reset () { reset () {
@ -384,11 +388,89 @@ export default {
// }) // })
// this.disabled = true // this.disabled = true
}, },
// uuid
uuid (len, radix) {
var chars =
'0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'
var uuid = []
var i
radix = radix || chars.length
if (len) {
// Compact form
for (i = 0; i < len; i++) uuid[i] = chars[0 | (Math.random() * radix)]
} else {
// rfc4122, version 4 form
var r
// rfc4122 requires these characters
uuid[8] = uuid[13] = uuid[18] = uuid[23] = '-'
uuid[14] = '4'
// Fill in random data. At i==19 set the high bits of clock sequence as
// per rfc4122, sec. 4.1.5
for (i = 0; i < 36; i++) {
if (!uuid[i]) {
r = 0 | (Math.random() * 16)
uuid[i] = chars[i == 19 ? (r & 0x3) | 0x8 : r]
}
}
}
return uuid.join('')
},
uuidSplice () {
this.uuidOne = this.uuid(13, 16)
this.uuidTwo = this.uuid(13, 16)
this.uuidSnum = this.uuidOne + this.uuidTwo
this.uuidSnum = this.uuidSnum.replace(/\s+/g, '')
console.log('this.uuidOne', this.uuidSnum)
},
showDocument (val) { showDocument (val) {
window.open( //
window.SITE_CONFIG.frontUrl + '?id=' + val.id + '&&type=' + val.type, //
'_blank' this.uuidSplice()
) const uuidParam = val.infoList.filter((item) => {
if (item.attrType === '技术文档') {
return item
}
})
if (uuidParam.length > 0) {
this.uuidSnum = uuidParam[0].attrValue.split('/')[1].split('.')[0]
} else {
const type = pinyin(val.type, {
pattern: 'initial'
}).replace(/\s*/g, '')
const obj = {
attrType: '技术文档',
attrValue: type + '/' + this.uuidSnum + '.md',
delFlag: 0
}
val.infoList.push(obj)
}
//
this.$http
.put('/resource/update', val)
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg)
}
this.$message({
message: this.$t('prompt.success'),
type: 'success',
duration: 500,
onClose: () => {
//
window.open(
window.SITE_CONFIG.frontUrl + '?id=' + this.uuidSnum + '&&type=' + val.type,
'_blank'
)
}
})
})
.catch(() => {})
// update
}, },
getDataList2 (names) { getDataList2 (names) {
if (names != null) { if (names != null) {
@ -448,17 +530,17 @@ export default {
this.$message.error('查询信息不能为空') this.$message.error('查询信息不能为空')
} }
}, },
fullScreen () { // fullScreen () {
if (window.outerHeight === screen.availHeight) { // if (window.outerHeight === screen.availHeight) {
if (window.outerWidth === screen.availWidth) { // if (window.outerWidth === screen.availWidth) {
this.qp = false // this.qp = false
} else { // } else {
this.qp = true // this.qp = true
} // }
} else { // } else {
this.qp = true // this.qp = true
} // }
}, // },
// //
showRelateApplication (row) { showRelateApplication (row) {
this.$http this.$http

View File

@ -52,7 +52,7 @@
border border
@selection-change="dataListSelectionChangeHandle" @selection-change="dataListSelectionChangeHandle"
style="width: 100%" style="width: 100%"
:height="qp ? '810px' : '650px'" height="650px"
> >
<el-table-column <el-table-column
type="selection" type="selection"
@ -287,8 +287,8 @@ export default {
this.dataForm.type = '应用资源' this.dataForm.type = '应用资源'
}, },
mounted () { mounted () {
window.addEventListener('resize', this.a) // window.addEventListener('resize', this.a)
this.fullScreen() // this.fullScreen()
}, },
methods: { methods: {
reset () { reset () {
@ -425,38 +425,38 @@ export default {
this.$message.error('查询不能输入为空') this.$message.error('查询不能输入为空')
} }
}, },
fullScreen () { // fullScreen () {
if (window.outerHeight === screen.availHeight) { // if (window.outerHeight === screen.availHeight) {
if (window.outerWidth === screen.availWidth) { // if (window.outerWidth === screen.availWidth) {
console.log( // console.log(
'全屏1', // '1',
window.outerHeight, // window.outerHeight,
screen.availHeight, // screen.availHeight,
window.outerWidth, // window.outerWidth,
screen.availWidth // screen.availWidth
) // )
this.qp = false // this.qp = false
} else { // } else {
console.log( // console.log(
'不是全屏2', // '2',
window.outerHeight, // window.outerHeight,
screen.availHeight, // screen.availHeight,
window.outerWidth, // window.outerWidth,
screen.availWidth // screen.availWidth
) // )
this.qp = true // this.qp = true
} // }
} else { // } else {
console.log( // console.log(
'不是全屏3', // '3',
window.outerHeight, // window.outerHeight,
screen.availHeight, // screen.availHeight,
window.outerWidth, // window.outerWidth,
screen.availWidth // screen.availWidth
) // )
this.qp = true // this.qp = true
} // }
}, // },
// //
applyAndAssembly (val) { applyAndAssembly (val) {
console.log('vvvv', val) console.log('vvvv', val)

View File

@ -104,12 +104,12 @@
@click="taskHandle(scope.row)" @click="taskHandle(scope.row)"
>{{ $t('manage') }}</el-button >{{ $t('manage') }}</el-button
> >
<el-button <!-- <el-button
type="text" type="text"
size="small" size="small"
@click="taskDetail(scope.row)" @click="taskDetail(scope.row)"
>{{ $t('process.viewFlowImage') }}</el-button >{{ $t('process.viewFlowImage') }}</el-button
> > -->
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>

View File

@ -104,12 +104,12 @@
@click="taskHandle(scope.row)" @click="taskHandle(scope.row)"
>{{ $t('manage') }}</el-button >{{ $t('manage') }}</el-button
> >
<el-button <!-- <el-button
type="text" type="text"
size="small" size="small"
@click="taskDetail(scope.row)" @click="taskDetail(scope.row)"
>{{ $t('process.viewFlowImage') }}</el-button >{{ $t('process.viewFlowImage') }}</el-button
> > -->
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>

View File

@ -104,12 +104,12 @@
@click="taskHandle(scope.row)" @click="taskHandle(scope.row)"
>{{ $t('manage') }}</el-button >{{ $t('manage') }}</el-button
> >
<el-button <!-- <el-button
type="text" type="text"
size="small" size="small"
@click="taskDetail(scope.row)" @click="taskDetail(scope.row)"
>{{ $t('process.viewFlowImage') }}</el-button >{{ $t('process.viewFlowImage') }}</el-button
> > -->
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>

View File

@ -104,12 +104,12 @@
@click="taskHandle(scope.row)" @click="taskHandle(scope.row)"
>{{ $t('manage') }}</el-button >{{ $t('manage') }}</el-button
> >
<el-button <!-- <el-button
type="text" type="text"
size="small" size="small"
@click="taskDetail(scope.row)" @click="taskDetail(scope.row)"
>{{ $t('process.viewFlowImage') }}</el-button >{{ $t('process.viewFlowImage') }}</el-button
> > -->
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>

View File

@ -21,6 +21,7 @@
:label=" :label="
itemsonson.type != ' multipleAdditions' ? itemsonson.name : '' itemsonson.type != ' multipleAdditions' ? itemsonson.name : ''
" "
v-show="!(itemsonson.name==='平台地址'|| itemsonson.name==='SDK安装包' || itemsonson.name==='接口请求方式' || itemsonson.name==='服务接口')"
> >
<div <div
class="videoAndImgCss" class="videoAndImgCss"
@ -57,12 +58,25 @@
<!-- <div>{{ multipleAdditionsItem }}</div> --> <!-- <div>{{ multipleAdditionsItem }}</div> -->
</div> </div>
</div> </div>
<el-input <el-input
v-else v-else
v-model="itemsonson.note1" v-model="itemsonson.note1"
disabled="disabled" disabled="disabled"
></el-input> ></el-input>
</el-form-item> </el-form-item>
<el-form-item
v-for="itemsonson in itemson.children"
:key="itemsonson.name"
:label="
itemsonson.type != ' multipleAdditions' ? itemsonson.name : ''
"
v-show="((itemsonson.name==='平台地址'&&showDocking)|| (itemsonson.name==='SDK安装包'&&showSDK) || (itemsonson.name==='接口请求方式'&&showInterface) || (itemsonson.name==='服务接口'&&showInterface))"
>
<el-input
v-model="itemsonson.note1"
disabled="disabled"
></el-input>
</el-form-item>
</div> </div>
<div v-else-if="itemson.name === '算法优势'"> <div v-else-if="itemson.name === '算法优势'">
<div <div
@ -153,7 +167,13 @@ export default {
dataList: [], dataList: [],
dataView: [], dataView: [],
// //
unit: '' unit: '',
//
showDocking: false,
// SDK
showSDK: false,
//
showInterface: false
} }
}, },
watch: { watch: {
@ -322,6 +342,26 @@ export default {
this.dataForm, this.dataForm,
this.dataView this.dataView
) )
// -使-3
this.dataView.children.map(val => {
if (val.name === '部署与使用') {
val.children.map(val => {
if (val.name === '使用方式') {
val.children.map(val => {
if (val.name === '使用方式') {
if (val.note1 === 'SDK') {
this.showSDK = true
} else if (val.note1 === '平台对接') {
this.showDocking = true
} else if (val.note1 === '调用接口') {
this.showInterface = true
}
}
})
}
})
}
})
} }
} }
} }

View File

@ -2,7 +2,7 @@
* @Author: hisense.wuhongjian * @Author: hisense.wuhongjian
* @Date: 2022-03-29 16:45:25 * @Date: 2022-03-29 16:45:25
* @LastEditors: hisense.liangjunhua * @LastEditors: hisense.liangjunhua
* @LastEditTime: 2022-07-22 18:42:44 * @LastEditTime: 2022-07-26 16:23:53
* @Description: 告诉大家这是什么 * @Description: 告诉大家这是什么
--> -->
<!DOCTYPE html> <!DOCTYPE html>
@ -107,7 +107,8 @@
<script type="text/javascript" src="./leaflet/MarkerClusterer_min.js"></script> <script type="text/javascript" src="./leaflet/MarkerClusterer_min.js"></script>
<!-- 热力图 --> <!-- 热力图 -->
<script type="text/javascript" src="./leaflet/leaflet-heat.js"></script> <script type="text/javascript" src="./leaflet/leaflet-heat.js"></script>
<!-- 加载WMTS服务 -->
<script type="text/javascript" src="./leaflet/leaflet-tilelayer-wmts.js"></script>
<!-- 大华平台相关包 --> <!-- 大华平台相关包 -->
<script type="text/javascript" src="./static/js/encrypt.js"></script> <script type="text/javascript" src="./static/js/encrypt.js"></script>
<script type="text/javascript" src="./static/js/DHWs.js"></script> <script type="text/javascript" src="./static/js/DHWs.js"></script>

View File

@ -0,0 +1,80 @@
/*
* @Author: hisense.wuhongjian
* @Date: 2022-07-25 17:13:49
* @LastEditors: hisense.wuhongjian
* @LastEditTime: 2022-07-26 10:23:40
* @Description: 告诉大家这是什么
*/
;(L.TileLayer.WMTS = L.TileLayer.extend({
defaultWmtsParams: {
service: 'WMTS',
request: 'GetTile',
version: '1.0.0',
layer: '',
style: '',
tilematrixset: '',
format: 'image/jpeg',
},
initialize: function (a, b) {
this._url = a
var c = {},
d = Object.keys(b)
d.forEach((a) => {
c[a.toLowerCase()] = b[a]
})
var e = L.extend({}, this.defaultWmtsParams),
f = c.tileSize || this.options.tileSize
for (var g in ((e.width =
c.detectRetina && L.Browser.retina ? (e.height = 2 * f) : (e.height = f)),
c))
e.hasOwnProperty(g) && 'matrixIds' != g && (e[g] = c[g])
;(this.wmtsParams = e),
(this.matrixIds = b.matrixIds || this.getDefaultMatrix()),
L.setOptions(this, b)
},
onAdd: function (a) {
;(this._crs = this.options.crs || a.options.crs),
L.TileLayer.prototype.onAdd.call(this, a)
},
getTileUrl: function (a) {
var b = this.options.tileSize,
c = a.multiplyBy(b)
;(c.x += 1), (c.y -= 1)
var d = c.add(new L.Point(b, b)),
e = this._tileZoom,
f = this._crs.project(this._map.unproject(c, e)),
g = this._crs.project(this._map.unproject(d, e))
tilewidth = g.x - f.x
var h = this.matrixIds[e].identifier,
i = h,
j = this.matrixIds[e].topLeftCorner.lng,
k = this.matrixIds[e].topLeftCorner.lat,
l = Math.floor((f.x - j) / tilewidth),
m = -Math.floor((f.y - k) / tilewidth),
n = L.Util.template(this._url, { s: this._getSubdomain(a) })
return (
n +
L.Util.getParamString(this.wmtsParams, n) +
'&tilematrix=' +
i +
'&tilerow=' +
m +
'&tilecol=' +
l
)
},
setParams: function (a, b) {
return L.extend(this.wmtsParams, a), b || this.redraw(), this
},
getDefaultMatrix: function () {
for (var a = Array(22), b = 0; 22 > b; b++)
a[b] = {
identifier: '' + b,
topLeftCorner: new L.LatLng(20037508.3428, -20037508.3428),
}
return a
},
})),
(L.tileLayer.wmts = function (a, b) {
return new L.TileLayer.WMTS(a, b)
})

View File

@ -2,7 +2,7 @@
* @Author: hisense.wuhongjian * @Author: hisense.wuhongjian
* @Date: 2020-07-07 16:03:23 * @Date: 2020-07-07 16:03:23
* @LastEditors: hisense.liangjunhua * @LastEditors: hisense.liangjunhua
* @LastEditTime: 2022-07-18 15:07:32 * @LastEditTime: 2022-07-28 09:36:58
* @Description: 数据资源参数配置 * @Description: 数据资源参数配置
*/ */
const newLocation = 'qingdao' const newLocation = 'qingdao'
@ -31,7 +31,7 @@ if (newLocation === 'qingdao') {
{ name: '能力云图', key: 'capabilityCloud' }, { name: '能力云图', key: 'capabilityCloud' },
{ name: '能力统计', key: 'abilityStatistics' }, { name: '能力统计', key: 'abilityStatistics' },
// { name: '', key: 'developmentGuide' }, // { name: '', key: 'developmentGuide' },
{ name: '指导手册', key: 'instructionManual' }, { name: '技术文档', key: 'instructionManual' },
{ name: '需求中心', key: 'demandCenter' }, { name: '需求中心', key: 'demandCenter' },
// { name: '', key: 'personalCenter' }, // { name: '', key: 'personalCenter' },
{ name: '区市站点', key: 'mapTest' }, { name: '区市站点', key: 'mapTest' },

View File

@ -2,78 +2,31 @@
* @Author: hisense.wuhongjian * @Author: hisense.wuhongjian
* @Date: 2020-07-07 16:03:23 * @Date: 2020-07-07 16:03:23
* @LastEditors: hisense.wuhongjian * @LastEditors: hisense.wuhongjian
* @LastEditTime: 2021-12-07 13:33:55 * @LastEditTime: 2022-07-26 14:34:24
* @Description: 地图静态参数配置 * @Description: 地图静态参数配置
*/ */
var _mapConfig = {}; var _mapConfig = {}
(function () { ;(function () {
var L = window.L || {}; var L = window.L || {}
// // // //
// ********************************************** // **********************************************
var CONFIGKEY = 'qingdao_highgo'; var CONFIGKEY = 'qingdao'
// var CONFIGKEY = 'dev'; // var CONFIGKEY = 'dev';
// *********************************************** // ***********************************************
var BASECONFIGITEM = { var BASECONFIGITEM = {
'qingdao': { qingdao: {
DATABASE_TYPE: 'Highgo', base: 'xihaian',
POI_TYPE: 'Supermap', // POI 'Supermap''Amap''Survey_Institute'
ISERVER_URL: '15.2.21.238:8090',
WORKPLACE_NAME: 'weifang',
MAP_NAME: 'weifang',
DATASOURCE_NAME: 'himap_wf',
ATMOSPHERE_URL: 'http://15.2.21.151:9015/service-main',
BDMAP_CONFIG: {
location: 'qingdao',
_initpos: {
point: [120.392795, 36.072854],
zoom: 11
},
_keyframes: [
[119.165174, 36.718389],
[119.186697, 36.723567],
[119.16803, 36.713863]
]
},
CURRENT_MAP_OPTIONS: { CURRENT_MAP_OPTIONS: {
center: [36.076209, 120.349632], // crs: CRS_4490,
maxZoom: 17, center: [36.17, 120.13],
minZoom: 7, maxZoom: 18,
zoom: 12, minZoom: 0,
zoom: 10,
}, },
TILEDTYPE: 'H_zxy', // 'Sci' ZXY'S_zxy' ZXY 'H_zxy'
TILEDCONFIG: {
digitalMap: {
tiledUrl: 'http://15.2.21.238:9889/{z}/{x}/{y}.png',
tiledName: '电子地图',
tiledIconURI: '',
options: {
center: [36.71, 119.16205],
zoom: 11,
minZoom:10,
maxZoom: 15
}
},
satelliteMap: {
tiledUrl: 'http://15.2.21.238:9888/{z}/{x}/{y}.png',
tiledName: '卫星地图',
tiledIconURI: '',
options: {
center: [36.71, 119.19],
zoom: 13,
minZoom: 5,
maxZoom: 15
}
}
},
MAPTYPE: 'digitalMap', //
TILEDMODE: 'bd', //
TITLE_LAYER: { mapUrl: 'http://10.16.3.2:8090/iserver/services/map-ShanDong/rest/maps/shandong', type: 'tiled', name: '矢量', icon: 'vector_map.png' },
TITLE_LAYER_REMOTE: { mapUrl: 'http://10.16.3.2:8090/iserver/services/map-ShanDong/rest/maps/shandong', type: 'remote', name: '影像', icon: 'satellite_map.png' },
TITLE_LAYER_DARK: { mapUrl: 'http://10.16.3.2:8090/iserver/services/map-ShanDong/rest/maps/shandong', type: 'dark', name: '其他', icon: 'other_map.png' },
}, },
'qingdao_highgo': { qingdao_highgo: {
DATABASE_TYPE: 'Highgo', DATABASE_TYPE: 'Highgo',
POI_TYPE: 'Supermap', // POI 'Supermap''Amap''Survey_Institute' POI_TYPE: 'Supermap', // POI 'Supermap''Amap''Survey_Institute'
ISERVER_URL: '15.2.21.238:8090', ISERVER_URL: '15.2.21.238:8090',
@ -92,23 +45,41 @@ var _mapConfig = {};
location: 'qingdao', location: 'qingdao',
_initpos: { _initpos: {
point: [120.392795, 36.072854], point: [120.392795, 36.072854],
zoom: 2 zoom: 2,
}, },
_keyframes: [ _keyframes: [
[121.6011191295479, 36.73422934263509], [121.6011191295479, 36.73422934263509],
[119.83371870221472, 36.082854], [119.83371870221472, 36.082854],
[120.25937000453506, 36.34563716789656] [120.25937000453506, 36.34563716789656],
] ],
}, },
MAP_VENDOR: 'Supermap', // Supermap bdmap 3dbdmap MAP_VENDOR: 'Supermap', // Supermap bdmap 3dbdmap
TITLE_LAYER: { mapUrl: 'http://15.72.177.174:8195/portalproxy/TileServer/arcgis/rest/services/normal2021/MapServer?key=iOgQotfgfyLvhj6WgfDTpq7F', type: 'tiled', name: '矢量', icon: 'vector_map.png' }, TITLE_LAYER: {
TITLE_LAYER_REMOTE: { mapUrl: 'http://q3d.qd.gov.cn:8195/portalproxy/vw6bffpy/TileServer/arcgis/rest/services/normal_2021_4490Arcgis/MapServer?key=iOgQotfgfyLvhj6WgfDTpq7F', type: 'tiled', name: '矢量', icon: 'vector_map.png' }, mapUrl:
'http://15.72.177.174:8195/portalproxy/TileServer/arcgis/rest/services/normal2021/MapServer?key=iOgQotfgfyLvhj6WgfDTpq7F',
type: 'tiled',
name: '矢量',
icon: 'vector_map.png',
},
TITLE_LAYER_REMOTE: {
mapUrl:
'http://q3d.qd.gov.cn:8195/portalproxy/vw6bffpy/TileServer/arcgis/rest/services/normal_2021_4490Arcgis/MapServer?key=iOgQotfgfyLvhj6WgfDTpq7F',
type: 'tiled',
name: '矢量',
icon: 'vector_map.png',
},
// TITLE_LAYER_REMOTE: { mapUrl: 'http://15.72.177.174:8195/portalproxy/TileServer/arcgis/rest/services/normal2021/MapServer?key=iOgQotfgfyLvhj6WgfDTpq7F', type: 'tiled', name: '', icon: 'vector_map.png' }, // TITLE_LAYER_REMOTE: { mapUrl: 'http://15.72.177.174:8195/portalproxy/TileServer/arcgis/rest/services/normal2021/MapServer?key=iOgQotfgfyLvhj6WgfDTpq7F', type: 'tiled', name: '', icon: 'vector_map.png' },
// TITLE_LAYER_REMOTE: { mapUrl: 'http://15.2.21.238:8090/iserver/services/map-ugcv5-QingdaoRemoteImageMap/rest/maps/QingdaoRemoteImageMap', type: 'remote', name: '', icon: 'satellite_map.png' }, // TITLE_LAYER_REMOTE: { mapUrl: 'http://15.2.21.238:8090/iserver/services/map-ugcv5-QingdaoRemoteImageMap/rest/maps/QingdaoRemoteImageMap', type: 'remote', name: '', icon: 'satellite_map.png' },
TITLE_LAYER_DARK: { mapUrl: 'http://15.2.21.238:8090/iserver/services/map-ugcv5-shandong/rest/maps/shandong', type: 'dark', name: '其他', icon: 'other_map.png' }, TITLE_LAYER_DARK: {
mapUrl:
'http://15.2.21.238:8090/iserver/services/map-ugcv5-shandong/rest/maps/shandong',
type: 'dark',
name: '其他',
icon: 'other_map.png',
},
}, },
// //
'dev': { dev: {
DATABASE_TYPE: 'Highgo', DATABASE_TYPE: 'Highgo',
POI_TYPE: 'Supermap', // POI 'Supermap''Amap''Survey_Institute' POI_TYPE: 'Supermap', // POI 'Supermap''Amap''Survey_Institute'
ISERVER_URL: '15.2.21.238:8090', ISERVER_URL: '15.2.21.238:8090',
@ -127,38 +98,94 @@ var _mapConfig = {};
location: 'qingdao', location: 'qingdao',
_initpos: { _initpos: {
point: [120.392795, 36.072854], point: [120.392795, 36.072854],
zoom: 2 zoom: 2,
}, },
_keyframes: [ _keyframes: [
[121.6011191295479, 36.73422934263509], [121.6011191295479, 36.73422934263509],
[119.83371870221472, 36.082854], [119.83371870221472, 36.082854],
[120.25937000453506, 36.34563716789656] [120.25937000453506, 36.34563716789656],
] ],
}, },
MAP_VENDOR: 'Supermap', // Supermap bdmap 3dbdmap MAP_VENDOR: 'Supermap', // Supermap bdmap 3dbdmap
TITLE_LAYER: { mapUrl: 'http://15.72.177.174:8195/portalproxy/TileServer/arcgis/rest/services/normal2021/MapServer?key=iOgQotfgfyLvhj6WgfDTpq7F', type: 'tiled', name: '矢量', icon: 'vector_map.png' }, TITLE_LAYER: {
TITLE_LAYER_REMOTE: { mapUrl: 'http://q3d.qd.gov.cn:8195/portalproxy/s9arfiqe/TileServer/arcgis/rest/services/normal2021_test/MapServer?key=p9PW1ipy9P3QHILzmsNOk8Gc', type: 'tiled', name: '矢量', icon: 'vector_map.png' }, mapUrl:
'http://15.72.177.174:8195/portalproxy/TileServer/arcgis/rest/services/normal2021/MapServer?key=iOgQotfgfyLvhj6WgfDTpq7F',
type: 'tiled',
name: '矢量',
icon: 'vector_map.png',
},
TITLE_LAYER_REMOTE: {
mapUrl:
'http://q3d.qd.gov.cn:8195/portalproxy/s9arfiqe/TileServer/arcgis/rest/services/normal2021_test/MapServer?key=p9PW1ipy9P3QHILzmsNOk8Gc',
type: 'tiled',
name: '矢量',
icon: 'vector_map.png',
},
// TITLE_LAYER_REMOTE: { mapUrl: 'http://15.72.177.174:8195/portalproxy/TileServer/arcgis/rest/services/normal2021/MapServer?key=iOgQotfgfyLvhj6WgfDTpq7F', type: 'tiled', name: '', icon: 'vector_map.png' }, // TITLE_LAYER_REMOTE: { mapUrl: 'http://15.72.177.174:8195/portalproxy/TileServer/arcgis/rest/services/normal2021/MapServer?key=iOgQotfgfyLvhj6WgfDTpq7F', type: 'tiled', name: '', icon: 'vector_map.png' },
// TITLE_LAYER_REMOTE: { mapUrl: 'http://15.2.21.238:8090/iserver/services/map-ugcv5-QingdaoRemoteImageMap/rest/maps/QingdaoRemoteImageMap', type: 'remote', name: '', icon: 'satellite_map.png' }, // TITLE_LAYER_REMOTE: { mapUrl: 'http://15.2.21.238:8090/iserver/services/map-ugcv5-QingdaoRemoteImageMap/rest/maps/QingdaoRemoteImageMap', type: 'remote', name: '', icon: 'satellite_map.png' },
TITLE_LAYER_DARK: { mapUrl: 'http://15.2.21.238:8090/iserver/services/map-ugcv5-shandong/rest/maps/shandong', type: 'dark', name: '其他', icon: 'other_map.png' }, TITLE_LAYER_DARK: {
mapUrl:
'http://15.2.21.238:8090/iserver/services/map-ugcv5-shandong/rest/maps/shandong',
type: 'dark',
name: '其他',
icon: 'other_map.png',
},
}, },
}; }
var MAPCONFIGMIXTRE = { var MAPCONFIGMIXTRE = {
CURRENT_SERVER_NAME: CONFIGKEY, CURRENT_SERVER_NAME: CONFIGKEY,
BUFFER_URL: 'http://' + BASECONFIGITEM[CONFIGKEY].ISERVER_URL + '/iserver/services/spatialAnalysis-' + BASECONFIGITEM[CONFIGKEY].WORKPLACE_NAME + '/restjsr/spatialanalyst', BUFFER_URL:
QUERY_URL: 'http://' + BASECONFIGITEM[CONFIGKEY].ISERVER_URL + '/iserver/services/map-HIMAP_HIGHGO/rest/maps/' + BASECONFIGITEM[CONFIGKEY].MAP_NAME, 'http://' +
BASECONFIGITEM[CONFIGKEY].ISERVER_URL +
'/iserver/services/spatialAnalysis-' +
BASECONFIGITEM[CONFIGKEY].WORKPLACE_NAME +
'/restjsr/spatialanalyst',
QUERY_URL:
'http://' +
BASECONFIGITEM[CONFIGKEY].ISERVER_URL +
'/iserver/services/map-HIMAP_HIGHGO/rest/maps/' +
BASECONFIGITEM[CONFIGKEY].MAP_NAME,
// QUERY_URL: 'http://' + BASECONFIGITEM[CONFIGKEY].ISERVER_URL + '/iserver/services/data-HIMAP_HIGHGO/rest/data/datasources/HISENSE_himap', // QUERY_URL: 'http://' + BASECONFIGITEM[CONFIGKEY].ISERVER_URL + '/iserver/services/data-HIMAP_HIGHGO/rest/data/datasources/HISENSE_himap',
DYNAMIC_ROAD_URL: 'http://' + BASECONFIGITEM[CONFIGKEY].ISERVER_URL + '/iserver/services/spatialAnalysis-' + BASECONFIGITEM[CONFIGKEY].WORKPLACE_NAME + '/restjsr/spatialanalyst', DYNAMIC_ROAD_URL:
DYNMIC_URL: 'http://' + BASECONFIGITEM[CONFIGKEY].ISERVER_URL + '/iserver/services/map-' + BASECONFIGITEM[CONFIGKEY].WORKPLACE_NAME + '/rest/maps/' + BASECONFIGITEM[CONFIGKEY].MAP_NAME, 'http://' +
BASECONFIGITEM[CONFIGKEY].ISERVER_URL +
'/iserver/services/spatialAnalysis-' +
BASECONFIGITEM[CONFIGKEY].WORKPLACE_NAME +
'/restjsr/spatialanalyst',
DYNMIC_URL:
'http://' +
BASECONFIGITEM[CONFIGKEY].ISERVER_URL +
'/iserver/services/map-' +
BASECONFIGITEM[CONFIGKEY].WORKPLACE_NAME +
'/rest/maps/' +
BASECONFIGITEM[CONFIGKEY].MAP_NAME,
// //
// NETWORK_URL: 'http://' + BASECONFIGITEM[CONFIGKEY].ISERVER_URL + '/iserver/services/transportationAnalyst-' + BASECONFIGITEM[CONFIGKEY].WORKPLACE_NAME + '/rest/networkanalyst/BuildNetwork_2@' + BASECONFIGITEM[CONFIGKEY].DATASOURCE_NAME, // NETWORK_URL: 'http://' + BASECONFIGITEM[CONFIGKEY].ISERVER_URL + '/iserver/services/transportationAnalyst-' + BASECONFIGITEM[CONFIGKEY].WORKPLACE_NAME + '/rest/networkanalyst/BuildNetwork_2@' + BASECONFIGITEM[CONFIGKEY].DATASOURCE_NAME,
// //
NETWORK_URL: 'http://' + BASECONFIGITEM[CONFIGKEY].ISERVER_URL + '/iserver/services/transportationAnalyst-road/rest/networkanalyst/BuildNetwork_2@road', NETWORK_URL:
PLOTTING_URL: 'http://' + BASECONFIGITEM[CONFIGKEY].ISERVER_URL + '/iserver/services/plot-JY/rest/plot/', 'http://' +
POI_URL: 'http://' + BASECONFIGITEM[CONFIGKEY].ISERVER_URL + '/iserver/services/addressmatch-qingdaoPOI181015/restjsr/v1/address', BASECONFIGITEM[CONFIGKEY].ISERVER_URL +
EDITORDATA_URL: 'http://' + BASECONFIGITEM[CONFIGKEY].ISERVER_URL + '/iserver/services/data-' + BASECONFIGITEM[CONFIGKEY].WORKPLACE_NAME + '/rest/data', '/iserver/services/transportationAnalyst-road/rest/networkanalyst/BuildNetwork_2@road',
PLOTTING_URL:
'http://' +
BASECONFIGITEM[CONFIGKEY].ISERVER_URL +
'/iserver/services/plot-JY/rest/plot/',
POI_URL:
'http://' +
BASECONFIGITEM[CONFIGKEY].ISERVER_URL +
'/iserver/services/addressmatch-qingdaoPOI181015/restjsr/v1/address',
EDITORDATA_URL:
'http://' +
BASECONFIGITEM[CONFIGKEY].ISERVER_URL +
'/iserver/services/data-' +
BASECONFIGITEM[CONFIGKEY].WORKPLACE_NAME +
'/rest/data',
ADDRESS_MATCH_URL: `http://${BASECONFIGITEM[CONFIGKEY].ISERVER_URL}/iserver/services/addressmatch-Address/restjsr/v1/address`, ADDRESS_MATCH_URL: `http://${BASECONFIGITEM[CONFIGKEY].ISERVER_URL}/iserver/services/addressmatch-Address/restjsr/v1/address`,
TITLE_LAYER_ARRAY: BASECONFIGITEM[CONFIGKEY].TITLE_LAYER_ARRAY || [BASECONFIGITEM[CONFIGKEY].TITLE_LAYER, BASECONFIGITEM[CONFIGKEY].TITLE_LAYER_REMOTE, BASECONFIGITEM[CONFIGKEY].TITLE_LAYER_DARK] TITLE_LAYER_ARRAY: BASECONFIGITEM[CONFIGKEY].TITLE_LAYER_ARRAY || [
}; BASECONFIGITEM[CONFIGKEY].TITLE_LAYER,
_mapConfig.config = Object.assign(BASECONFIGITEM[CONFIGKEY], MAPCONFIGMIXTRE); BASECONFIGITEM[CONFIGKEY].TITLE_LAYER_REMOTE,
})(); BASECONFIGITEM[CONFIGKEY].TITLE_LAYER_DARK,
],
}
_mapConfig.config = Object.assign(BASECONFIGITEM[CONFIGKEY], MAPCONFIGMIXTRE)
})()

View File

@ -2,7 +2,7 @@
* @Author: hisense.wuhongjian * @Author: hisense.wuhongjian
* @Date: 2022-05-06 11:12:00 * @Date: 2022-05-06 11:12:00
* @LastEditors: hisense.liangjunhua * @LastEditors: hisense.liangjunhua
* @LastEditTime: 2022-07-21 17:09:10 * @LastEditTime: 2022-07-26 11:27:50
* @Description: 告诉大家这是什么 * @Description: 告诉大家这是什么
--> -->
<template> <template>
@ -31,19 +31,28 @@
const locale = zhCN const locale = zhCN
const token = Cookies.get('ucsToken') const token = Cookies.get('ucsToken')
console.log('token=================>', token) console.log('token=================>', token)
var ws = new WebSocket( let ws = new WebSocket(
`ws://${window.SITE_CONFIG['websocketURL']}/websocket?token=${token}` `ws://${window.SITE_CONFIG['websocketURL']}/websocket?token=${token}`
) )
// ws.send() // ws.send()
// onmessage // onmessage
ws.onmessage = function (e) { ws.onmessage = function (e) {
console.log('服务器返回的信息: ' + e.data) console.log('WebSocket服务器返回的信息: ' + e.data)
mybus.emit('getMynotice') mybus.emit('getMynotice')
// //
if (router.currentRoute.value.name === 'mynoticeView') { if (router.currentRoute.value.name === 'mynoticeView') {
mybus.emit('noticeListInit') mybus.emit('noticeListInit')
} }
} }
ws.onerror = function (e) {
console.log('WebSocket连接异常============================>', e)
ws = new WebSocket(
`ws://${window.SITE_CONFIG['websocketURL']}/websocket?token=${token}`
)
}
ws.onclose = function (e) {
console.log('WebSocket连接断开============================>', e)
}
onBeforeUnmount(() => { onBeforeUnmount(() => {
// 4., // 4.,
ws.close() ws.close()

View File

@ -61,11 +61,11 @@ export function count() {
export function getVideoList(params) { export function getVideoList(params) {
return axios.get( return axios.get(
'http://10.134.135.9:8001/hx-weather-warning/camera/getCameraListByName?name=' + 'http://10.134.135.9:8001/hx-weather-warning/camera/getCameraListByName?name=' +
params.name + params.name +
'&pageNo=' + '&pageNo=' +
params.pageNo + params.pageNo +
'&pageSize=' + '&pageSize=' +
params.pageSize, params.pageSize,
config2 config2
) )
} }
@ -73,17 +73,17 @@ export function getVideoList(params) {
export function getRecord(params) { export function getRecord(params) {
return axios.get( return axios.get(
'http://10.134.135.24:30090/api/share-portal/platform/catalogue/query?serviceName=' + 'http://10.134.135.24:30090/api/share-portal/platform/catalogue/query?serviceName=' +
params.serviceName + params.serviceName +
'&orderField=' + '&orderField=' +
params.orderField + params.orderField +
'&orderType=' + '&orderType=' +
params.orderType + params.orderType +
'&pageNum=' + '&pageNum=' +
params.pageNum + params.pageNum +
'&pageSize=' + '&pageSize=' +
params.pageSize + params.pageSize +
'&serviceType=' + '&serviceType=' +
params.serviceType, params.serviceType,
config2 config2
) )
} }
@ -91,9 +91,24 @@ export function getRecord(params) {
export function getHls(params) { export function getHls(params) {
return axios.get( return axios.get(
'http://10.134.135.9:8001/hx-weather-warning/camera/getCameraLiveStreamByCode?cameraCode=' + 'http://10.134.135.9:8001/hx-weather-warning/camera/getCameraLiveStreamByCode?cameraCode=' +
params.cameraId + params.cameraId +
'&protocol=' + '&protocol=' +
params.protocol, params.protocol,
config2
)
}
//-
export function getCameraInfoByAreaId(params) {
return axios.get(
'http://10.134.135.92:9537/data_service/getCamera/getCameraInfoByAreaId?areaId=' +
params.areaId,
config2
)
}
//-
export function getCameraByCondition(params) {
return axios.get(
'http://10.134.135.92:9537/data_service/getCamera/getCameraByCondition?' + params,
config2 config2
) )
} }

View File

@ -68,7 +68,7 @@ export function selectByChannelCode(params) {
} }
export function getStreamByChannelCode(params) { export function getStreamByChannelCode(params) {
return request({ return request({
url: `/api/project/file`, url: `/resource/hls/getHls`,
method: 'get', method: 'get',
params, params,
}) })

View File

@ -440,7 +440,7 @@ export const constantRoutes = [
name: 'developmentGuide', name: 'developmentGuide',
component: () => import('@/views/developmentGuide/index'), component: () => import('@/views/developmentGuide/index'),
meta: { meta: {
title: '开发指南', title: '技术文档',
icon: 'error-warning-line', icon: 'error-warning-line',
}, },
}, },
@ -467,7 +467,7 @@ export const constantRoutes = [
name: 'instructionManual', name: 'instructionManual',
component: () => import('@/views/instructionManual/index'), component: () => import('@/views/instructionManual/index'),
meta: { meta: {
title: '指导手册', title: '技术文档',
icon: 'error-warning-line', icon: 'error-warning-line',
}, },
}, },

View File

@ -1,3 +1,10 @@
/*
* @Author: hisense.wuhongjian
* @Date: 2022-06-14 09:43:31
* @LastEditors: hisense.wuhongjian
* @LastEditTime: 2022-07-26 15:19:38
* @Description: 告诉大家这是什么
*/
/** /**
* @Author: tiansiyuan * @Author: tiansiyuan
* @Date: 2021/2/20 13:12:56 * @Date: 2021/2/20 13:12:56
@ -18,23 +25,23 @@ import { selectByChannelCode } from '@/api/videoSurveillance'
*/ */
function createCameraDetailsPop(feature) { function createCameraDetailsPop(feature) {
// if(feature.type !== 'cameraTree'){ // if(feature.type !== 'cameraTree'){
selectByChannelCode({ channelCode: feature.data.channelCode }).then((res) => { // selectByChannelCode({ channelCode: feature.data.channelCode }).then((res) => {
feature.data = res.data.data[0] // feature.data = res.data.data[0]
}) // })
// } // // }
const popupDom = new Dom({ // const popupDom = new Dom({
template: '<Camera-Details-Pop :feature="feature"></Camera-Details-Pop>', // template: '<Camera-Details-Pop :feature="feature"></Camera-Details-Pop>',
data() { // data() {
return { // return {
feature: feature, // feature: feature,
} // }
}, // },
created() {}, // created() {},
components: { // components: {
CameraDetailsPop, // CameraDetailsPop,
}, // },
}) // })
return popupDom.initDom() // return popupDom.initDom()
} }
function createSearchAddressTitlePop(feature) { function createSearchAddressTitlePop(feature) {
const popupDom = new Dom({ const popupDom = new Dom({

View File

@ -24,25 +24,12 @@ const CRS_4490 = new L.Proj.CRS(
// 1.3411051811431041E-6 // 1.3411051811431041E-6
// ], // ],
resolutions: [ resolutions: [
0.703125, 0.703125, 0.3515625, 0.17578125, 0.087890625, 0.0439453125, 0.02197265625,
0.3515625, 0.010986328125, 0.0054931640625, 0.00274658203125, 0.001373291015625,
0.17578125, 0.0006866455078125, 0.00034332275390625, 0.000171661376953125,
0.087890625, 0.0000858306884765625, 0.00004291534423828125, 0.000021457672119140625,
0.0439453125, 0.000010728836059570312, 0.0000053644180297851563,
0.02197265625, 0.0000026822090148925781,
0.010986328125,
0.0054931640625,
0.00274658203125,
0.001373291015625,
0.0006866455078125,
0.00034332275390625,
0.000171661376953125,
0.0000858306884765625,
0.00004291534423828125,
0.000021457672119140625,
0.000010728836059570312,
0.0000053644180297851563,
0.0000026822090148925781
], ],
// DEV // DEV
// resolutions: [ // resolutions: [
@ -147,17 +134,6 @@ export function HieimpMap() {
// console.log('', result); // console.log('', result);
// }); // });
switch (_mapConfig.config.CURRENT_SERVER_NAME) { switch (_mapConfig.config.CURRENT_SERVER_NAME) {
case 'xinjiang':
tileMapUrl = _mapConfig.config.TITLE_LAYER.mapUrl
tileMarkerUrl = _mapConfig.config.TITLE_MAKER.mapUrl
renderMapFun(mapId, tileMapUrl, centerPoint)
L.supermap
.tiledMapLayer(tileMarkerUrl, {
transparent: false,
opacity: 0.6,
})
.addTo(MapObj.map)
break
case 'qingdao_highgo': case 'qingdao_highgo':
if (type === 'tiled') { if (type === 'tiled') {
tileMapUrl = _mapConfig.config.TITLE_LAYER.mapUrl tileMapUrl = _mapConfig.config.TITLE_LAYER.mapUrl
@ -168,6 +144,50 @@ export function HieimpMap() {
} }
renderMapFun(mapId, tileMapUrl, centerPoint) renderMapFun(mapId, tileMapUrl, centerPoint)
break break
case 'qingdao':
const tileMap = L.map(mapId, {
crs: L.CRS.EPSG4326,
// renderer: L.svg(),
center: centerPoint,
maxZoom: _mapConfig.config.CURRENT_MAP_OPTIONS.maxZoom,
minZoom: _mapConfig.config.CURRENT_MAP_OPTIONS.minZoom,
zoom: _mapConfig.config.CURRENT_MAP_OPTIONS.zoom,
zoomControl: false,
// preferCanvas: true,
})
MapObj.map = tileMap // map
var matrixIds = []
for (var i = 0; i < 19; ++i) {
matrixIds[i] = {
identifier: 1 + i,
topLeftCorner: new L.LatLng(90, -180),
}
}
var wmtsMap = new L.TileLayer.WMTS(
'http://10.134.135.3:21009/service/map/wmts-raster', //
{
style: 'standard',
layer: 'basemap', //
tilematrixSet: 'EPSG:4326', //GeoServer使
tileSize: 256, //
format: 'image/png',
matrixIds: matrixIds,
}
)
var labelMap = new L.TileLayer.WMTS(
'http://10.134.135.3:21009/service/map/wmts-raster', //
{
style: 'standard',
layer: 'label', //
tilematrixSet: 'EPSG:4326', //GeoServer使
tileSize: 256, //
format: 'image/png',
matrixIds: matrixIds,
}
)
MapObj.map.addLayer(wmtsMap)
MapObj.map.addLayer(labelMap)
break
default: default:
if (type === 'tiled') { if (type === 'tiled') {
tileMapUrl = _mapConfig.config.TITLE_LAYER.mapUrl tileMapUrl = _mapConfig.config.TITLE_LAYER.mapUrl

View File

@ -65,7 +65,10 @@
<div class="itemList" v-else-if="navSelect.indexOf('应用领域') > 0"> <div class="itemList" v-else-if="navSelect.indexOf('应用领域') > 0">
<div class="item" v-for="item in dataList" :key="item.deptId"> <div class="item" v-for="item in dataList" :key="item.deptId">
<div class="top" :class="item.show ? 'showBottom' : ''"> <div class="top" :class="item.show ? 'showBottom' : ''">
<div class="name">{{ item.deptName }}</div> <a-tooltip>
<template #title>{{ item.deptName }}</template>
<div class="name">{{ item.deptName }}</div>
</a-tooltip>
<a-progress <a-progress
:percent="((item.provide.length / 15) * 100).toFixed(2)" :percent="((item.provide.length / 15) * 100).toFixed(2)"
:showInfo="false" :showInfo="false"
@ -596,7 +599,7 @@
align-items: center; align-items: center;
padding: 0.08rem 0.1rem; padding: 0.08rem 0.1rem;
.name { .name {
width: 3rem; width: 3.2rem;
text-align: right; text-align: right;
margin-right: 0.1rem; margin-right: 0.1rem;
overflow: hidden; overflow: hidden;

View File

@ -2,7 +2,7 @@
* @Author: hisense.liangjunhua * @Author: hisense.liangjunhua
* @Date: 2022-06-13 10:22:27 * @Date: 2022-06-13 10:22:27
* @LastEditors: hisense.liangjunhua * @LastEditors: hisense.liangjunhua
* @LastEditTime: 2022-07-19 20:04:47 * @LastEditTime: 2022-07-26 14:35:45
* @Description: 算法上架 * @Description: 算法上架
--> -->
<template> <template>
@ -37,6 +37,8 @@
'部门联系人', '部门联系人',
'部门联系人电话', '部门联系人电话',
]" ]"
:required="required"
:notFilled="notFilled"
></put-on-the-shelf> ></put-on-the-shelf>
<put-on-the-shelf <put-on-the-shelf
v-else-if="showView === '算法优势'" v-else-if="showView === '算法优势'"
@ -46,6 +48,8 @@
:configure="sfys" :configure="sfys"
@next="next()" @next="next()"
@back="back()" @back="back()"
:required="required"
:notFilled="notFilled"
></put-on-the-shelf> ></put-on-the-shelf>
<put-on-the-shelf <put-on-the-shelf
v-else-if="showView === '应用场景'" v-else-if="showView === '应用场景'"
@ -55,6 +59,8 @@
:configure="yycj" :configure="yycj"
@next="next()" @next="next()"
@back="back()" @back="back()"
:required="required"
:notFilled="notFilled"
></put-on-the-shelf> ></put-on-the-shelf>
<put-on-the-shelf <put-on-the-shelf
v-else-if="showView === '部署与使用'" v-else-if="showView === '部署与使用'"
@ -68,6 +74,9 @@
:configure="bs" :configure="bs"
@submit="submit()" @submit="submit()"
@back="back()" @back="back()"
@preview="preview()"
:required="required"
:notFilled="notFilled"
></put-on-the-shelf> ></put-on-the-shelf>
<!-- <algorithm-essential-information <!-- <algorithm-essential-information
v-if="showView === '基本信息' && refData.name" v-if="showView === '基本信息' && refData.name"
@ -153,7 +162,23 @@
<button v-else-if="showView !== '基本信息'" @click="back()"> <button v-else-if="showView !== '基本信息'" @click="back()">
上一步 上一步
</button> </button>
<button v-show="showView === '部署与使用'" @click="preview()"> <a-popconfirm
v-if="
showView === '部署与使用' &&
(bs[0].list.filter(
(val) => val.note1 !== '' && val.name !== '计费方式'
).length > 0 ||
bs[1].list.filter((val) => val.note1 !== '').length > 0)
"
title="如果计费标准信息或常见问题未填写完整将会被丢弃,是否进行预览?"
ok-text="是"
cancel-text="否"
@confirm="changeBs('预览')"
@cancel="cancel"
>
<button>预览</button>
</a-popconfirm>
<button v-else-if="showView === '部署与使用'" @click="preview()">
预览 预览
</button> </button>
<a-popconfirm <a-popconfirm
@ -356,6 +381,25 @@
type: '组件服务', type: '组件服务',
deptId: '', deptId: '',
}) })
const required = ref([
'归属部门',
'部门联系人',
'部门联系人电话',
'应用领域',
'共享条件',
'算法名称',
'算法描述',
'图层名称',
'图层描述',
'组件名称',
'组件描述',
'组件地址',
'服务地址',
'服务接口',
'接口请求方式',
'算法类别',
])
const notFilled = ref([])
getUser().then((res) => { getUser().then((res) => {
dataFrom.value.deptId = res.data.data.deptId dataFrom.value.deptId = res.data.data.deptId
}) })
@ -374,67 +418,157 @@
}) })
} }
const next = () => { const next = () => {
let i = -1 notFilled.value = []
navList.value.forEach((val, index) => { console.log(dataFrom.value, 'dataFrom.value.name')
if (val.key === showView.value && index < navList.value.length - 1) { if (!dataFrom.value.name) {
i = index + 1 notFilled.value.push('算法名称')
}
if (!dataFrom.value.description) {
notFilled.value.push('算法描述')
}
if (!dataFrom.value.shareCondition) {
notFilled.value.push('共享条件')
}
if (!dataFrom.value.deptContacts) {
notFilled.value.push('部门联系人')
}
if (!dataFrom.value.deptPhone) {
notFilled.value.push('部门联系人电话')
}
if (
!dataFrom.value.infoList.filter(
(val) => val.attrType === '算法类别'
)[0] ||
!dataFrom.value.infoList.filter((val) => val.attrType === '算法类别')[0]
.attrValue
) {
notFilled.value.push('算法类别')
}
if (
!dataFrom.value.infoList.filter(
(val) => val.attrType === '应用领域'
)[0] ||
!dataFrom.value.infoList.filter((val) => val.attrType === '应用领域')[0]
.attrValue
) {
notFilled.value.push('应用领域')
}
if (notFilled.value.length > 0) {
message.warning('请填写必填字段')
console.log(notFilled.value)
} else {
let i = -1
navList.value.forEach((val, index) => {
if (val.key === showView.value && index < navList.value.length - 1) {
i = index + 1
}
})
if (i !== -1) {
showView.value = navList2.value[i]
refData.value = data.value.filter(
(item) => item.name === showView.value
)[0]
console.log('表单数据=============>', dataFrom.value, refData.value)
} }
})
if (i !== -1) {
showView.value = navList2.value[i]
refData.value = data.value.filter(
(item) => item.name === showView.value
)[0]
console.log('表单数据=============>', dataFrom.value, refData.value)
} }
} }
// //
const preview = () => { const preview = () => {
dataFrom.value.infoList = dataFrom.value.infoList.filter( notFilled.value = []
(item) => item.attrValue !== '' console.log(dataFrom.value, 'dataFrom.value.name')
) if (
console.log('预览==============>', dataFrom.value) dataFrom.value.infoList.filter((val) => val.attrType === '使用方式')[0] &&
window.sessionStorage.setItem('preview', JSON.stringify(dataFrom.value)) dataFrom.value.infoList.filter((val) => val.attrType === '使用方式')[0]
const newpage = router.resolve({ .attrValue == '调用接口'
path: '/details', ) {
}) if (
window.open(newpage.href, '_blank') !dataFrom.value.infoList.filter(
} (val) => val.attrType === '服务接口'
const submit = () => { )[0] ||
console.log('提交数据=============>', dataFrom.value) !dataFrom.value.infoList.filter((val) => val.attrType === '服务接口')[0]
if (submitFlag.value) { .attrValue
submitFlag.value = false ) {
notFilled.value.push('服务接口')
}
if (!dataFrom.value.apiMethodType) {
notFilled.value.push('接口请求方式')
}
}
if (notFilled.value.length > 0) {
message.warning('请填写必填字段')
console.log(notFilled.value)
} else {
dataFrom.value.infoList = dataFrom.value.infoList.filter( dataFrom.value.infoList = dataFrom.value.infoList.filter(
(item) => item.attrValue !== '' (item) => item.attrValue !== ''
) )
shangjiainsert(dataFrom.value).then((res) => { console.log('预览==============>', dataFrom.value)
const instanceId = res.data.data window.sessionStorage.setItem('preview', JSON.stringify(dataFrom.value))
dataFrom.value.id = res.data.data const newpage = router.resolve({
getUser().then((res6) => { path: '/details',
getUserInfo(res6.data.data.id).then((res2) => { })
const deptId = dataFrom.value.deptId window.open(newpage.href, '_blank')
const userId = res2.data.data.id }
const userName = res2.data.data.realName }
const params = { const submit = () => {
instanceId: instanceId, notFilled.value = []
deptId: deptId, console.log(dataFrom.value, 'dataFrom.value.name')
userId: userId, if (
userName: userName, dataFrom.value.infoList.filter((val) => val.attrType === '使用方式')[0] &&
resourceDTO: [dataFrom.value], dataFrom.value.infoList.filter((val) => val.attrType === '使用方式')[0]
} .attrValue == '调用接口'
shangjiaapply(params).then((res3) => { ) {
console.log('res3', res3) if (
if (res3.data.code == 0) { !dataFrom.value.infoList.filter(
message.success('上架申请提交成功,请注意查看消息通知!') (val) => val.attrType === '服务接口'
window.setTimeout(() => { )[0] ||
window.close() !dataFrom.value.infoList.filter((val) => val.attrType === '服务接口')[0]
submitFlag.value = true .attrValue
}, 1000) ) {
notFilled.value.push('服务接口')
}
if (!dataFrom.value.apiMethodType) {
notFilled.value.push('接口请求方式')
}
}
if (notFilled.value.length > 0) {
message.warning('请填写必填字段')
console.log(notFilled.value)
} else {
console.log('提交数据=============>', dataFrom.value)
if (submitFlag.value) {
submitFlag.value = false
dataFrom.value.infoList = dataFrom.value.infoList.filter(
(item) => item.attrValue !== ''
)
shangjiainsert(dataFrom.value).then((res) => {
const instanceId = res.data.data
dataFrom.value.id = res.data.data
getUser().then((res6) => {
getUserInfo(res6.data.data.id).then((res2) => {
const deptId = dataFrom.value.deptId
const userId = res2.data.data.id
const userName = res2.data.data.realName
const params = {
instanceId: instanceId,
deptId: deptId,
userId: userId,
userName: userName,
resourceDTO: [dataFrom.value],
} }
shangjiaapply(params).then((res3) => {
console.log('res3', res3)
if (res3.data.code == 0) {
message.success('上架申请提交成功,请注意查看消息通知!')
window.setTimeout(() => {
window.close()
submitFlag.value = true
}, 1000)
}
})
}) })
}) })
}) })
}) }
} }
} }
const init = () => { const init = () => {

View File

@ -2,7 +2,7 @@
* @Author: hisense.liangjunhua * @Author: hisense.liangjunhua
* @Date: 2022-06-13 10:22:27 * @Date: 2022-06-13 10:22:27
* @LastEditors: hisense.liangjunhua * @LastEditors: hisense.liangjunhua
* @LastEditTime: 2022-07-25 17:30:32 * @LastEditTime: 2022-07-26 14:41:26
* @Description: 应用上架 * @Description: 应用上架
--> -->
<template> <template>
@ -37,6 +37,8 @@
'部门联系人电话', '部门联系人电话',
'共享条件', '共享条件',
]" ]"
:required="required"
:notFilled="notFilled"
></put-on-the-shelf> ></put-on-the-shelf>
<put-on-the-shelf <put-on-the-shelf
v-else-if="showView === '功能介绍'" v-else-if="showView === '功能介绍'"
@ -46,6 +48,8 @@
:configure="gnjs" :configure="gnjs"
@next="next()" @next="next()"
@back="back()" @back="back()"
:required="required"
:notFilled="notFilled"
></put-on-the-shelf> ></put-on-the-shelf>
<put-on-the-shelf <put-on-the-shelf
v-else-if="showView === '关联组件'" v-else-if="showView === '关联组件'"
@ -55,6 +59,8 @@
:configure="glzj" :configure="glzj"
@next="next()" @next="next()"
@back="back()" @back="back()"
:required="required"
:notFilled="notFilled"
></put-on-the-shelf> ></put-on-the-shelf>
<put-on-the-shelf <put-on-the-shelf
ref="refPutOnTheShelf" ref="refPutOnTheShelf"
@ -65,6 +71,9 @@
:configure="bs" :configure="bs"
@submit="submit()" @submit="submit()"
@back="back()" @back="back()"
@preview="preview()"
:required="required"
:notFilled="notFilled"
></put-on-the-shelf> ></put-on-the-shelf>
<!-- <application-essential-information <!-- <application-essential-information
v-if="showView === '基本信息' && refData.name" v-if="showView === '基本信息' && refData.name"
@ -119,7 +128,22 @@
> >
上一步 上一步
</button> </button>
<button v-show="showView === '部署与应用'" @click="preview()"> <a-popconfirm
v-if="
showView === '部署与应用' &&
bs[0].list.filter(
(val) => val.note1 !== '' && val.name !== '常见问题'
).length > 0
"
title="如果常见问题未填写完整将会被丢弃,是否进行预览?"
ok-text="是"
cancel-text="否"
@confirm="changeBs('预览')"
@cancel="cancel"
>
<button>预览</button>
</a-popconfirm>
<button v-else-if="showView === '部署与应用'" @click="preview()">
预览 预览
</button> </button>
<button v-show="showView === '基本信息'" @click="next()">下一步</button> <button v-show="showView === '基本信息'" @click="next()">下一步</button>
@ -261,6 +285,18 @@
], ],
}, },
]) ])
const required = ref([
'归属部门',
'部门联系人',
'部门联系人电话',
'应用领域',
'共享条件',
'应用名称',
'应用描述',
'应用状态',
'应用类型',
])
const notFilled = ref([])
getUser().then((res) => { getUser().then((res) => {
dataFrom.value.deptId = res.data.data.deptId dataFrom.value.deptId = res.data.data.deptId
}) })
@ -276,18 +312,76 @@
}) })
} }
const next = () => { const next = () => {
let i = -1 notFilled.value = []
navList.value.forEach((val, index) => { console.log(dataFrom.value, notFilled.value, 'dataFrom.value.name')
if (val.key === showView.value && index < navList.value.length - 1) { if (!dataFrom.value.name) {
i = index + 1 notFilled.value.push('应用名称')
}
if (!dataFrom.value.shareCondition) {
notFilled.value.push('共享条件')
}
if (!dataFrom.value.description) {
notFilled.value.push('应用描述')
}
if (!dataFrom.value.deptContacts) {
notFilled.value.push('部门联系人')
}
if (!dataFrom.value.deptPhone) {
notFilled.value.push('部门联系人电话')
}
if (
!dataFrom.value.infoList.filter(
(val) => val.attrType === '应用领域'
)[0] ||
!dataFrom.value.infoList.filter((val) => val.attrType === '应用领域')[0]
.attrValue
) {
notFilled.value.push('应用领域')
}
if (
!dataFrom.value.infoList.filter(
(val) => val.attrType === '应用状态'
)[0] ||
!dataFrom.value.infoList.filter((val) => val.attrType === '应用状态')[0]
.attrValue
) {
notFilled.value.push('应用状态')
}
if (
!dataFrom.value.infoList.filter(
(val) => val.attrType === '应用类型'
)[0] ||
!dataFrom.value.infoList.filter((val) => val.attrType === '应用类型')[0]
.attrValue
) {
notFilled.value.push('应用类型')
}
// if (
// !dataFrom.value.infoList.filter(
// (val) => val.attrType === ''
// )[0] ||
// !dataFrom.value.infoList.filter((val) => val.attrType === '')[0]
// .attrValue
// ) {
// notFilled.value.push('')
// }
if (notFilled.value.length > 0) {
message.warning('请填写必填字段')
console.log(notFilled.value)
} else {
let i = -1
navList.value.forEach((val, index) => {
if (val.key === showView.value && index < navList.value.length - 1) {
i = index + 1
}
})
if (i !== -1) {
showView.value = navList2.value[i]
refData.value = data.value.filter(
(item) => item.name === showView.value
)[0]
console.log('表单数据=============>', dataFrom.value, refData.value)
} }
})
if (i !== -1) {
showView.value = navList2.value[i]
refData.value = data.value.filter(
(item) => item.name === showView.value
)[0]
console.log('表单数据=============>', dataFrom.value, refData.value)
} }
} }
const submit = () => { const submit = () => {

View File

@ -2,7 +2,7 @@
* @Author: hisense.liangjunhua * @Author: hisense.liangjunhua
* @Date: 2022-06-20 09:35:51 * @Date: 2022-06-20 09:35:51
* @LastEditors: hisense.liangjunhua * @LastEditors: hisense.liangjunhua
* @LastEditTime: 2022-07-15 17:39:35 * @LastEditTime: 2022-07-26 14:36:31
* @Description: 业务组件 * @Description: 业务组件
--> -->
<template> <template>
@ -37,6 +37,8 @@
'部门联系人', '部门联系人',
'部门联系人电话', '部门联系人电话',
]" ]"
:required="required"
:notFilled="notFilled"
></put-on-the-shelf> ></put-on-the-shelf>
<put-on-the-shelf <put-on-the-shelf
v-else-if="showView === '功能介绍'" v-else-if="showView === '功能介绍'"
@ -46,6 +48,8 @@
:configure="gnjs" :configure="gnjs"
@next="next()" @next="next()"
@back="back()" @back="back()"
:required="required"
:notFilled="notFilled"
></put-on-the-shelf> ></put-on-the-shelf>
<put-on-the-shelf <put-on-the-shelf
v-else-if="showView === '应用场景'" v-else-if="showView === '应用场景'"
@ -55,6 +59,8 @@
:configure="yycj" :configure="yycj"
@next="next()" @next="next()"
@back="back()" @back="back()"
:required="required"
:notFilled="notFilled"
></put-on-the-shelf> ></put-on-the-shelf>
<put-on-the-shelf <put-on-the-shelf
v-else-if="showView === '部署与使用'" v-else-if="showView === '部署与使用'"
@ -67,6 +73,9 @@
:configure="bs" :configure="bs"
@submit="submit()" @submit="submit()"
@back="back()" @back="back()"
@preview="preview()"
:required="required"
:notFilled="notFilled"
></put-on-the-shelf> ></put-on-the-shelf>
</div> </div>
<div class="btn" :class="showView === '基本信息' ? 'first' : ''"> <div class="btn" :class="showView === '基本信息' ? 'first' : ''">
@ -124,7 +133,21 @@
<button v-else-if="showView !== '基本信息'" @click="back()"> <button v-else-if="showView !== '基本信息'" @click="back()">
上一步 上一步
</button> </button>
<button v-show="showView === '部署与使用'" @click="preview()"> <a-popconfirm
v-if="
showView === '部署与使用' &&
(bs[0].list.filter((val) => val.note1 !== '').length > 0 ||
bs[1].list.filter((val) => val.note1 !== '').length > 0)
"
title="如果常见问题未填写完整将会被丢弃,是否进行预览?"
ok-text="是"
cancel-text="否"
@confirm="changeBs('预览')"
@cancel="cancel"
>
<button>预览</button>
</a-popconfirm>
<button v-else-if="showView === '部署与使用'" @click="preview()">
预览 预览
</button> </button>
<a-popconfirm <a-popconfirm
@ -327,6 +350,25 @@
type: '组件服务', type: '组件服务',
deptId: '', deptId: '',
}) })
const required = ref([
'归属部门',
'部门联系人',
'部门联系人电话',
'应用领域',
'共享条件',
'算法名称',
'算法描述',
'图层名称',
'图层描述',
'组件名称',
'组件描述',
'组件地址',
'服务地址',
'服务接口',
'接口请求方式',
'算法类别',
])
const notFilled = ref([])
const close = () => { const close = () => {
window.close() window.close()
@ -346,67 +388,130 @@
}) })
} }
const next = () => { const next = () => {
let i = -1 notFilled.value = []
navList.value.forEach((val, index) => { console.log(dataFrom.value, 'dataFrom.value.name')
if (val.key === showView.value && index < navList.value.length - 1) { if (!dataFrom.value.name) {
i = index + 1 notFilled.value.push('组件名称')
}
if (!dataFrom.value.description) {
notFilled.value.push('组件描述')
}
if (!dataFrom.value.shareCondition) {
notFilled.value.push('共享条件')
}
if (!dataFrom.value.deptContacts) {
notFilled.value.push('部门联系人')
}
if (!dataFrom.value.deptPhone) {
notFilled.value.push('部门联系人电话')
}
if (
!dataFrom.value.infoList.filter(
(val) => val.attrType === '应用领域'
)[0] ||
!dataFrom.value.infoList.filter((val) => val.attrType === '应用领域')[0]
.attrValue
) {
notFilled.value.push('应用领域')
}
if (notFilled.value.length > 0) {
message.warning('请填写必填字段')
console.log(notFilled.value)
} else {
let i = -1
navList.value.forEach((val, index) => {
if (val.key === showView.value && index < navList.value.length - 1) {
i = index + 1
}
})
if (i !== -1) {
showView.value = navList2.value[i]
refData.value = data.value.filter(
(item) => item.name === showView.value
)[0]
console.log('表单数据=============>', dataFrom.value, refData.value)
} }
})
if (i !== -1) {
showView.value = navList2.value[i]
refData.value = data.value.filter(
(item) => item.name === showView.value
)[0]
console.log('表单数据=============>', dataFrom.value, refData.value)
} }
} }
// //
const preview = () => { const preview = () => {
dataFrom.value.infoList = dataFrom.value.infoList.filter( notFilled.value = []
(item) => item.attrValue !== '' console.log(dataFrom.value, 'dataFrom.value.name')
) if (
console.log('预览==============>', dataFrom.value) !dataFrom.value.infoList.filter(
window.sessionStorage.setItem('preview', JSON.stringify(dataFrom.value)) (val) => val.attrType === '组件地址'
const newpage = router.resolve({ )[0] ||
path: '/details', !dataFrom.value.infoList.filter((val) => val.attrType === '组件地址')[0]
}) .attrValue
window.open(newpage.href, '_blank') ) {
} notFilled.value.push('组件地址')
const submit = () => { }
console.log('提交数据=============>', dataFrom.value) if (notFilled.value.length > 0) {
if (submitFlag.value) { message.warning('请填写必填字段')
submitFlag.value = false console.log(notFilled.value)
} else {
dataFrom.value.infoList = dataFrom.value.infoList.filter( dataFrom.value.infoList = dataFrom.value.infoList.filter(
(item) => item.attrValue !== '' (item) => item.attrValue !== ''
) )
shangjiainsert(dataFrom.value).then((res) => { console.log('预览==============>', dataFrom.value)
const instanceId = res.data.data window.sessionStorage.setItem('preview', JSON.stringify(dataFrom.value))
dataFrom.value.id = res.data.data const newpage = router.resolve({
getUser().then((res6) => { path: '/details',
getUserInfo(res6.data.data.id).then((res2) => { })
const deptId = dataFrom.value.deptId window.open(newpage.href, '_blank')
const userId = res2.data.data.id }
const userName = res2.data.data.realName }
const params = { const submit = () => {
instanceId: instanceId, notFilled.value = []
deptId: deptId, console.log(dataFrom.value, 'dataFrom.value.name')
userId: userId, if (
userName: userName, !dataFrom.value.infoList.filter(
resourceDTO: [dataFrom.value], (val) => val.attrType === '组件地址'
} )[0] ||
shangjiaapply(params).then((res3) => { !dataFrom.value.infoList.filter((val) => val.attrType === '组件地址')[0]
console.log('res3', res3) .attrValue
if (res3.data.code == 0) { ) {
message.success('上架申请提交成功,请注意查看消息通知!') notFilled.value.push('组件地址')
window.setTimeout(() => { }
window.close() if (notFilled.value.length > 0) {
submitFlag.value = true message.warning('请填写必填字段')
}, 1000) console.log(notFilled.value)
} else {
console.log('提交数据=============>', dataFrom.value)
if (submitFlag.value) {
submitFlag.value = false
dataFrom.value.infoList = dataFrom.value.infoList.filter(
(item) => item.attrValue !== ''
)
shangjiainsert(dataFrom.value).then((res) => {
const instanceId = res.data.data
dataFrom.value.id = res.data.data
getUser().then((res6) => {
getUserInfo(res6.data.data.id).then((res2) => {
const deptId = dataFrom.value.deptId
const userId = res2.data.data.id
const userName = res2.data.data.realName
const params = {
instanceId: instanceId,
deptId: deptId,
userId: userId,
userName: userName,
resourceDTO: [dataFrom.value],
} }
shangjiaapply(params).then((res3) => {
console.log('res3', res3)
if (res3.data.code == 0) {
message.success('上架申请提交成功,请注意查看消息通知!')
window.setTimeout(() => {
window.close()
submitFlag.value = true
}, 1000)
}
})
}) })
}) })
}) })
}) }
} }
} }
// //

View File

@ -2,7 +2,7 @@
* @Author: hisense.liangjunhua * @Author: hisense.liangjunhua
* @Date: 2022-06-20 09:35:17 * @Date: 2022-06-20 09:35:17
* @LastEditors: hisense.liangjunhua * @LastEditors: hisense.liangjunhua
* @LastEditTime: 2022-07-15 17:39:42 * @LastEditTime: 2022-07-26 14:37:17
* @Description: 开发组件 * @Description: 开发组件
--> -->
<template> <template>
@ -37,6 +37,8 @@
'部门联系人', '部门联系人',
'部门联系人电话', '部门联系人电话',
]" ]"
:required="required"
:notFilled="notFilled"
></put-on-the-shelf> ></put-on-the-shelf>
<put-on-the-shelf <put-on-the-shelf
v-else-if="showView === '功能介绍'" v-else-if="showView === '功能介绍'"
@ -46,6 +48,8 @@
:configure="gnjs" :configure="gnjs"
@next="next()" @next="next()"
@back="back()" @back="back()"
:required="required"
:notFilled="notFilled"
></put-on-the-shelf> ></put-on-the-shelf>
<put-on-the-shelf <put-on-the-shelf
v-else-if="showView === '应用场景'" v-else-if="showView === '应用场景'"
@ -55,6 +59,8 @@
:configure="yycj" :configure="yycj"
@next="next()" @next="next()"
@back="back()" @back="back()"
:required="required"
:notFilled="notFilled"
></put-on-the-shelf> ></put-on-the-shelf>
<put-on-the-shelf <put-on-the-shelf
v-else-if="showView === '部署与使用'" v-else-if="showView === '部署与使用'"
@ -66,6 +72,9 @@
:configure="bs" :configure="bs"
@submit="submit()" @submit="submit()"
@back="back()" @back="back()"
@preview="preview()"
:required="required"
:notFilled="notFilled"
></put-on-the-shelf> ></put-on-the-shelf>
</div> </div>
<div class="btn" :class="showView === '基本信息' ? 'first' : ''"> <div class="btn" :class="showView === '基本信息' ? 'first' : ''">
@ -123,7 +132,21 @@
<button v-else-if="showView !== '基本信息'" @click="back()"> <button v-else-if="showView !== '基本信息'" @click="back()">
上一步 上一步
</button> </button>
<button v-show="showView === '部署与使用'" @click="preview()"> <a-popconfirm
v-if="
showView === '部署与使用' &&
(bs[0].list.filter((val) => val.note1 !== '').length > 0 ||
bs[1].list.filter((val) => val.note1 !== '').length > 0)
"
title="如果常见问题未填写完整将会被丢弃,是否进行预览?"
ok-text="是"
cancel-text="否"
@confirm="changeBs('预览')"
@cancel="cancel"
>
<button>预览</button>
</a-popconfirm>
<button v-else-if="showView === '部署与使用'" @click="preview()">
预览 预览
</button> </button>
<a-popconfirm <a-popconfirm
@ -326,6 +349,25 @@
type: '组件服务', type: '组件服务',
deptId: '', deptId: '',
}) })
const required = ref([
'归属部门',
'部门联系人',
'部门联系人电话',
'应用领域',
'共享条件',
'算法名称',
'算法描述',
'图层名称',
'图层描述',
'组件名称',
'组件描述',
'组件地址',
'服务地址',
'服务接口',
'接口请求方式',
'算法类别',
])
const notFilled = ref([])
const close = () => { const close = () => {
window.close() window.close()
@ -345,31 +387,78 @@
}) })
} }
const next = () => { const next = () => {
let i = -1 notFilled.value = []
navList.value.forEach((val, index) => { console.log(dataFrom.value, 'dataFrom.value.name')
if (val.key === showView.value && index < navList.value.length - 1) { if (!dataFrom.value.name) {
i = index + 1 notFilled.value.push('组件名称')
}
if (!dataFrom.value.description) {
notFilled.value.push('组件描述')
}
if (!dataFrom.value.shareCondition) {
notFilled.value.push('共享条件')
}
if (!dataFrom.value.deptContacts) {
notFilled.value.push('部门联系人')
}
if (!dataFrom.value.deptPhone) {
notFilled.value.push('部门联系人电话')
}
if (
!dataFrom.value.infoList.filter(
(val) => val.attrType === '应用领域'
)[0] ||
!dataFrom.value.infoList.filter((val) => val.attrType === '应用领域')[0]
.attrValue
) {
notFilled.value.push('应用领域')
}
if (notFilled.value.length > 0) {
message.warning('请填写必填字段')
console.log(notFilled.value)
} else {
let i = -1
navList.value.forEach((val, index) => {
if (val.key === showView.value && index < navList.value.length - 1) {
i = index + 1
}
})
if (i !== -1) {
showView.value = navList2.value[i]
refData.value = data.value.filter(
(item) => item.name === showView.value
)[0]
console.log('表单数据=============>', dataFrom.value, refData.value)
} }
})
if (i !== -1) {
showView.value = navList2.value[i]
refData.value = data.value.filter(
(item) => item.name === showView.value
)[0]
console.log('表单数据=============>', dataFrom.value, refData.value)
} }
} }
// //
const preview = () => { const preview = () => {
dataFrom.value.infoList = dataFrom.value.infoList.filter( notFilled.value = []
(item) => item.attrValue !== '' console.log(dataFrom.value, 'dataFrom.value.name')
) if (
console.log('预览==============>', dataFrom.value) !dataFrom.value.infoList.filter(
window.sessionStorage.setItem('preview', JSON.stringify(dataFrom.value)) (val) => val.attrType === '组件地址'
const newpage = router.resolve({ )[0] ||
path: '/details', !dataFrom.value.infoList.filter((val) => val.attrType === '组件地址')[0]
}) .attrValue
window.open(newpage.href, '_blank') ) {
notFilled.value.push('组件地址')
}
if (notFilled.value.length > 0) {
message.warning('请填写必填字段')
console.log(notFilled.value)
} else {
dataFrom.value.infoList = dataFrom.value.infoList.filter(
(item) => item.attrValue !== ''
)
console.log('预览==============>', dataFrom.value)
window.sessionStorage.setItem('preview', JSON.stringify(dataFrom.value))
const newpage = router.resolve({
path: '/details',
})
window.open(newpage.href, '_blank')
}
} }
// //
const refPutOnTheShelf = ref(null) const refPutOnTheShelf = ref(null)
@ -385,40 +474,56 @@
refPutOnTheShelf.value.add('常见问题', true, type) refPutOnTheShelf.value.add('常见问题', true, type)
} }
const submit = () => { const submit = () => {
console.log('提交数据=============>', dataFrom.value) notFilled.value = []
if (submitFlag.value) { console.log(dataFrom.value, 'dataFrom.value.name')
submitFlag.value = false if (
dataFrom.value.infoList = dataFrom.value.infoList.filter( !dataFrom.value.infoList.filter(
(item) => item.attrValue !== '' (val) => val.attrType === '组件地址'
) )[0] ||
shangjiainsert(dataFrom.value).then((res) => { !dataFrom.value.infoList.filter((val) => val.attrType === '组件地址')[0]
const instanceId = res.data.data .attrValue
dataFrom.value.id = res.data.data ) {
getUser().then((res6) => { notFilled.value.push('组件地址')
getUserInfo(res6.data.data.id).then((res2) => { }
const deptId = dataFrom.value.deptId if (notFilled.value.length > 0) {
const userId = res2.data.data.id message.warning('请填写必填字段')
const userName = res2.data.data.realName console.log(notFilled.value)
const params = { } else {
instanceId: instanceId, console.log('提交数据=============>', dataFrom.value)
deptId: deptId, if (submitFlag.value) {
userId: userId, submitFlag.value = false
userName: userName, dataFrom.value.infoList = dataFrom.value.infoList.filter(
resourceDTO: [dataFrom.value], (item) => item.attrValue !== ''
} )
shangjiaapply(params).then((res3) => { shangjiainsert(dataFrom.value).then((res) => {
console.log('res3', res3) const instanceId = res.data.data
if (res3.data.code == 0) { dataFrom.value.id = res.data.data
message.success('上架申请提交成功,请注意查看消息通知!') getUser().then((res6) => {
window.setTimeout(() => { getUserInfo(res6.data.data.id).then((res2) => {
window.close() const deptId = dataFrom.value.deptId
submitFlag.value = true const userId = res2.data.data.id
}, 1000) const userName = res2.data.data.realName
const params = {
instanceId: instanceId,
deptId: deptId,
userId: userId,
userName: userName,
resourceDTO: [dataFrom.value],
} }
shangjiaapply(params).then((res3) => {
console.log('res3', res3)
if (res3.data.code == 0) {
message.success('上架申请提交成功,请注意查看消息通知!')
window.setTimeout(() => {
window.close()
submitFlag.value = true
}, 1000)
}
})
}) })
}) })
}) })
}) }
} }
} }
const init = () => { const init = () => {

View File

@ -2,7 +2,7 @@
* @Author: hisense.liangjunhua * @Author: hisense.liangjunhua
* @Date: 2022-06-20 09:35:17 * @Date: 2022-06-20 09:35:17
* @LastEditors: hisense.liangjunhua * @LastEditors: hisense.liangjunhua
* @LastEditTime: 2022-07-15 17:39:47 * @LastEditTime: 2022-07-26 14:37:38
* @Description: 图层服务 * @Description: 图层服务
--> -->
<template> <template>
@ -37,12 +37,16 @@
'部门联系人', '部门联系人',
'部门联系人电话', '部门联系人电话',
]" ]"
:required="required"
:notFilled="notFilled"
></put-on-the-shelf> ></put-on-the-shelf>
<put-on-the-shelf <put-on-the-shelf
v-else-if="showView === '图层信息'" v-else-if="showView === '图层信息'"
ref="refPutOnTheShelf" ref="refPutOnTheShelf"
:refData="refData" :refData="refData"
:dataFrom="dataFrom" :dataFrom="dataFrom"
:required="required"
:notFilled="notFilled"
></put-on-the-shelf> ></put-on-the-shelf>
<put-on-the-shelf <put-on-the-shelf
v-else-if="showView === '应用场景'" v-else-if="showView === '应用场景'"
@ -50,6 +54,8 @@
:refData="refData" :refData="refData"
:dataFrom="dataFrom" :dataFrom="dataFrom"
:configure="yycj" :configure="yycj"
:required="required"
:notFilled="notFilled"
@next="next()" @next="next()"
@back="back()" @back="back()"
></put-on-the-shelf> ></put-on-the-shelf>
@ -63,6 +69,9 @@
:configure="bs" :configure="bs"
@submit="submit()" @submit="submit()"
@back="back()" @back="back()"
@preview="preview()"
:required="required"
:notFilled="notFilled"
></put-on-the-shelf> ></put-on-the-shelf>
</div> </div>
<div class="btn" :class="showView === '基本信息' ? 'first' : ''"> <div class="btn" :class="showView === '基本信息' ? 'first' : ''">
@ -95,7 +104,22 @@
<button v-else-if="showView !== '基本信息'" @click="back()"> <button v-else-if="showView !== '基本信息'" @click="back()">
上一步 上一步
</button> </button>
<button v-show="showView === '部署与使用'" @click="preview()"> <a-popconfirm
v-if="
showView === '部署与使用' &&
bs[0].list.filter(
(val) => val.note1 !== '' && val.name !== '计费方式'
).length > 0
"
title="如果常见问题未填写完整将会被丢弃,是否进行预览?"
ok-text="是"
cancel-text="否"
@confirm="changeBs('预览')"
@cancel="cancel"
>
<button>预览</button>
</a-popconfirm>
<button v-else-if="showView === '部署与使用'" @click="preview()">
预览 预览
</button> </button>
<a-popconfirm <a-popconfirm
@ -224,6 +248,26 @@
type: '组件服务', type: '组件服务',
deptId: '', deptId: '',
}) })
const required = ref([
'归属部门',
'部门联系人',
'部门联系人电话',
'应用领域',
'共享条件',
'算法名称',
'算法描述',
'图层名称',
'图层描述',
'组件名称',
'组件描述',
'组件地址',
'服务地址',
'服务接口',
'接口请求方式',
'算法类别',
])
const notFilled = ref([])
getUser().then((res) => { getUser().then((res) => {
dataFrom.value.deptId = res.data.data.deptId dataFrom.value.deptId = res.data.data.deptId
}) })
@ -243,31 +287,78 @@
window.close() window.close()
} }
const next = () => { const next = () => {
let i = -1 notFilled.value = []
navList.value.forEach((val, index) => { console.log(dataFrom.value, 'dataFrom.value.name')
if (val.key === showView.value && index < navList.value.length - 1) { if (!dataFrom.value.name) {
i = index + 1 notFilled.value.push('图层名称')
}
if (!dataFrom.value.description) {
notFilled.value.push('图层描述')
}
if (!dataFrom.value.shareCondition) {
notFilled.value.push('共享条件')
}
if (!dataFrom.value.deptContacts) {
notFilled.value.push('部门联系人')
}
if (!dataFrom.value.deptPhone) {
notFilled.value.push('部门联系人电话')
}
if (
!dataFrom.value.infoList.filter(
(val) => val.attrType === '应用领域'
)[0] ||
!dataFrom.value.infoList.filter((val) => val.attrType === '应用领域')[0]
.attrValue
) {
notFilled.value.push('应用领域')
}
if (notFilled.value.length > 0) {
message.warning('请填写必填字段')
console.log(notFilled.value)
} else {
let i = -1
navList.value.forEach((val, index) => {
if (val.key === showView.value && index < navList.value.length - 1) {
i = index + 1
}
})
if (i !== -1) {
showView.value = navList2.value[i]
refData.value = data.value.filter(
(item) => item.name === showView.value
)[0]
console.log('表单数据=============>', dataFrom.value, refData.value)
} }
})
if (i !== -1) {
showView.value = navList2.value[i]
refData.value = data.value.filter(
(item) => item.name === showView.value
)[0]
console.log('表单数据=============>', dataFrom.value, refData.value)
} }
} }
// //
const preview = () => { const preview = () => {
dataFrom.value.infoList = dataFrom.value.infoList.filter( notFilled.value = []
(item) => item.attrValue !== '' console.log(dataFrom.value, 'dataFrom.value.name')
) if (
console.log('预览==============>', dataFrom.value) !dataFrom.value.infoList.filter(
window.sessionStorage.setItem('preview', JSON.stringify(dataFrom.value)) (val) => val.attrType === '服务地址'
const newpage = router.resolve({ )[0] ||
path: '/details', !dataFrom.value.infoList.filter((val) => val.attrType === '服务地址')[0]
}) .attrValue
window.open(newpage.href, '_blank') ) {
notFilled.value.push('服务地址')
}
if (notFilled.value.length > 0) {
message.warning('请填写必填字段')
console.log(notFilled.value)
} else {
dataFrom.value.infoList = dataFrom.value.infoList.filter(
(item) => item.attrValue !== ''
)
console.log('预览==============>', dataFrom.value)
window.sessionStorage.setItem('preview', JSON.stringify(dataFrom.value))
const newpage = router.resolve({
path: '/details',
})
window.open(newpage.href, '_blank')
}
} }
// //
const refPutOnTheShelf = ref(null) const refPutOnTheShelf = ref(null)
@ -280,40 +371,56 @@
refPutOnTheShelf.value.add('常见问题', true, type) refPutOnTheShelf.value.add('常见问题', true, type)
} }
const submit = () => { const submit = () => {
console.log('提交数据=============>', dataFrom.value) notFilled.value = []
if (submitFlag.value) { console.log(dataFrom.value, 'dataFrom.value.name')
submitFlag.value = false if (
dataFrom.value.infoList = dataFrom.value.infoList.filter( !dataFrom.value.infoList.filter(
(item) => item.attrValue !== '' (val) => val.attrType === '服务地址'
) )[0] ||
shangjiainsert(dataFrom.value).then((res) => { !dataFrom.value.infoList.filter((val) => val.attrType === '服务地址')[0]
const instanceId = res.data.data .attrValue
dataFrom.value.id = res.data.data ) {
getUser().then((res6) => { notFilled.value.push('服务地址')
getUserInfo(res6.data.data.id).then((res2) => { }
const deptId = dataFrom.value.deptId if (notFilled.value.length > 0) {
const userId = res2.data.data.id message.warning('请填写必填字段')
const userName = res2.data.data.realName console.log(notFilled.value)
const params = { } else {
instanceId: instanceId, console.log('提交数据=============>', dataFrom.value)
deptId: deptId, if (submitFlag.value) {
userId: userId, submitFlag.value = false
userName: userName, dataFrom.value.infoList = dataFrom.value.infoList.filter(
resourceDTO: [dataFrom.value], (item) => item.attrValue !== ''
} )
shangjiaapply(params).then((res3) => { shangjiainsert(dataFrom.value).then((res) => {
console.log('res3', res3) const instanceId = res.data.data
if (res3.data.code == 0) { dataFrom.value.id = res.data.data
message.success('上架申请提交成功,请注意查看消息通知!') getUser().then((res6) => {
window.setTimeout(() => { getUserInfo(res6.data.data.id).then((res2) => {
window.close() const deptId = dataFrom.value.deptId
submitFlag.value = true const userId = res2.data.data.id
}, 1000) const userName = res2.data.data.realName
const params = {
instanceId: instanceId,
deptId: deptId,
userId: userId,
userName: userName,
resourceDTO: [dataFrom.value],
} }
shangjiaapply(params).then((res3) => {
console.log('res3', res3)
if (res3.data.code == 0) {
message.success('上架申请提交成功,请注意查看消息通知!')
window.setTimeout(() => {
window.close()
submitFlag.value = true
}, 1000)
}
})
}) })
}) })
}) })
}) }
} }
} }
const init = () => { const init = () => {

View File

@ -2,7 +2,7 @@
* @Author: hisense.liangjunhua * @Author: hisense.liangjunhua
* @Date: 2022-06-17 14:11:08 * @Date: 2022-06-17 14:11:08
* @LastEditors: hisense.liangjunhua * @LastEditors: hisense.liangjunhua
* @LastEditTime: 2022-07-19 18:51:52 * @LastEditTime: 2022-07-26 16:29:25
* @Description: 上架 * @Description: 上架
--> -->
<template> <template>
@ -204,7 +204,7 @@
<template v-else> <template v-else>
<div class="bottom"> <div class="bottom">
<div <div
class="form" class="form item"
v-for="item in title.children" v-for="item in title.children"
:key="item.id" :key="item.id"
v-show=" v-show="
@ -220,189 +220,222 @@
) )
" "
> >
<span>{{ item.name }}</span> <div class="box">
<a-input <div>
v-if="item.type == 'input' && item.name.indexOf('名称') == -1" <b class="required" v-if="required.indexOf(item.name) > -1">
v-model:value="item.note1" *
:placeholder="'请输入' + item.name" </b>
/> {{ item.name }}
<a-input
v-else-if="
item.type == 'input' && item.name.indexOf('名称') != -1
"
:maxLength="50"
v-model:value="item.note1"
:placeholder="'请输入' + item.name + '不超过50个字符'"
/>
<a-radio-group
v-else-if="item.type == 'radio'"
v-model:value="item.note1"
:options="item.options"
/>
<a-input
v-else-if="item.type == 'AbilityType'"
v-model:value="item.note1"
:placeholder="'请输入' + item.name"
:disabled="true"
/>
<a-input
v-else-if="item.type == 'ComponentType'"
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 == 'package'"
type="压缩包"
btnName="上传安装包"
:maxCount="1"
:data="item"
:list="props.packageList"
tip="支持.zip类型"
></upload>
<div
class="Technical-text"
v-else-if="item.type == 'richText'"
@click="showTextFunction()"
>
编辑富文本
<div
v-if="showText"
class="fuwenbenbianjiqi"
style="position: absolute; z-index: 10000"
>
<VueTemplateDemo :dataFrom="props.dataFrom"></VueTemplateDemo>
</div> </div>
</div> <a-input
<upload v-if="item.type == 'input' && item.name.indexOf('名称') == -1"
v-else-if="item.type == 'video'" v-model:value="item.note1"
type="视频" :placeholder="'请输入' + item.name"
btnName="上传视频" @change="changeIiem(item.name, item.note1)"
:maxCount="1" />
:data="item" <a-input
:list="props.videoList" v-else-if="
tip="支持视频类型大小不超过100M" item.type == 'input' && item.name.indexOf('名称') != -1
></upload> "
<!-- <a-button :maxLength="50"
v-model:value="item.note1"
:placeholder="'请输入' + item.name + '不超过50个字符'"
@change="changeIiem(item.name, item.note1)"
/>
<a-radio-group
v-else-if="item.type == 'radio'"
v-model:value="item.note1"
:options="item.options"
/>
<a-input
v-else-if="item.type == 'AbilityType'"
v-model:value="item.note1"
:placeholder="'请输入' + item.name"
:disabled="true"
/>
<a-input
v-else-if="item.type == 'ComponentType'"
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"
@change="changeIiem(item.name, item.note1)"
/>
<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 == 'package'"
type="压缩包"
btnName="上传安装包"
:maxCount="1"
:data="item"
:list="props.packageList"
tip="支持.zip类型"
></upload>
<div
class="Technical-text"
v-else-if="item.type == 'richText'"
@click="showTextFunction()"
>
编辑富文本
<div
v-if="showText"
class="fuwenbenbianjiqi"
style="position: absolute; z-index: 10000"
>
<VueTemplateDemo :dataFrom="props.dataFrom"></VueTemplateDemo>
</div>
</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 == 'AssociatedApplication'" v-else-if="item.type == 'AssociatedApplication'"
@click="sourceClick" @click="sourceClick"
> >
请选择来源应用 请选择来源应用
</a-button> --> </a-button> -->
<a-select <a-select
v-else-if="item.type == 'select' && item.name == '来源应用'" v-else-if="item.type == 'select' && item.name == '来源应用'"
style="width: 2.4rem" style="width: 2.4rem"
v-model:value="item.note1" v-model:value="item.note1"
show-search show-search
placeholder="请输入关键字" placeholder="请输入关键字"
:options="item.options" :options="item.options"
:filter-option="applicationsOption" :filter-option="applicationsOption"
@focus="applicationsFocus" @focus="applicationsFocus"
@blur="applicationsBlur" @blur="applicationsBlur"
@change="applicationsChange" @change="applicationsChange"
></a-select> ></a-select>
<a-button <a-button
v-else-if="item.type == 'AssociatedComponents'" v-else-if="item.type == 'AssociatedComponents'"
@click="componentsClick" @click="componentsClick"
>
请选择关联组件
</a-button>
<a-select
v-else-if="item.type == 'select' && item.name == '使用方式'"
style="width: 2.4rem"
v-model:value="item.note1"
:placeholder="'请选择' + item.name"
@change="showTypeClick"
>
<a-select-option
v-for="(itemSelect, indexSelect) in item.options"
:key="indexSelect"
:value="itemSelect.dictLabel"
> >
{{ itemSelect.dictLabel }} 请选择关联组件
</a-select-option> </a-button>
</a-select> <a-select
<a-select v-else-if="item.type == 'select' && item.name == '使用方式'"
v-else-if="item.type == 'select' && item.name !== '归属部门'" style="width: 2.4rem"
style="width: 2.4rem" v-model:value="item.note1"
v-model:value="item.note1" :placeholder="'请选择' + item.name"
:placeholder="'请选择' + item.name" @change="showTypeClick"
>
<a-select-option
v-for="(itemSelect, indexSelect) in item.options"
:key="indexSelect"
:value="itemSelect.dictLabel"
> >
{{ itemSelect.dictLabel }} <a-select-option
</a-select-option> v-for="(itemSelect, indexSelect) in item.options"
</a-select> :key="indexSelect"
<a-select :value="itemSelect.dictLabel"
v-else-if="item.name === '归属部门'" >
style="width: 2.4rem" {{ itemSelect.dictLabel }}
v-model:value="item.note1" </a-select-option>
show-search </a-select>
placeholder="请输入关键字" <a-select
:options="item.options" v-else-if="item.type == 'select' && item.name !== '归属部门'"
:filter-option="filterOption" style="width: 2.4rem"
@focus="handleFocus" v-model:value="item.note1"
@blur="handleBlur" :placeholder="'请选择' + item.name"
@change="handleChange2" @change="changeIiem(item.name, item.note1)"
></a-select> >
<div <a-select-option
v-else-if="item.type == 'checkBox'" v-for="(itemSelect, indexSelect) in item.options"
class="application-Area" :key="indexSelect"
id="application-Area" :value="itemSelect.dictLabel"
:key="showKey" >
> {{ itemSelect.dictLabel }}
</a-select-option>
</a-select>
<a-select
v-else-if="item.name === '归属部门'"
style="width: 2.4rem"
v-model:value="item.note1"
show-search
placeholder="请输入关键字"
:options="item.options"
:filter-option="filterOption"
@focus="handleFocus"
@blur="handleBlur"
@change="changeIiem(item.name, item.note1)"
></a-select>
<div <div
v-for="(itemson, indexson) in item.options" v-else-if="item.type == 'checkBox'"
:key="indexson" class="application-Area"
class="application-Area-son" id="application-Area"
@click="ApplicationArea(item, itemson)" :key="showKey"
:class="
item.note2.indexOf(itemson.dictLabel) != -1
? 'application-Area-down'
: ''
"
> >
{{ itemson.dictLabel }} <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> </div>
<div
class="requiredTips"
v-show="
notFilled.indexOf(item.name) > -1 &&
(item.type == 'input' || item.type == 'textArea') &&
changeField.indexOf(item.name) == -1
"
>
请填写{{ item.name }}
</div>
<div
class="requiredTips"
v-show="
notFilled.indexOf(item.name) > -1 &&
(item.type == 'select' ||
item.type == 'checkBox' ||
item.type == 'radio') &&
changeField.indexOf(item.name) == -1
"
>
请选择{{ item.name }}
</div>
</div> </div>
<!-- 来源应用 --> <!-- 来源应用 -->
<div class="AssociatedApplication"> <div class="AssociatedApplication">
@ -454,6 +487,7 @@
</div> </div>
</template> </template>
<script setup> <script setup>
import VueTemplateDemo from '@/views/personalCenter/VueTemplateDemo'
import { import {
ref, ref,
defineProps, defineProps,
@ -466,7 +500,6 @@
import upload from '@/views/components/upload' import upload from '@/views/components/upload'
import { message } from 'ant-design-vue' import { message } from 'ant-design-vue'
import { getUserInfo, getDeptAll } from '@/api/user' import { getUserInfo, getDeptAll } from '@/api/user'
import VueTemplateDemo from '@/views/personalCenter/VueTemplateDemo.vue'
import { import {
getCategoryTreePage, getCategoryTreePage,
queryApplicationRelByResourceId, queryApplicationRelByResourceId,
@ -477,6 +510,7 @@
const router = useRouter() const router = useRouter()
const abilityToType = router.currentRoute.value.query.abilityToType const abilityToType = router.currentRoute.value.query.abilityToType
const componentTypeValue = router.currentRoute.value.query.componentTypeValue const componentTypeValue = router.currentRoute.value.query.componentTypeValue
const changeField = ref([])
const props = defineProps({ const props = defineProps({
// //
refData: { type: Object, default: null }, refData: { type: Object, default: null },
@ -495,6 +529,8 @@
externalField: { type: Array, default: null }, externalField: { type: Array, default: null },
// //
configure: { type: Array, default: null }, configure: { type: Array, default: null },
required: { type: Array, default: null },
notFilled: { type: Array, default: null },
// [{ // [{
// name:'', // name:'',
// list:[ // list:[
@ -538,7 +574,7 @@
// ] // ]
// }] // }]
}) })
const emit = defineEmits(['next', 'back', 'submit']) const emit = defineEmits(['next', 'back', 'submit', 'preview'])
// console.log('props==========>', props) // console.log('props==========>', props)
const changeAdd = () => { const changeAdd = () => {
console.log('子组件方法触发~') console.log('子组件方法触发~')
@ -551,6 +587,15 @@
const radioChange = (e) => { const radioChange = (e) => {
numType.value = e.target.value numType.value = e.target.value
} }
const changeIiem = (name, value) => {
if (value && value !== '' && changeField.value.indexOf(name) == -1) {
changeField.value.push(name)
} else if (!value || value == '') {
if (changeField.value.indexOf(name) > -1) {
changeField.value.splice(changeField.value.indexOf(name), 1)
}
}
}
props.refData.children.map((item) => { props.refData.children.map((item) => {
if (item.name == '基本信息') { if (item.name == '基本信息') {
item.children.map((val) => { item.children.map((val) => {
@ -687,6 +732,7 @@
// //
let showText = ref(false) let showText = ref(false)
const showTextFunction = () => { const showTextFunction = () => {
console.log('点击富文本=========================>')
showText.value = true showText.value = true
} }
mybus.on('showTextFunctionEmit', (show) => { mybus.on('showTextFunctionEmit', (show) => {
@ -753,6 +799,8 @@
emit('next') emit('next')
} else if (type == '提交') { } else if (type == '提交') {
emit('submit') emit('submit')
} else if (type == '预览') {
emit('preview')
} }
} }
} else { } else {
@ -769,6 +817,8 @@
emit('next') emit('next')
} else if (type == '提交') { } else if (type == '提交') {
emit('submit') emit('submit')
} else if (type == '预览') {
emit('preview')
} }
} }
} }
@ -782,13 +832,26 @@
}) })
} }
const ApplicationArea = (item, itemson) => { const ApplicationArea = (item, itemson) => {
console.log('点击=========》', item, itemson) // console.log('=========', item, itemson)
// console.log(item, itemson) // console.log(item, itemson)
if (item.note2.indexOf(itemson.dictLabel) === -1) { if (item.note2.indexOf(itemson.dictLabel) === -1) {
item.note2.push(itemson.dictLabel) item.note2.push(itemson.dictLabel)
} else { } else {
item.note2.splice(item.note2.indexOf(itemson.dictLabel), 1) item.note2.splice(item.note2.indexOf(itemson.dictLabel), 1)
} }
//
if (
item.note2.length !== 0 &&
changeField.value.indexOf('应用领域') == -1
) {
changeField.value.push('应用领域')
console.log('点击=========》1', changeField.value, item.note2)
} else if (item.note2.length == 0) {
if (changeField.value.indexOf('应用领域') > -1) {
changeField.value.splice(changeField.value.indexOf('应用领域'), 1)
console.log('点击=========》2', changeField.value, item.note2)
}
}
mybus.emit('chageDataFrom', { mybus.emit('chageDataFrom', {
attrType: item.name, attrType: item.name,
attrValue: item.note2.join(';'), attrValue: item.note2.join(';'),
@ -979,9 +1042,6 @@
} }
}) })
}) })
const handleChange2 = (value) => {
console.log(`selected ${value}`)
}
const applicationsChange = (value) => { const applicationsChange = (value) => {
data.value.list.map((item) => { data.value.list.map((item) => {
if (item.name === '来源应用') { if (item.name === '来源应用') {
@ -1275,4 +1335,31 @@
cursor: pointer; cursor: pointer;
} }
} }
.item {
position: relative;
span:first-child {
width: unset;
}
.box {
display: flex;
align-items: center;
// margin: 15px 0;
& > div:nth-of-type(1) {
width: 105px;
display: flex;
align-items: center;
}
.required {
color: #f56c6c;
margin-right: 3px;
}
}
.requiredTips {
font-size: 14px;
color: #f56c6c;
position: absolute;
bottom: -20px;
left: 110px;
}
}
</style> </style>

View File

@ -111,7 +111,8 @@
item.attrType === '技术文档' || item.attrType === '技术文档' ||
item.attrType === '服务商' || item.attrType === '服务商' ||
item.attrType === '服务商联系人' || item.attrType === '服务商联系人' ||
item.attrType === '服务商联系电话' item.attrType === '服务商联系电话' ||
item.attrType === '服务接口'
) { ) {
list.value.push('使用方式') list.value.push('使用方式')
} }
@ -164,7 +165,8 @@
item.attrType === '技术文档' || item.attrType === '技术文档' ||
item.attrType === '服务商' || item.attrType === '服务商' ||
item.attrType === '服务商联系人' || item.attrType === '服务商联系人' ||
item.attrType === '服务商联系电话' item.attrType === '服务商联系电话' ||
item.attrType === '服务接口'
) { ) {
list.value.push('使用方式') list.value.push('使用方式')
} }

View File

@ -287,7 +287,7 @@
message.config({ message.config({
top: '100px', // top: '100px', //
}) })
message.error('暂未上传使用手册') message.error('暂未开放使用手册')
} }
} }
function SDKClick() { function SDKClick() {
@ -300,7 +300,7 @@
message.config({ message.config({
top: '100px', // top: '100px', //
}) })
message.error('SDK安装包') message.error('暂未上传SDK安装包')
} }
} }
</script> </script>

View File

@ -204,7 +204,7 @@
message.config({ message.config({
top: '100px', // top: '100px', //
}) })
message.error('暂未上传接口文档') message.error('暂未开放技术文档')
} }
} }
function technicalNew() { function technicalNew() {
@ -228,7 +228,7 @@
message.config({ message.config({
top: '100px', // top: '100px', //
}) })
message.error('暂未上传使用手册') message.error('暂未开放新手指引')
} }
} }
</script> </script>

View File

@ -104,7 +104,7 @@
/> />
</div> </div>
</div> </div>
<div <!-- <div
class="top-content" class="top-content"
v-if="Cardsname == '组件服务' || Cardsname == '应用资源'" v-if="Cardsname == '组件服务' || Cardsname == '应用资源'"
> >
@ -127,7 +127,7 @@
</a-checkable-tag> </a-checkable-tag>
</div> </div>
</div> </div>
</div> </div> -->
</div> </div>
</template> </template>
</div> </div>
@ -232,10 +232,13 @@
v-else-if="whoShow1 && whoShow1.itShowXiHaiAn" v-else-if="whoShow1 && whoShow1.itShowXiHaiAn"
> >
<home-header></home-header> <home-header></home-header>
<div class="details-pageconetent-left"> <div class="details-pageconetent-left" v-if="Cardsname != '基础设施'">
<detailsPageconetentTree /> <detailsPageconetentTree />
</div> </div>
<div class="top" v-if="Cardsname != '知识库'"> <div class="details-pageconetent-left" v-else>
<detailsPageInfrastructureTree />
</div>
<div class="top" v-if="Cardsname != '知识库' && Cardsname != '基础设施'">
<div class="top-title"> <div class="top-title">
<div <div
v-for="item in titleName" v-for="item in titleName"
@ -247,12 +250,12 @@
class="photo" class="photo"
:style="{ :style="{
backgroundImage: `url(${item.photo}) `, backgroundImage: `url(${item.photo}) `,
backgroundSize: 'cover',
}" }"
></span> ></span>
<span>{{ item.name }}</span> <span>{{ item.name }}</span>
</div> </div>
</div> </div>
<!-- 搜索框 -->
<div class="resultListSearchInput-father"> <div class="resultListSearchInput-father">
<div class="resultListSearchInput-son"> <div class="resultListSearchInput-son">
模糊搜索 模糊搜索
@ -266,10 +269,17 @@
class="resultListSearchInput" class="resultListSearchInput"
/> />
<button class="button-reset" @click="chongzhi()">重置</button> <button class="button-reset" @click="chongzhi()">重置</button>
<button
v-if="Cardsname == '应用资源'"
class="button-reset"
@click="applyAll()"
style="margin-left: 0.1rem"
>
全部申请
</button>
<div class="hengxian"></div> <div class="hengxian"></div>
</div> </div>
</div> </div>
<!-- 分类 -->
<div class="top-content-father" :key="listKey"> <div class="top-content-father" :key="listKey">
<template <template
v-if=" v-if="
@ -324,7 +334,10 @@
/> />
</div> </div>
</div> </div>
<div class="top-content" v-if="Cardsname == '组件服务'"> <!-- <div
class="top-content"
v-if="Cardsname == '组件服务' || Cardsname == '应用资源'"
>
<span class="top-content-title">共享条件</span> <span class="top-content-title">共享条件</span>
<div class="leixingsumfather"> <div class="leixingsumfather">
<div class="leixingsum"> <div class="leixingsum">
@ -340,15 +353,14 @@
:checked="tagFlag == '免批申请'" :checked="tagFlag == '免批申请'"
@change="() => chagneTag('免批申请')" @change="() => chagneTag('免批申请')"
> >
免批申请 免批
</a-checkable-tag> </a-checkable-tag>
</div> </div>
</div> </div>
</div> </div> -->
</div> </div>
</template> </template>
</div> </div>
<!-- 中心内容 -->
<searchResultList <searchResultList
v-show="resourceList.data && resourceList.data.length > 0" v-show="resourceList.data && resourceList.data.length > 0"
:key="listKey2" :key="listKey2"
@ -356,7 +368,6 @@
:resourceTotal="resourceTotal" :resourceTotal="resourceTotal"
:select-cardsname="Cardsname" :select-cardsname="Cardsname"
/> />
<!-- 分页 -->
<div class="pagination"> <div class="pagination">
<a-pagination <a-pagination
v-if="resourceList.data && resourceList.data.length > 0" v-if="resourceList.data && resourceList.data.length > 0"
@ -373,11 +384,33 @@
</div> </div>
<div <div
v-if="resourceList.data && resourceList.data.length <= 0" v-if="resourceList.data && resourceList.data.length <= 0"
style="margin-top: 200px" style="margin-top: 2rem"
> >
<a-empty /> <a-empty />
</div> </div>
</div> </div>
<div class="top" v-else-if="Cardsname === '基础设施'">
<div class="top-title">
<div
v-for="item in titleName"
:key="item.name"
:class="item.name === Cardsname ? 'sel' : ''"
@click="changeCards(item.name)"
>
<span
class="photo"
:style="{
backgroundImage: `url(${item.photo}) `,
backgroundSize: 'cover',
}"
></span>
<span>{{ item.name }}</span>
</div>
</div>
<div class="top-content-father">
<infrastructurePage />
</div>
</div>
<div class="top" v-else> <div class="top" v-else>
<div class="top-title"> <div class="top-title">
<div <div
@ -390,6 +423,7 @@
class="photo" class="photo"
:style="{ :style="{
backgroundImage: `url(${item.photo}) `, backgroundImage: `url(${item.photo}) `,
backgroundSize: 'cover',
}" }"
></span> ></span>
<span>{{ item.name }}</span> <span>{{ item.name }}</span>
@ -741,7 +775,13 @@
orderField: 'total', // total visits 访 applyCount score collectCount orderField: 'total', // total visits 访 applyCount score collectCount
orderType: 'DESC', // ASC DESC orderType: 'DESC', // ASC DESC
} }
//西
let paramsGetResources2 = ref({
regionId: '70be8c5b664f4bcf869d82f2e8335051',
pageNum: 1,
pageSize: currentPageSize.value,
name: '',
})
// //
const onSearch = () => { const onSearch = () => {
loading.value = true loading.value = true
@ -820,6 +860,12 @@
currentPage.value = 1 currentPage.value = 1
currentPageSize.value = 5 currentPageSize.value = 5
// //
paramsGetResources2.value = {
regionId: '70be8c5b664f4bcf869d82f2e8335051',
pageNum: 1,
pageSize: currentPageSize.value,
name: '',
}
paramsGetResources.districtId = '' paramsGetResources.districtId = ''
paramsGetResources.deptIds = [] paramsGetResources.deptIds = []
paramsGetResources.pageNum = 1 paramsGetResources.pageNum = 1
@ -955,12 +1001,18 @@
searchValue.value, searchValue.value,
searchValue.value.length searchValue.value.length
) )
if (searchValue.value.length >= 2) { if (
searchValue.value.length >= 2 &&
paramsGetResources.type !== '基础设施'
) {
str = searchValue.value.substring(0, 2) str = searchValue.value.substring(0, 2)
console.log('str================>', str) console.log('str================>', str)
r = re.test(str) r = re.test(str)
} }
if (searchValue.value.length > 1 && r) { if (
(searchValue.value.length > 1 && r) ||
paramsGetResources.type === '基础设施'
) {
//switchIndex //switchIndex
paramsGetResources.name = searchValue.value paramsGetResources.name = searchValue.value
paramsGetResources.type = Cardsname.value paramsGetResources.type = Cardsname.value
@ -1016,7 +1068,11 @@
loading.value = false loading.value = false
} }
}) })
} else if (paramsGetResources.type !== '数据资源') { } else if (
paramsGetResources.type !== '数据资源' &&
(paramsGetResources.type !== '基础设施' ||
!whoShow1.value.itShowXiHaiAn)
) {
if (switchIndex != '分页查询') { if (switchIndex != '分页查询') {
paramsGetResources.pageNum = 1 paramsGetResources.pageNum = 1
} }
@ -1038,6 +1094,16 @@
// getShoppingCartList(res.data.data.records) // getShoppingCartList(res.data.data.records)
} }
}) })
} else if (
paramsGetResources.type === '基础设施' &&
whoShow1.value.itShowXiHaiAn
) {
if (switchIndex != '分页查询') {
paramsGetResources.pageNum = 1
}
paramsGetResources2.value.pageNum = paramsGetResources.pageNum
paramsGetResources2.value.pageSize = paramsGetResources.pageSize
paramsGetResources2.value.name = paramsGetResources.name
} }
} else { } else {
message.error('请以两位以上汉字或数字开头') message.error('请以两位以上汉字或数字开头')
@ -1098,7 +1164,11 @@
loading.value = false loading.value = false
} }
}) })
} else if (paramsGetResources.type !== '数据资源') { } else if (
paramsGetResources.type !== '数据资源' &&
(paramsGetResources.type !== '基础设施' ||
!whoShow1.value.itShowXiHaiAn)
) {
if (switchIndex != '分页查询') { if (switchIndex != '分页查询') {
paramsGetResources.pageNum = 1 paramsGetResources.pageNum = 1
} }
@ -1116,6 +1186,15 @@
// getShoppingCartList(res.data.data.records) // getShoppingCartList(res.data.data.records)
} }
}) })
} else if (
paramsGetResources.type === '基础设施' ||
whoShow1.value.itShowXiHaiAn
) {
if (switchIndex != '分页查询') {
paramsGetResources.pageNum = 1
}
paramsGetResources2.value.pageNum = paramsGetResources.pageNum
paramsGetResources2.value.pageSize = paramsGetResources.pageSize
} }
} }
} }
@ -1141,6 +1220,10 @@
resourceList.data = list resourceList.data = list
}) })
} }
mybus.on('getCameraByParentId', (ids) => {
paramsGetResources2.value.regionId = ids
getAppResources()
})
mybus.on('paramsGetResources', (ids) => { mybus.on('paramsGetResources', (ids) => {
if (ids && ids.length > 0) { if (ids && ids.length > 0) {
paramsGetResources.deptIds = ids paramsGetResources.deptIds = ids
@ -1333,6 +1416,7 @@
detailsPageInfrastructureTree, detailsPageInfrastructureTree,
}, },
beforeUnmount() { beforeUnmount() {
mybus.off('getCameraByParentId')
mybus.off('selectCardsitem') mybus.off('selectCardsitem')
mybus.off('paramsGetResources') mybus.off('paramsGetResources')
mybus.off('changeCondition') mybus.off('changeCondition')

View File

@ -459,7 +459,17 @@
obj.system.push({ obj.system.push({
resourceId: sxt.idtCameraChannel + '', resourceId: sxt.idtCameraChannel + '',
resourceName: sxt.channelName, resourceName: sxt.channelName,
cameraId: sxt.channelId, cameraId: sxt.channelId, //
channelCode: sxt.channelCode,
channelId: sxt.channelId,
channelName: sxt.channelName,
checkStatus: sxt.checkStatus + '',
gpsX: sxt.gpsX,
gpsY: sxt.gpsY,
idtCameraChannel: sxt.idtCameraChannel + '',
nodeName: sxt.nodeName,
parentId: sxt.parentId,
status: sxt.status + '',
}) })
}) })
submitApply(obj).then((res) => { submitApply(obj).then((res) => {

View File

@ -122,6 +122,7 @@
import { mynotice } from '@/api/home' import { mynotice } from '@/api/home'
import { useStore } from 'vuex' import { useStore } from 'vuex'
import { getSgcTotal } from '@/api/home' import { getSgcTotal } from '@/api/home'
import Cookies from 'js-cookie'
import mybus from '@/myplugins/mybus' import mybus from '@/myplugins/mybus'
const store = useStore() const store = useStore()
const router = useRouter() const router = useRouter()
@ -201,12 +202,12 @@
path: '/capabilityCloud', path: '/capabilityCloud',
}) })
break break
case '开发指南': // case '':
router.push({ // router.push({
path: '/developmentGuide', // path: '/developmentGuide',
}) // })
break // break
case '指导手册': case '技术文档':
router.push({ router.push({
path: '/instructionManual', path: '/instructionManual',
}) })
@ -222,6 +223,7 @@
}) })
break break
case '后台管理': case '后台管理':
Cookies.remove('JSESSIONID')
window.open(window.SITE_CONFIG.backUrl + '/#/workBench-workBench') window.open(window.SITE_CONFIG.backUrl + '/#/workBench-workBench')
// window.reload('http://15.2.21.238:9797') // window.reload('http://15.2.21.238:9797')
break break

View File

@ -67,6 +67,16 @@
" "
/> />
</div> </div>
<div class="left"
style="display: flex;
align-items: center"
v-else-if="selectCardsname === '融合服务' && item.fuseAttrList && item.fuseAttrList.filter((val) => val.attrType == '服务图片')[0]">
<a-image
:width="106"
:preview="false"
:src="item.fuseAttrList.filter((val) => val.attrType == '服务图片')[0].attrValue"
/>
</div>
<div <div
class="left" class="left"
:class=" :class="
@ -135,7 +145,18 @@
</svg> </svg>
</span> </span>
<div class="header-right"> <div class="header-right">
<div> <div v-if="selectCardsname === '融合服务'"
class="label-content">
<template v-if="item.fuseAttrList && item.fuseAttrList.filter((val)=>val.attrType=='应用领域')[0]">
<span class="label"
v-for="(data, index) in item.fuseAttrList.filter((val)=>val.attrType=='应用领域')[0].attrValue.split(';')"
:key="index"
>
{{data}}
</span>
</template>
</div>
<div v-else>
发布时间 发布时间
<template v-if="item.createDate"> <template v-if="item.createDate">
<span> <span>
@ -936,6 +957,17 @@
div { div {
margin-right: 24px; margin-right: 24px;
} }
.label-content {
flex: 1;
display: flex;
justify-content: flex-end;
.label {
padding: 0.01rem 0.1rem;
margin-right: 0.1rem;
border-radius: 0.13rem;
background: #0087ff;
}
}
} }
.header-right:last-child { .header-right:last-child {
div { div {

View File

@ -93,10 +93,10 @@
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import { defineComponent, ref, watch } from 'vue' import { defineComponent, ref, watch } from 'vue'
import { getCameraAllOrgan } from '@/api/videoSurveillance' import { getCameraAllOrgan } from '@/api/videoSurveillance'
import { getCameraInfoByAreaId } from '@/api/file'
import mybus from '@/myplugins/mybus' import mybus from '@/myplugins/mybus'
import { useRouter } from 'vue-router' import { useRouter } from 'vue-router'
import { UpOutlined, DownOutlined } from '@ant-design/icons-vue' import { UpOutlined, DownOutlined } from '@ant-design/icons-vue'
@ -109,6 +109,7 @@
children: 'children', children: 'children',
title: 'name', title: 'name',
} }
const whoShow1 = ref(whoShow)
const showKey = ref(0) const showKey = ref(0)
const treeData = ref([]) const treeData = ref([])
const init = () => { const init = () => {
@ -126,11 +127,51 @@
router.currentRoute.value.query.select router.currentRoute.value.query.select
) )
if (select == '基础设施') { if (select == '基础设施') {
getCameraAllOrgan({ parentId: 'S4NbecfYB1DBH8HNULGS34' }).then( if (whoShow1.value && !whoShow1.value.itShowXiHaiAn) {
(res) => { getCameraAllOrgan({ parentId: 'S4NbecfYB1DBH8HNULGS34' }).then(
(res) => {
treeData.value = res.data.data
}
)
} else {
getCameraInfoByAreaId({
areaId: '70be8c5b664f4bcf869d82f2e8335051',
}).then((res) => {
treeData.value = res.data.data treeData.value = res.data.data
} })
) }
// selectDeptList({ type: select }).then((res) => {
// // console.log('=========================>', res.data.data)
// res.data.data.forEach((val) => {
// if (val.type !== '') {
// let obj = {
// title: val.type,
// total: val.total,
// show: val.type === '' ? true : false,
// select: false,
// key: val.type,
// children: [],
// }
// switch (val.type) {
// case '':
// case '':
// generateChildren(val, obj)
// break
// case '':
// generateChildren2(val, obj)
// break
// }
// treeData.value.push(obj)
// }
// })
// //
// const sortArr = ['', '', '', '', '']
// treeData.value.sort((a, b) => {
// return sortArr.indexOf(a.key) - sortArr.indexOf(b.key)
// })
// console.log('======================>', treeData.value)
// showKey.value++
// })
} }
} }
mybus.on('getDeptList', () => { mybus.on('getDeptList', () => {
@ -208,23 +249,40 @@
// } // }
const selectId = ref('') const selectId = ref('')
const onSelect = (item, val, child) => { const onSelect = (item, val, child) => {
debugger
console.log('item, val, child', child) console.log('item, val, child', child)
mybus.emit('getCameraByParentId', val.id) mybus.emit('getCameraByParentId', val.id)
mybus.emit('getListByParentId', val.id) mybus.emit('getListByParentId', val.id)
getCameraAllOrgan({ parentId: val.id }).then((res) => { if (whoShow1.value && !whoShow1.value.itShowXiHaiAn) {
treeData.value.map((treeDataItem, index) => { getCameraAllOrgan({ parentId: val.id }).then((res) => {
if (item.id == treeDataItem.id) { treeData.value.map((treeDataItem, index) => {
treeData.value[index].children.map((childItem, childIndex) => { if (item.id == treeDataItem.id) {
if (childItem.id == val.id) { treeData.value[index].children.map((childItem, childIndex) => {
treeData.value[index].children[childIndex].children = if (childItem.id == val.id) {
res.data.data treeData.value[index].children[childIndex].children =
} res.data.data
}) }
console.log('treeData.value.[index]', treeData.value[index]) })
} console.log('treeData.value.[index]', treeData.value[index])
}
})
}) })
}) } else {
getCameraInfoByAreaId({
areaId: val.id,
}).then((res) => {
treeData.value.map((treeDataItem, index) => {
if (item.id == treeDataItem.id) {
treeData.value[index].children.map((childItem, childIndex) => {
if (childItem.id == val.id) {
treeData.value[index].children[childIndex].children =
res.data.data
}
})
console.log('treeData.value.[index]', treeData.value[index])
}
})
})
}
if (child) { if (child) {
selectId.value = child.id selectId.value = child.id
} }
@ -273,14 +331,27 @@
} }
const showBottom = (item) => { const showBottom = (item) => {
item.show = !item.show item.show = !item.show
getCameraAllOrgan({ parentId: item.id }).then((res) => { if (whoShow1.value && !whoShow1.value.itShowXiHaiAn) {
treeData.value.map((treeDataItem, index) => { getCameraAllOrgan({ parentId: item.id }).then((res) => {
if (item.id == treeDataItem.id) { treeData.value.map((treeDataItem, index) => {
treeData.value[index].children = res.data.data if (item.id == treeDataItem.id) {
console.log('treeData.value.[index]', treeData.value[index]) treeData.value[index].children = res.data.data
} console.log('treeData.value.[index]', treeData.value[index])
}
})
}) })
}) } else {
getCameraInfoByAreaId({
areaId: item.id,
}).then((res) => {
treeData.value.map((treeDataItem, index) => {
if (item.id == treeDataItem.id) {
treeData.value[index].children = res.data.data
console.log('treeData.value.[index]', treeData.value[index])
}
})
})
}
} }
const showDown = (item, val) => { const showDown = (item, val) => {
console.log('showDown', val) console.log('showDown', val)

View File

@ -5,7 +5,13 @@
<div class="infrastructrue-tab"> <div class="infrastructrue-tab">
<div v-for="(item, index) in tabList" :key="index" class="tabBox"> <div v-for="(item, index) in tabList" :key="index" class="tabBox">
<b class="leftType">{{ item.title }}</b> <b class="leftType">{{ item.title }}</b>
<button @click="nullClick" v-if="item.title == '视频标签'">清空</button> <el-button
@click="nullClick"
v-if="item.title == '视频标签'"
type="small"
>
清空
</el-button>
<span <span
v-for="itemContent in item.content" v-for="itemContent in item.content"
:key="itemContent" :key="itemContent"
@ -93,7 +99,17 @@
> >
<template #bodyCell="{ column, record }"> <template #bodyCell="{ column, record }">
<template v-if="column.dataIndex === 'operation'"> <template v-if="column.dataIndex === 'operation'">
<a @click="openVideo(record.channelCode)">预览</a> <a
@click="
openVideo(
record.channelCode ||
record.channelId ||
record.channelCode.channelId
)
"
>
预览
</a>
</template> </template>
</template> </template>
</a-table> </a-table>
@ -125,9 +141,11 @@
getStreamByChannelCode, getStreamByChannelCode,
getCameraAllLabel, getCameraAllLabel,
} from '@/api/videoSurveillance' } from '@/api/videoSurveillance'
import { getCameraByCondition } from '@/api/file'
import { sgcInsert } from '@/api/home' import { sgcInsert } from '@/api/home'
import mybus from '@/myplugins/mybus' import mybus from '@/myplugins/mybus'
const router = useRouter() const router = useRouter()
const whoShow1 = ref(whoShow)
const options = reactive({ const options = reactive({
width: '700px', // width: '700px', //
height: '400px', // height: '400px', //
@ -216,7 +234,7 @@
const openVideo = (id) => { const openVideo = (id) => {
console.log('打开视频', id) console.log('打开视频', id)
const param = { const param = {
channelCode: id, key: id,
} }
getStreamByChannelCode(param).then((res) => { getStreamByChannelCode(param).then((res) => {
console.log(res) console.log(res)
@ -415,13 +433,44 @@
const getCamera = () => { const getCamera = () => {
console.log('初始化调用') console.log('初始化调用')
console.log('不选左侧树的时候不调用接口', mapSearchParam.value) console.log('不选左侧树的时候不调用接口', mapSearchParam.value)
// if (mapSearchParam.value.parentId) { if (!whoShow1.value.itShowXiHaiAn) {
getCameraByParentId(mapSearchParam.value).then((res) => { getCameraByParentId(mapSearchParam.value).then((res) => {
console.log('RRRRRRRRRR', res.data.data) console.log('RRRRRRRRRR', res.data.data)
dataSource.value = res.data.data dataSource.value = res.data.data
pagination.value.total = res.data.count pagination.value.total = res.data.count
}) })
// } } else {
let params = {
regionId:
mapSearchParam.value.parentId || '70be8c5b664f4bcf869d82f2e8335051',
pageNum: mapSearchParam.value.pageNum,
pageSize: mapSearchParam.value.pageSize,
name: mapSearchParam.value.cameraName || '',
longitude: mapSearchParam.value.gpsX || '',
atitude: mapSearchParam.value.gpsY || '',
radius: mapSearchParam.value.radius || '',
}
let paramsFather = ''
let i = 1
for (var key in params) {
if (params[key] === '') {
delete params[key]
} else {
if (i != 1) {
paramsFather += `&${key}=` + params[key]
i += 1
} else if (i == 1) {
paramsFather += `${key}=` + params[key]
i += 1
}
}
}
getCameraByCondition(paramsFather).then((res) => {
dataSource.value = res.data.data
pagination.value.total = res.data.count
console.log('根据parent查询摄像头', res.data.data)
})
}
} }
// //
const addShoppingCart = () => { const addShoppingCart = () => {
@ -469,14 +518,14 @@
message.warning('最多只能添加10个摄像头') message.warning('最多只能添加10个摄像头')
} else { } else {
selectedList.value.push(record) selectedList.value.push(record)
selectedRowKeys.value.push(record.channelCode) selectedRowKeys.value.push(record.channelCode || record.channelId)
} }
} else { } else {
selectedList.value = selectedList.value.filter( selectedList.value = selectedList.value.filter(
(item) => item.idtCameraChannel !== record.idtCameraChannel (item) => item.idtCameraChannel !== record.idtCameraChannel
) )
selectedRowKeys.value.splice( selectedRowKeys.value.splice(
selectedRowKeys.value.indexOf(record.channelCode), selectedRowKeys.value.indexOf(record.channelCode || record.channelId),
1 1
) )
} }
@ -488,7 +537,7 @@
if (selected) { if (selected) {
changeRows.map((val) => { changeRows.map((val) => {
selectedList.value.push(val) selectedList.value.push(val)
selectedRowKeys.value.push(val.channelCode) selectedRowKeys.value.push(val.channelCode || val.channelId)
}) })
if (selectedRowKeys.value.length > 10) { if (selectedRowKeys.value.length > 10) {
message.warning('最多只能添加10个摄像头') message.warning('最多只能添加10个摄像头')
@ -497,7 +546,7 @@
(item) => item.idtCameraChannel !== val.idtCameraChannel (item) => item.idtCameraChannel !== val.idtCameraChannel
) )
selectedRowKeys.value.splice( selectedRowKeys.value.splice(
selectedRowKeys.value.indexOf(val.channelCode), selectedRowKeys.value.indexOf(val.channelCode || val.channelId),
1 1
) )
}) })
@ -508,7 +557,7 @@
(item) => item.idtCameraChannel !== val.idtCameraChannel (item) => item.idtCameraChannel !== val.idtCameraChannel
) )
selectedRowKeys.value.splice( selectedRowKeys.value.splice(
selectedRowKeys.value.indexOf(val.channelCode), selectedRowKeys.value.indexOf(val.channelCode || val.channelId),
1 1
) )
}) })
@ -549,7 +598,8 @@
padding: 0 0.08rem; padding: 0 0.08rem;
} }
.leftType { .leftType {
margin: 0.1rem 0; margin: 0.2rem 0;
margin-right: 0.06rem;
} }
.down { .down {
background: #0087ff; background: #0087ff;

View File

@ -3,6 +3,17 @@
<div class="details-pageconetent"> <div class="details-pageconetent">
<home-header></home-header> <home-header></home-header>
<div class="top"> <div class="top">
<div class="top-title">
全部
<div
v-for="(item, index) in titleName"
:key="index"
class="tabAll"
@click="changeCards(index)"
:class="{ sel: index == number }">
<span>{{ item.name }}</span>
</div>
</div>
<div class="resultListSearchInput-father"> <div class="resultListSearchInput-father">
<div class="resultListSearchInput-son"> <div class="resultListSearchInput-son">
模糊搜索 模糊搜索
@ -75,6 +86,17 @@
const resourceList = reactive({ data: [] }) const resourceList = reactive({ data: [] })
const resourceTotal = ref(0) const resourceTotal = ref(0)
const current = ref(1) const current = ref(1)
//
const titleName = ref([
{
name: '打包模式',
},
{
name: '赋能场景',
},
])
const number = ref(0)
// //
let listKey = ref(0) let listKey = ref(0)
// //
@ -84,12 +106,18 @@
const paramsGetResources = { const paramsGetResources = {
pageNum: 1, pageNum: 1,
pageSize: currentPageSize.value, pageSize: currentPageSize.value,
type: Cardsname.value, type: titleName.value[number.value].name,
name: '', name: '',
orderField: 'create_date', // total visits 访 applyCount score collectCount orderField: 'create_date', // total visits 访 applyCount score collectCount
orderType: 'DESC', // ASC DESC orderType: 'DESC', // ASC DESC
} }
const changeCards = (val) => {
console.log(val)
number.value = val
chongzhi()
}
// //
const onSearch = () => { const onSearch = () => {
loading.value = true loading.value = true
@ -109,7 +137,7 @@
paramsGetResources.orderField = 'create_date' paramsGetResources.orderField = 'create_date'
paramsGetResources.orderType = 'DESC' paramsGetResources.orderType = 'DESC'
mybus.emit('chongzhi', { mybus.emit('chongzhi', {
type: '融合服务', type: titleName.value[number.value].name,
}) })
getAppResources() getAppResources()
} }
@ -126,6 +154,7 @@
orderField: paramsGetResources.orderField, orderField: paramsGetResources.orderField,
orderType: paramsGetResources.orderType, orderType: paramsGetResources.orderType,
name: searchValue.value, name: searchValue.value,
type: titleName.value[number.value].name,
} }
getIntegrationServicesList(postData).then( getIntegrationServicesList(postData).then(
(res) => { (res) => {
@ -211,6 +240,9 @@
pageSizeOptions, pageSizeOptions,
current, current,
loading, loading,
titleName,
changeCards,
number,
} }
}, },
components: { components: {
@ -323,6 +355,26 @@
background: #f3f5f9; background: #f3f5f9;
padding-bottom: 0.6rem; padding-bottom: 0.6rem;
} }
.top-title {
padding: 0.2rem;
display: flex;
font-size: 22px;
.tabAll {
font-size: 22px;
color: #000000;
margin-right: 35px;
cursor: pointer;
}
.tabAll:nth-child(1) {
margin-left: 20px;
}
.sel {
font-weight: 600;
color: #0087ff;
border-bottom: 0.02rem solid #0087ff;
}
}
} }
} }

View File

@ -8,16 +8,23 @@
</div> </div>
<div class="searchPoint"> <div class="searchPoint">
<el-autocomplete <el-autocomplete
v-model="address" v-model="address"
placeholder="请输入地址" placeholder="请输入地址"
clearable :fetch-suggestions="
:fetch-suggestions="((queryString,cb) =>{searchAddressByKeyWord(queryString,cb,i)})" (queryString, cb) => {
:trigger-on-focus="false" searchAddressByKeyWord(queryString, cb, i)
:popper-append-to-body="false" }
class="address-auto-complete-input" "
@select="((addressItem) =>{selectedAddress(addressItem,i)})" :trigger-on-focus="false"
/> :popper-append-to-body="false"
class="address-auto-complete-input"
@select="
(addressItem) => {
selectedAddress(addressItem, i)
}
"
/>
<!-- <el-autocomplete <!-- <el-autocomplete
class="inline-input" class="inline-input"
prefix-icon="Search" prefix-icon="Search"
@ -68,7 +75,7 @@
</template> </template>
<script> <script>
import { message } from 'ant-design-vue'; import { message } from 'ant-design-vue'
import { HieimpMap } from '@/supermap/map-init' import { HieimpMap } from '@/supermap/map-init'
import TiledMap from './components/tiledMap' import TiledMap from './components/tiledMap'
import { createCameraDetailsPop } from '@/supermap/createMarkerPopup' import { createCameraDetailsPop } from '@/supermap/createMarkerPopup'
@ -83,6 +90,7 @@
selectByLabelName, selectByLabelName,
selectByChannelName, selectByChannelName,
} from '@/api/videoSurveillance' } from '@/api/videoSurveillance'
import { getCameraByCondition } from '@/api/file'
import mybus from '@/myplugins/mybus' import mybus from '@/myplugins/mybus'
export default { export default {
@ -106,6 +114,7 @@
circleModeFlag: false, circleModeFlag: false,
addressMatchUrl: '', addressMatchUrl: '',
address: '', address: '',
whoShow1: whoShow,
mapSearchParam: { mapSearchParam: {
// //
parentId: '', parentId: '',
@ -114,8 +123,8 @@
pageSize: '20000', pageSize: '20000',
gpsX: '', gpsX: '',
gpsY: '', gpsY: '',
radius: '' radius: '',
} },
} }
}, },
components: { components: {
@ -135,8 +144,8 @@
this.hiMap.mapObj, this.hiMap.mapObj,
this.hiMapFun this.hiMapFun
) )
this.hiMap.mapObj.map.flyTo({ lat: 36.06, lng: 120.3899 }, 16) // this.hiMap.mapObj.map.flyTo({ lat: 36.06, lng: 120.3899 }, 16)
this.addressMatchUrl = window.SITE_CONFIG.POI_URL; this.addressMatchUrl = window.SITE_CONFIG.POI_URL
// //
this.initAddressMatchService() this.initAddressMatchService()
this.getCameraAllLabel() this.getCameraAllLabel()
@ -146,72 +155,113 @@
// parentId // parentId
mybus.off('getCameraByParentId') mybus.off('getCameraByParentId')
mybus.on('getCameraByParentId', (parentId) => { mybus.on('getCameraByParentId', (parentId) => {
this.mapSearchParam.parentId = parentId this.mapSearchParam.parentId = parentId
this.getCameraByParentId() this.getCameraByParentId()
}) })
}, },
methods: { methods: {
selectedAddress(item,index) { selectedAddress(item, index) {
// //
console.log('跳转', item) console.log('跳转', item)
const latLng = { const latLng = {
lat: item.location.y, lat: item.location.y,
lng: item.location.x lng: item.location.x,
} }
this.hiMapFun.mapFlyTo(latLng) this.hiMapFun.mapFlyTo(latLng)
}, },
// //
circleSelectResource() { circleSelectResource() {
L.drawLocal.draw.handlers.circle.tooltip.start = '请圈选区域'; L.drawLocal.draw.handlers.circle.tooltip.start = '请圈选区域'
L.drawLocal.draw.handlers.circle.radius = '半径'; L.drawLocal.draw.handlers.circle.radius = '半径'
L.drawLocal.draw.handlers.circle.tooltip.end = '松开绘制完成'; L.drawLocal.draw.handlers.circle.tooltip.end = '松开绘制完成'
this.hiMap.mapObj.map.off('draw:created'); this.hiMap.mapObj.map.off('draw:created')
this.hiMap.mapObj.drawCircle.enable(); this.hiMap.mapObj.drawCircle.enable()
this.hiMap.mapObj.map.once('draw:created', (e) => { this.hiMap.mapObj.map.once('draw:created', (e) => {
const type = e.layerType; const type = e.layerType
const circleLayer = e.layer; const circleLayer = e.layer
if (type === 'circle') { if (type === 'circle') {
const radius = (e.layer._mRadius) const radius = e.layer._mRadius
if (radius > 5000) { if (radius > 5000) {
message.info('最大支持5km范围的圈选') message.info('最大支持5km范围的圈选')
} else { } else {
const circlePloygonLayer = this.multiScreenFun.createCircleLayer(circleLayer); const circlePloygonLayer =
this.hiMap.mapObj.featureGroup.addLayer(circlePloygonLayer); this.multiScreenFun.createCircleLayer(circleLayer)
this.hiMap.mapObj.layerGroup.set('circlePloygonLayer', circlePloygonLayer); this.hiMap.mapObj.featureGroup.addLayer(circlePloygonLayer)
console.log('查询图层为何发生了改变', e.layer); this.hiMap.mapObj.layerGroup.set(
this.mapSearchParam.gpsX = e.layer._latlng.lng 'circlePloygonLayer',
this.mapSearchParam.gpsY = e.layer._latlng.lat circlePloygonLayer
this.mapSearchParam.radius = radius )
const params = { console.log('查询图层为何发生了改变', e.layer)
gpsX: this.mapSearchParam.gpsX, this.mapSearchParam.gpsX = e.layer._latlng.lng
gpsY: this.mapSearchParam.gpsY, this.mapSearchParam.gpsY = e.layer._latlng.lat
radius: radius this.mapSearchParam.radius = radius
const params = {
gpsX: this.mapSearchParam.gpsX,
gpsY: this.mapSearchParam.gpsY,
radius: radius,
}
mybus.emit('getListByMap', params)
this.getCameraByParentId()
} }
mybus.emit('getListByMap', params)
this.getCameraByParentId()
} }
} })
}); },
}, getCameraByParentId() {
getCameraByParentId() { if (!this.whoShow1.itShowXiHaiAn) {
debugger
getCameraByParentId(this.mapSearchParam).then((res) => { getCameraByParentId(this.mapSearchParam).then((res) => {
debugger
console.log('根据parent查询摄像头', res.data.data) console.log('根据parent查询摄像头', res.data.data)
this.addResourceTomap('videoMap', res.data.data) this.addResourceTomap('videoMap', res.data.data)
}) })
} else {
let params = {
regionId:
this.mapSearchParam.parentId ||
'70be8c5b664f4bcf869d82f2e8335051',
pageNum: this.mapSearchParam.pageNum,
pageSize: this.mapSearchParam.pageSize,
name: this.mapSearchParam.cameraName || '',
longitude: this.mapSearchParam.gpsX || '',
atitude: this.mapSearchParam.gpsY || '',
radius: this.mapSearchParam.radius || '',
}
let paramsFather = ''
let i = 1
for (var key in params) {
if (params[key] === '') {
delete params[key]
} else {
if (i != 1) {
paramsFather += `&${key}=` + params[key]
i += 1
} else if (i == 1) {
paramsFather += `${key}=` + params[key]
i += 1
}
}
}
getCameraByCondition(paramsFather).then((res) => {
console.log('根据parent查询摄像头', res.data.data)
this.addResourceTomap('videoMap', res.data.data)
})
}
}, },
// //
initAddressMatchService() { initAddressMatchService() {
this.L = window.L || {}; this.L = window.L || {}
this.addressMatchService = L.supermap.addressMatchService(this.addressMatchUrl); this.addressMatchService = L.supermap.addressMatchService(
this.addressMatchUrl
)
}, },
circleMode() { circleMode() {
// //
this.circleModeFlag = !this.circleModeFlag this.circleModeFlag = !this.circleModeFlag
if(this.circleModeFlag){ if (this.circleModeFlag) {
// //
this.circleSelectResource() this.circleSelectResource()
}else { } else {
// //
this.hiMapFun.removeLayerByLayerName('circlePloygonLayer') this.hiMapFun.removeLayerByLayerName('circlePloygonLayer')
// //
@ -220,38 +270,37 @@
this.mapSearchParam.radius = '' this.mapSearchParam.radius = ''
this.getCameraByParentId() this.getCameraByParentId()
const params = { const params = {
gpsX: this.mapSearchParam.gpsX, gpsX: this.mapSearchParam.gpsX,
gpsY: this.mapSearchParam.gpsY, gpsY: this.mapSearchParam.gpsY,
radius: this.mapSearchParam.radius radius: this.mapSearchParam.radius,
} }
mybus.emit('getListByMap', params) mybus.emit('getListByMap', params)
} }
}, },
// //
async searchAddressByKeyWord(queryString, cb, indexX) { async searchAddressByKeyWord(queryString, cb, indexX) {
this.disasterPointIndex = indexX; this.disasterPointIndex = indexX
/* const res = await bdPlaceSearch({ searchKey: queryString }); /* const res = await bdPlaceSearch({ searchKey: queryString });
if (res.data) { if (res.data) {
for(var i=0;i<res.data.length;i++){ for(var i=0;i<res.data.length;i++){
res.data[i].value = res.data[i].name; res.data[i].value = res.data[i].name;
} }
cb(res.data); cb(res.data);
}*/ }*/
const match = function(obj) { const match = function (obj) {
//console.log('ooooo',obj); //console.log('ooooo',obj);
obj.result.map(item => { obj.result.map((item) => {
item.value = item.address; item.value = item.address
}); })
cb(obj.result); cb(obj.result)
}; }
if (!queryString) { if (!queryString) {
cb([]); cb([])
} else { } else {
var geoCodeParam = new SuperMap.GeoCodingParameter({ var geoCodeParam = new SuperMap.GeoCodingParameter({
'address': queryString, address: queryString,
}); })
this.addressMatchService.code(geoCodeParam, match); this.addressMatchService.code(geoCodeParam, match)
} }
}, },
getCameraAllPage(page) { getCameraAllPage(page) {
@ -268,9 +317,7 @@
// console.log("#############" + (t2 - t1)); // console.log("#############" + (t2 - t1));
}) })
}, },
getCameraAllLabel() { getCameraAllLabel() {},
},
tabChange(item) { tabChange(item) {
if (this.checkboxGroup.indexOf(item.labelName) !== -1) { if (this.checkboxGroup.indexOf(item.labelName) !== -1) {
if (item.labelName == '全部') { if (item.labelName == '全部') {
@ -488,26 +535,26 @@
} }
</style> </style>
<style lang="less"> <style lang="less">
.ucs-leaflet-map { .ucs-leaflet-map {
.iclient-leaflet-logo { .iclient-leaflet-logo {
display: none; display: none;
}
.leaflet-control-attribution {
display: none;
}
svg {
position: absolute;
bottom: 0.1rem;
right: 0.1rem;
z-index: 1001;
cursor: pointer;
}
.address-auto-complete-input {
width: 2.4rem;
}
::v-deep.el-autocomplete .el-popper {
width: auto !important;
max-width: 2.4rem;
}
} }
.leaflet-control-attribution {
display: none;
}
svg {
position: absolute;
bottom: 0.1rem;
right: 0.1rem;
z-index: 1001;
cursor: pointer;
}
.address-auto-complete-input {
width: 2.4rem;
}
::v-deep.el-autocomplete .el-popper{
width: auto !important;
max-width: 2.4rem;
}
}
</style> </style>

View File

@ -2,7 +2,7 @@
* @Author: hisense.liangjunhua * @Author: hisense.liangjunhua
* @Date: 2022-06-21 11:55:07 * @Date: 2022-06-21 11:55:07
* @LastEditors: hisense.liangjunhua * @LastEditors: hisense.liangjunhua
* @LastEditTime: 2022-07-21 17:05:11 * @LastEditTime: 2022-07-27 15:57:26
* @Description: 告诉大家这是什么 * @Description: 告诉大家这是什么
--> -->
<template> <template>
@ -105,6 +105,7 @@
v-model:pageSize="pageSize" v-model:pageSize="pageSize"
:total="total" :total="total"
show-less-items show-less-items
:show-size-changer="false"
@change="changePageNum" @change="changePageNum"
/> />
</div> </div>

View File

@ -65,7 +65,7 @@
v-for="(item, index) in zsList" v-for="(item, index) in zsList"
:key="item.id" :key="item.id"
:class="index == 4 ? 'name-last' : ''" :class="index == 4 ? 'name-last' : ''"
@click="selectOne(item.id)" @click="openHref(item)"
> >
{{ index + 1 }}-{{ item.name }} {{ index + 1 }}-{{ item.name }}
</div> </div>
@ -84,6 +84,7 @@
import { ref, reactive } from 'vue' import { ref, reactive } from 'vue'
import { useRouter } from 'vue-router' import { useRouter } from 'vue-router'
import { useStore } from 'vuex' import { useStore } from 'vuex'
import { updateVisits, browsingInsert } from '@/api/home'
import mybus from '@/myplugins/mybus' import mybus from '@/myplugins/mybus'
const store = useStore() const store = useStore()
const router = useRouter() const router = useRouter()
@ -193,6 +194,31 @@
} }
} }
} }
const openHref = (item) => {
console.log(item.id, 'wowowo')
console.log(item.visits, 'wowowo')
browsingInsert({ resourceId: item.id }).then((res) => {
// console.log(res)
})
const arrList = ref([])
arrList.value = JSON.parse(window.sessionStorage.getItem('visits'))
if (arrList.value.indexOf(item.id) === -1) {
arrList.value.push(item.id)
updateVisits({
id: item.id,
visits: item.visits || '0',
}).then(() => {
window.sessionStorage.setItem('visits', JSON.stringify(arrList.value))
})
}
window.open(item.link)
// window.open(
// window.SITE_CONFIG.previewUrl +
// 'hisense_office/onlinePreview?url=' +
// btoa(encodeURI(item.fileHref))
// )
}
const assignmentMethod = (type, res) => { const assignmentMethod = (type, res) => {
object[type] = res.data.data.total object[type] = res.data.data.total
// interfaceSuccess.value++ // interfaceSuccess.value++

View File

@ -38,7 +38,7 @@
{ name: '共享门户', key: 'home' }, { name: '共享门户', key: 'home' },
{ name: '能力集市', key: 'DetailsPageconetent' }, { name: '能力集市', key: 'DetailsPageconetent' },
{ name: '能力统计', key: 'abilityStatistics' }, { name: '能力统计', key: 'abilityStatistics' },
{ name: '开发指南', key: 'developmentGuide' }, { name: '技术文档', key: 'developmentGuide' },
{ name: '需求中心', key: 'demandCenter' }, { name: '需求中心', key: 'demandCenter' },
{ name: '个人中心', key: 'personalCenter' }, { name: '个人中心', key: 'personalCenter' },
{ name: '后台管理', key: 'houtaiguanli' }, { name: '后台管理', key: 'houtaiguanli' },
@ -85,7 +85,7 @@
}, },
}) })
break break
case '开发指南': case '技术文档':
router.push({ router.push({
path: '/developmentGuide', path: '/developmentGuide',
}) })

View File

@ -2,7 +2,7 @@
* @Author: hisense.wuhongjian * @Author: hisense.wuhongjian
* @Date: 2022-04-19 17:18:48 * @Date: 2022-04-19 17:18:48
* @LastEditors: hisense.wuhongjian * @LastEditors: hisense.wuhongjian
* @LastEditTime: 2022-07-18 16:40:21 * @LastEditTime: 2022-07-27 10:34:02
* @Description: markdown编辑器 * @Description: markdown编辑器
--> -->
<template> <template>
@ -44,10 +44,27 @@
} }
}, },
created() { created() {
console.log('2222', this.route.currentRoute.query)
// const keyId = this.route.currentRoute.value.query.id
// this.uuidSplice() // this.uuidSplice()
// 1. 2.
console.log('111111111', this.newDateForm)
this.getDevelopmentFile() this.getDevelopmentFile()
}, },
computed: {
newDateForm() {
if (this.dataFrom && this.dataFrom.type) {
return this.dataFrom
} else {
return {
id: this.route.currentRoute.query.id,
type: this.route.currentRoute.query.type,
}
}
},
},
methods: { methods: {
// uuid
uuid(len, radix) { uuid(len, radix) {
var chars = var chars =
'0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz' '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'
@ -86,6 +103,7 @@
this.uuidSnum = this.uuidSnum.replace(/\s+/g, '') this.uuidSnum = this.uuidSnum.replace(/\s+/g, '')
console.log('this.uuidOne', this.uuidSnum) console.log('this.uuidOne', this.uuidSnum)
}, },
//
async saveText(file) { async saveText(file) {
// console.log('', e) // console.log('', e)
// const jsonStr = JSON.stringify(e) // const jsonStr = JSON.stringify(e)
@ -97,7 +115,7 @@
} }
let myfile = new File([blob], this.uuidSnum + '.md') let myfile = new File([blob], this.uuidSnum + '.md')
var formData = new FormData() var formData = new FormData()
const type = pinyin(this.dataFrom.type, { const type = pinyin(this.newDateForm.type, {
pattern: 'initial', pattern: 'initial',
}).replace(/\s*/g, '') }).replace(/\s*/g, '')
formData.append('fileName', this.uuidSnum + '.md') formData.append('fileName', this.uuidSnum + '.md')
@ -120,19 +138,24 @@
message.error('保存失败') message.error('保存失败')
} }
}, },
//
async getDevelopmentFile() { async getDevelopmentFile() {
debugger debugger
const uuidParam = this.dataFrom.infoList.filter((item) => {
if (item.attrType === '技术文档') {
return item
}
})
let uuid = '' let uuid = ''
if (uuidParam[0].attrValue) { if (this.newDateForm.id) {
uuid = uuidParam[0].attrValue.split('/')[1].split('.')[0] uuid = this.newDateForm.id
} else {
const uuidParam = this.newDateForm.infoList.filter((item) => {
if (item.attrType === '技术文档') {
return item
}
})
if (uuidParam[0].attrValue) {
uuid = uuidParam[0].attrValue.split('/')[1].split('.')[0]
}
} }
this.uuidSnum = uuid this.uuidSnum = uuid
const type = pinyin(this.dataFrom.type, { const type = pinyin(this.newDateForm.type, {
pattern: 'initial', pattern: 'initial',
}).replace(/\s*/g, '') }).replace(/\s*/g, '')
console.log(type) console.log(type)
@ -142,12 +165,6 @@
} }
const res = await getDevelopmentFile(param) const res = await getDevelopmentFile(param)
this.text = res.data this.text = res.data
// let infoList = {
// attrType: '',
// attrValue: this.text.data,
// delFlag: 0,
// }
// mybus.emit('chageDataFrom', infoList)
console.log('res', res) console.log('res', res)
}, },
}, },
@ -156,5 +173,9 @@
<style scoped> <style scoped>
.md-fullscreen { .md-fullscreen {
z-index: 10; z-index: 10;
color: initial;
font-size: initial;
line-height: initial;
text-align: initial;
} }
</style> </style>

View File

@ -484,7 +484,7 @@
del() del()
}) })
onBeforeUnmount(() => { onBeforeUnmount(() => {
mybus.off('tabsChange') mybus.off('Cancellation')
mybus.off('Determine') mybus.off('Determine')
}) })
const reason = ref('') const reason = ref('')

View File

@ -108,20 +108,23 @@
> >
<template #title> <template #title>
<div> <div>
<span <a-tooltip>
@click=" <template #title>{{ item.resourceName }}</template>
showItem( <span
item.resourceId, @click="
item.type, showItem(
item.delFlag, item.resourceId,
item.note1 item.type,
) item.delFlag,
" item.note1
style="cursor: pointer" )
class="name" "
> style="cursor: pointer"
{{ item.resourceName }} class="name"
</span> >
{{ item.resourceName }}
</span>
</a-tooltip>
<span class="type">{{ item.type }}</span> <span class="type">{{ item.type }}</span>
</div> </div>
<span class="time"> <span class="time">
@ -312,18 +315,18 @@
// ) // )
let scArr = [] let scArr = []
if (checkedListAbility.value.length === 0) { if (checkedListAbility.value.length === 0) {
message.error('请选择需要收藏的数据') message.warning('请选择需要收藏的数据')
} else { } else {
list.value.forEach((val) => { list.value.forEach((val) => {
if (val.children) { if (val.children) {
val.children.map((item) => { val.children.map((item) => {
if (item.resourceId == '8888888880000000001') { if (
message.warning('摄像头无法添加收藏!') checkedListAbility.value.indexOf(item.id) > -1 &&
} else { item.delFlag == 0
if ( ) {
checkedListAbility.value.indexOf(item.id) > -1 && if (item.resourceId == '8888888880000000001') {
item.delFlag == 0 message.warning('摄像头无法添加收藏!')
) { } else {
scArr.push({ resourceId: item.resourceId }) scArr.push({ resourceId: item.resourceId })
} }
} }
@ -338,7 +341,7 @@
} }
}) })
} else { } else {
message.error('下架的数据无法收藏') message.warning('下架的数据无法收藏')
} }
} }
} }
@ -750,7 +753,7 @@
// //
const delList = () => { const delList = () => {
if (checkedListAbility.value.length == 0) { if (checkedListAbility.value.length == 0) {
message.error('请先选择需要操作的数据!') message.warning('请先选择需要操作的数据!')
} else { } else {
sgcDel({ sgcDel({
ids: checkedListAbility.value, ids: checkedListAbility.value,
@ -807,30 +810,34 @@
} }
// //
const apply = () => { const apply = () => {
// list.value.forEach((val) => {
// if (checkedList.value.indexOf(val.deptId) !== -1) {
// if (val.delFlag != 0) {
// checkedList.value.splice(checkedList.value.indexOf(val.deptId), 1)
// val.checked = false
// message.error('')
// }
// }
// })
if (checkedListAbility.value.length == 0) { if (checkedListAbility.value.length == 0) {
message.error('请先选择需要申请的数据!') message.warning('请先选择需要申请的数据!')
} else { } else {
let arr = [] let arr = []
let delArr = []
list.value.map((val) => { list.value.map((val) => {
val.arr = val.children.filter( val.arr = val.children.filter((item) => {
(item) => checkedListAbility.value.indexOf(item.id) > -1 console.log('选择的数据=============>', item)
) if (checkedListAbility.value.indexOf(item.id) > -1) {
if (item.delFlag == 0) {
return item
} else {
delArr.push(item)
}
}
})
}) })
arr = list.value.filter((val) => val.arr.length !== 0) arr = list.value.filter((val) => val.arr.length !== 0)
console.log('一键申请===================>', arr) if (delArr.length > 0) {
localStorage.setItem('applyList', JSON.stringify(arr)) message.warning('已经下架的能力无法申请!')
router.push({ }
path: '/apply', if (arr.length > 0) {
}) console.log('一键申请===================>', arr)
localStorage.setItem('applyList', JSON.stringify(arr))
router.push({
path: '/apply',
})
}
} }
} }
</script> </script>
@ -969,6 +976,14 @@
color: #0087ff; color: #0087ff;
} }
} }
.name {
max-width: 4.15rem;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
-o-text-overflow: ellipsis;
word-break: break-all;
}
.name:hover { .name:hover {
color: #0087ff; color: #0087ff;
} }
@ -1044,5 +1059,10 @@
:deep(.ant-list-item-meta-title) { :deep(.ant-list-item-meta-title) {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center;
div {
display: flex;
align-items: center;
}
} }
</style> </style>