Merge branch 'hi-ucs-dev' of http://124.222.94.39:3001/wuhongjian/hi-ucs into hi-ucs-dev
# Conflicts: # front/src/views/home/components/searchResultList.vue
|
@ -1 +1,6 @@
|
|||
back/dist-西海岸-后台管理.zip
|
||||
back/public/index.html
|
||||
back/dist-西海岸-后台管理-带配置文件.zip
|
||||
back/dist-市局-后台管理-带配置文件.zip
|
||||
back/dist-包头-后台管理.zip
|
||||
back/dist-市局-后台管理.zip
|
||||
|
|
|
@ -56,6 +56,7 @@
|
|||
"@vue/cli-service": "^4.4.6",
|
||||
"@vue/eslint-config-standard": "^5.1.2",
|
||||
"babel-eslint": "^10.1.0",
|
||||
"crypto-js": "^4.1.1",
|
||||
"element-theme-chalk": "^2.13.2",
|
||||
"eslint": "^7.5.0",
|
||||
"eslint-plugin-import": "^2.22.0",
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<!--
|
||||
* @Author: hisense.wuhongjian
|
||||
* @Date: 2022-04-11 10:11:40
|
||||
* @LastEditors: hisense.wuhongjian
|
||||
* @LastEditTime: 2022-06-13 11:21:09
|
||||
* @LastEditors: hisense.liangjunhua
|
||||
* @LastEditTime: 2022-06-23 18:30:45
|
||||
* @Description: 告诉大家这是什么
|
||||
-->
|
||||
<!DOCTYPE html>
|
||||
|
@ -27,9 +27,10 @@
|
|||
'isTab': true, // 是否通过tab展示内容?
|
||||
'iframeURL': '' // 是否通过iframe嵌套展示内容? (以http[s]://开头, 自动匹配)
|
||||
};
|
||||
// window.SITE_CONFIG['frontUrl'] = 'http://15.2.21.238:9796/#/vueTemplateDemo';
|
||||
window.SITE_CONFIG['frontUrl'] = 'http://15.2.21.238: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['menuList'] = []; // 左侧菜单列表(后台返回,未做处理)
|
||||
window.SITE_CONFIG['permissions'] = []; // 页面按钮操作权限(后台返回,未做处理)
|
||||
window.SITE_CONFIG['dynamicRoutes'] = []; // 动态路由列表
|
||||
|
@ -41,7 +42,8 @@
|
|||
<% if (process.env.VUE_APP_NODE_ENV === 'dev') { %>
|
||||
<script>
|
||||
// window.SITE_CONFIG['apiURL'] = 'http://15.2.21.166:8888/renren-admin';
|
||||
window.SITE_CONFIG['apiURL'] = 'http://15.2.21.238:8888/renren-admin';
|
||||
window.SITE_CONFIG['apiURL'] = 'http://124.222.94.39:8888/renren-admin';
|
||||
// window.SITE_CONFIG['apiURL'] = 'http://15.2.21.238:8888/renren-admin';
|
||||
// window.SITE_CONFIG['apiURL'] = 'http://15.2.23.141:8000/renren-admin';
|
||||
// WebSocket地址
|
||||
window.SITE_CONFIG['socketURL'] ='ws://localhost:8080/renren-admin/websocket';
|
||||
|
@ -70,7 +72,9 @@
|
|||
// window.SITE_CONFIG['apiURL'] = 'http://124.222.94.39:8888/renren-admin';
|
||||
|
||||
// window.SITE_CONFIG['apiURL'] = 'http://15.2.21.238:8888/renren-admin';
|
||||
window.SITE_CONFIG['apiURL'] = 'http://15.72.183.90:8000/renren-admin';
|
||||
window.SITE_CONFIG['apiURL'] = 'http://124.222.94.39:8888/renren-admin';
|
||||
// window.SITE_CONFIG['apiURL'] = 'http://15.72.183.90:8000/renren-admin';
|
||||
// window.SITE_CONFIG['apiURL'] = 'http://10.134.135.9:8888/renren-admin';
|
||||
// WebSocket地址
|
||||
window.SITE_CONFIG['socketURL'] ='ws://localhost:8080/renren-admin/websocket';
|
||||
</script>
|
||||
|
|
After Width: | Height: | Size: 2.0 KiB |
After Width: | Height: | Size: 40 KiB |
After Width: | Height: | Size: 3.1 KiB |
After Width: | Height: | Size: 32 KiB |
|
@ -0,0 +1,97 @@
|
|||
<!--
|
||||
* @Author: hisense.wuhongjian
|
||||
* @Date: 2022-04-11 16:30:04
|
||||
* @LastEditors: hisense.wuhongjian
|
||||
* @LastEditTime: 2022-06-06 13:14:02
|
||||
* @Description: 告诉大家这是什么
|
||||
-->
|
||||
<template>
|
||||
<div shadow="never" class="aui-card--fill">
|
||||
<!-- 流转详情 -->
|
||||
<h3 class="titleH3">{{ $t('process.circulation') }}</h3>
|
||||
<div class="mod-sys__dict">
|
||||
<el-table
|
||||
v-loading="dataListLoading"
|
||||
:data="dataList"
|
||||
border
|
||||
@selection-change="dataListSelectionChangeHandle"
|
||||
@sort-change="dataListSortChangeHandle"
|
||||
style="width: 100%;">
|
||||
<!-- 任务名称 -->
|
||||
<el-table-column prop="activityName" :label="$t('process.taskName')" header-align="center" align="center"></el-table-column>
|
||||
<!-- 处理人 -->
|
||||
<el-table-column prop="assigneeName" :label="$t('process.assignee')" header-align="center" align="center"></el-table-column>
|
||||
<!-- 流程开始时间 -->
|
||||
<el-table-column prop="startTime" :label="$t('task.startTime')" header-align="center" align="center"></el-table-column>
|
||||
<!-- 流程结束时间 -->
|
||||
<el-table-column prop="endTime" :label="$t('task.endTime')" header-align="center" align="center"></el-table-column>
|
||||
<!-- 审核意见 -->
|
||||
<el-table-column prop="comment" :label="$t('process.comment')" header-align="center" align="center"></el-table-column>
|
||||
<!-- 任务时长(秒) -->
|
||||
<el-table-column prop="durationInSeconds" :label="$t('task.durationInSeconds')" header-align="center" align="center" width="180"></el-table-column>
|
||||
</el-table>
|
||||
<el-pagination
|
||||
v-if="dataForm.pid === '0'"
|
||||
:current-page="page"
|
||||
:page-sizes="[10, 20, 50, 100]"
|
||||
:page-size="limit"
|
||||
:total="total"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="pageSizeChangeHandle"
|
||||
@current-change="pageCurrentChangeHandle">
|
||||
</el-pagination>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<style scoped>
|
||||
.image {
|
||||
width: 60%;
|
||||
display: block;
|
||||
margin: 0 auto 30px auto;
|
||||
}
|
||||
.titleH3{
|
||||
font-size: 16px;
|
||||
color: #212121;
|
||||
padding:20px 0;
|
||||
margin-bottom:0;
|
||||
}
|
||||
</style>
|
||||
|
||||
<script>
|
||||
import Cookies from 'js-cookie'
|
||||
import qs from 'qs'
|
||||
import mixinViewModule from '@/mixins/view-module'
|
||||
export default {
|
||||
mixins: [mixinViewModule],
|
||||
name: 'RenProcessDetail',
|
||||
data () {
|
||||
return {
|
||||
mixinViewModuleOptions: {
|
||||
getDataListURL: '/act/his/getTaskHandleDetailInfo',
|
||||
getDataListIsPage: false,
|
||||
createdIsNeed: false,
|
||||
deleteIsBatch: true,
|
||||
deleteIsBatchKey: 'deploymentId'
|
||||
},
|
||||
dataForm: {
|
||||
processInstanceId: ''
|
||||
}
|
||||
}
|
||||
},
|
||||
created () {
|
||||
this.dataForm.processInstanceId = this.$route.params.processInstanceId
|
||||
this.getResourceURL()
|
||||
this.getDataList()
|
||||
},
|
||||
methods: {
|
||||
// 获取流程(xml/image)url地址
|
||||
getResourceURL () {
|
||||
const params = qs.stringify({
|
||||
token: Cookies.get('ucsToken'),
|
||||
processInstanceId: this.dataForm.processInstanceId
|
||||
})
|
||||
return `${window.SITE_CONFIG.apiURL}/act/his/getInstImage?${params}`
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
|
@ -25,6 +25,7 @@ t.choose = 'Please Choose'
|
|||
t.fileName = 'File Name'
|
||||
t.design = 'Online Design'
|
||||
t.preview = 'Preview'
|
||||
t.reset='Reset'
|
||||
|
||||
t.prompt = {}
|
||||
t.prompt.title = 'Prompt'
|
||||
|
|
|
@ -25,6 +25,7 @@ t.choose = '请选择'
|
|||
t.fileName = '文件名'
|
||||
t.design = '在线设计'
|
||||
t.preview = '预览'
|
||||
t.reset = '重置'
|
||||
|
||||
t.prompt = {}
|
||||
t.prompt.title = '提示'
|
||||
|
@ -35,6 +36,7 @@ t.prompt.deleteBatch = '请选择删除项'
|
|||
|
||||
t.validate = {}
|
||||
t.validate.required = '必填项不能为空'
|
||||
t.validate.pwdStrength = '密码需包含字母、数字、标点符号,并超过8位'
|
||||
t.validate.format = '{attr}格式错误'
|
||||
|
||||
t.upload = {}
|
||||
|
@ -545,4 +547,33 @@ t.notice.new = '有新通知'
|
|||
t.notice.disconnect = '连接断开'
|
||||
t.notice.disconnectMessage = 'WebSocket连接已断开,请检查网络'
|
||||
|
||||
t.projectList = {}
|
||||
t.projectList.projectName = '项目名称'
|
||||
t.projectList.projectUnit = '申请单位'
|
||||
t.projectList.department = '责任处室'
|
||||
t.projectList.applydate = '申请日期'
|
||||
t.projectList.district = '所属区市'
|
||||
t.projectList.contacts = '业务联系人'
|
||||
t.projectList.contactstel = '业务联系人电话'
|
||||
t.projectList.technology = '技术联系人电话'
|
||||
t.projectList.technologytel = '技术联系人电话'
|
||||
|
||||
t.dataresources = {}
|
||||
t.dataresources.componentType = '组件类型'
|
||||
t.dataresources.componentName = '组件名称'
|
||||
t.dataresources.putOnDate = '上架时间'
|
||||
t.dataresources.resourcesName = '数据资源名称'
|
||||
t.dataresources.resourcesCode = '数据资源代码'
|
||||
t.dataresources.resourcesProvide = '数据资源提供方'
|
||||
t.dataresources.resourcesAbstract = '数据资源摘要'
|
||||
t.dataresources.associatedApplication = '关联应用'
|
||||
|
||||
t.infrastructure = {}
|
||||
t.infrastructure.resourceCategory = '资源类别'
|
||||
t.infrastructure.resourceName = '摄像头名称'
|
||||
t.infrastructure.district = '所在区市'
|
||||
t.infrastructure.street = '所在街道'
|
||||
t.infrastructure.department = '所属部门'
|
||||
t.infrastructure.associatedApplication = '关联应用'
|
||||
|
||||
export default t
|
||||
|
|
|
@ -25,6 +25,7 @@ t.choose = '請選擇'
|
|||
t.fileName = '文件名'
|
||||
t.design = '在線設計'
|
||||
t.preview = '預覽'
|
||||
t.reset='重置'
|
||||
|
||||
t.prompt = {}
|
||||
t.prompt.title = '提示'
|
||||
|
|
|
@ -5,6 +5,13 @@ import { isURL } from '@/utils/validate'
|
|||
import store from '@/store'
|
||||
import Cookies from 'js-cookie'
|
||||
|
||||
|
||||
// 解决ElementUI导航栏中的vue-router在3.0版本以上重复点菜单报错问题
|
||||
const originalPush = Router.prototype.push
|
||||
Router.prototype.push = function push(location) {
|
||||
return originalPush.call(this, location).catch(err => err)
|
||||
}
|
||||
|
||||
Vue.use(Router)
|
||||
|
||||
// 页面路由(独立页面)
|
||||
|
@ -155,7 +162,7 @@ function fnAddDynamicMenuRoutes (menuList = [], routes = []) {
|
|||
route.meta.iframeURL = URL
|
||||
} else {
|
||||
const urlArr = URL.split('?')
|
||||
debugger
|
||||
// debugger
|
||||
URL = urlArr[0].replace(/^\//, '').replace(/_/g, '-')
|
||||
route.path = route.name = URL.replace(/\//g, '-')
|
||||
route.component = () => import(`@/views/modules/${URL}`)
|
||||
|
|
|
@ -12,7 +12,7 @@ export default new Vuex.Store({
|
|||
// 导航条, 布局风格, default(白色) / colorful(鲜艳)
|
||||
navbarLayoutType: 'colorful',
|
||||
// 侧边栏, 布局皮肤, default(白色) / dark(黑色)
|
||||
sidebarLayoutSkin: 'dark',
|
||||
sidebarLayoutSkin: 'default',
|
||||
// 侧边栏, 折叠状态
|
||||
sidebarFold: false,
|
||||
// 侧边栏, 菜单
|
||||
|
|
|
@ -0,0 +1,58 @@
|
|||
/*
|
||||
* @Author: hisense.liangjunhua
|
||||
* @Date: 2022-06-24 16:00:58
|
||||
* @LastEditors: hisense.liangjunhua
|
||||
* @LastEditTime: 2022-06-24 16:44:28
|
||||
* @Description: 告诉大家这是什么
|
||||
*/
|
||||
import CryptoJS from 'crypto-js/crypto-js'
|
||||
|
||||
// 默认的 KEY 与 iv 与后端保持一致 ,不采用后端传值密钥 上上下下左右左右BABA 一往无前虎山行拨开云雾见光明梦里花开牡丹亭幻想成真歌舞升平
|
||||
const KEY = CryptoJS.enc.Utf8.parse('YwwqhsxBkywjgm01') // 密钥
|
||||
const IV = CryptoJS.enc.Utf8.parse('SSXXZYZYBABA30TM') // 偏移量
|
||||
/**
|
||||
* AES加密 :字符串 key iv 返回base64
|
||||
*/
|
||||
export function Encrypt(word, keyStr, ivStr) {
|
||||
let key = KEY
|
||||
let iv = IV
|
||||
|
||||
if (keyStr) {
|
||||
key = CryptoJS.enc.Utf8.parse(keyStr)
|
||||
iv = CryptoJS.enc.Utf8.parse(ivStr)
|
||||
}
|
||||
|
||||
const srcs = CryptoJS.enc.Utf8.parse(word)
|
||||
var encrypted = CryptoJS.AES.encrypt(srcs, key, {
|
||||
iv: iv,
|
||||
mode: CryptoJS.mode.CBC,
|
||||
padding: CryptoJS.pad.ZeroPadding,
|
||||
})
|
||||
|
||||
return CryptoJS.enc.Base64.stringify(encrypted.ciphertext)
|
||||
}
|
||||
/**
|
||||
* AES 解密 :字符串 key iv 返回base64
|
||||
*
|
||||
*/
|
||||
export function Decrypt(word, keyStr, ivStr) {
|
||||
let key = KEY
|
||||
let iv = IV
|
||||
|
||||
if (keyStr) {
|
||||
key = CryptoJS.enc.Utf8.parse(keyStr)
|
||||
iv = CryptoJS.enc.Utf8.parse(ivStr)
|
||||
}
|
||||
|
||||
const base64 = CryptoJS.enc.Base64.parse(word)
|
||||
const src = CryptoJS.enc.Base64.stringify(base64)
|
||||
|
||||
var decrypt = CryptoJS.AES.decrypt(src, key, {
|
||||
iv: iv,
|
||||
mode: CryptoJS.mode.CBC,
|
||||
padding: CryptoJS.pad.ZeroPadding,
|
||||
})
|
||||
|
||||
var decryptedStr = decrypt.toString(CryptoJS.enc.Utf8)
|
||||
return decryptedStr.toString()
|
||||
}
|
|
@ -5,25 +5,52 @@
|
|||
<el-dropdown class="aui-content--tabs-tools">
|
||||
<i class="el-icon-arrow-down"></i>
|
||||
<el-dropdown-menu slot="dropdown" :show-timeout="0">
|
||||
<el-dropdown-item @click.native="tabRemoveHandle($store.state.contentTabsActiveName)">{{ $t('contentTabs.closeCurrent') }}</el-dropdown-item>
|
||||
<el-dropdown-item @click.native="tabsCloseOtherHandle()">{{ $t('contentTabs.closeOther') }}</el-dropdown-item>
|
||||
<el-dropdown-item @click.native="tabsCloseAllHandle()">{{ $t('contentTabs.closeAll') }}</el-dropdown-item>
|
||||
<el-dropdown-item
|
||||
@click.native="tabRemoveHandle($store.state.contentTabsActiveName)"
|
||||
>{{ $t("contentTabs.closeCurrent") }}</el-dropdown-item
|
||||
>
|
||||
<el-dropdown-item @click.native="tabsCloseOtherHandle()">{{
|
||||
$t("contentTabs.closeOther")
|
||||
}}</el-dropdown-item>
|
||||
<el-dropdown-item @click.native="tabsCloseAllHandle()">{{
|
||||
$t("contentTabs.closeAll")
|
||||
}}</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
<el-tabs v-model="$store.state.contentTabsActiveName" @tab-click="tabSelectedHandle" @tab-remove="tabRemoveHandle">
|
||||
<el-tabs
|
||||
v-model="$store.state.contentTabsActiveName"
|
||||
@tab-click="tabSelectedHandle"
|
||||
@tab-remove="tabRemoveHandle"
|
||||
>
|
||||
<el-tab-pane
|
||||
v-for="item in $store.state.contentTabs"
|
||||
:key="item.name"
|
||||
:name="item.name"
|
||||
:label="item.title"
|
||||
:closable="item.name !== 'home'"
|
||||
:class="{ 'is-iframe': tabIsIframe(item.iframeURL) }">
|
||||
:class="{ 'is-iframe': tabIsIframe(item.iframeURL) }"
|
||||
>
|
||||
<template v-if="item.name === 'home'">
|
||||
<svg slot="label" class="icon-svg aui-content--tabs-icon-nav" aria-hidden="true"><use xlink:href="#icon-home"></use></svg>
|
||||
<svg
|
||||
slot="label"
|
||||
class="icon-svg aui-content--tabs-icon-nav"
|
||||
aria-hidden="true"
|
||||
>
|
||||
<use xlink:href="#icon-home"></use>
|
||||
</svg>
|
||||
</template>
|
||||
<iframe v-if="tabIsIframe(item.iframeURL)" :src="item.iframeURL" width="100%" height="100%" frameborder="0" scrolling="yes"></iframe>
|
||||
<iframe
|
||||
v-if="tabIsIframe(item.iframeURL)"
|
||||
:src="item.iframeURL"
|
||||
width="100%"
|
||||
height="100%"
|
||||
frameborder="0"
|
||||
scrolling="yes"
|
||||
></iframe>
|
||||
<keep-alive v-else>
|
||||
<router-view v-if="item.name === $store.state.contentTabsActiveName" />
|
||||
<router-view
|
||||
v-if="item.name === $store.state.contentTabsActiveName"
|
||||
/>
|
||||
</keep-alive>
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
|
@ -38,59 +65,91 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import { isURL } from '@/utils/validate'
|
||||
import { isURL } from "@/utils/validate";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
}
|
||||
return {};
|
||||
},
|
||||
methods: {
|
||||
// tabs, 是否通过iframe展示
|
||||
tabIsIframe(url) {
|
||||
return isURL(url)
|
||||
return isURL(url);
|
||||
},
|
||||
// tabs, 选中tab
|
||||
tabSelectedHandle(tab) {
|
||||
tab = this.$store.state.contentTabs.filter(item => item.name === tab.name)[0]
|
||||
tab = this.$store.state.contentTabs.filter(
|
||||
(item) => item.name === tab.name
|
||||
)[0];
|
||||
if (tab) {
|
||||
this.$router.push({
|
||||
'name': /^iframe_.+/.test(tab.name) ? 'iframe' : tab.name,
|
||||
'params': { ...tab.params },
|
||||
'query': { ...tab.query }
|
||||
})
|
||||
name: /^iframe_.+/.test(tab.name) ? "iframe" : tab.name,
|
||||
params: { ...tab.params },
|
||||
query: { ...tab.query },
|
||||
});
|
||||
}
|
||||
},
|
||||
// tabs, 删除tab
|
||||
tabRemoveHandle(tabName) {
|
||||
if (tabName === 'home') {
|
||||
return false
|
||||
if (tabName === "home") {
|
||||
return false;
|
||||
}
|
||||
this.$store.state.contentTabs = this.$store.state.contentTabs.filter(item => item.name !== tabName)
|
||||
this.$store.state.contentTabs = this.$store.state.contentTabs.filter(
|
||||
(item) => item.name !== tabName
|
||||
);
|
||||
if (this.$store.state.contentTabs.length <= 0) {
|
||||
this.$store.state.sidebarMenuActiveName = this.$store.state.contentTabsActiveName = 'home'
|
||||
return false
|
||||
this.$store.state.sidebarMenuActiveName =
|
||||
this.$store.state.contentTabsActiveName = "home";
|
||||
return false;
|
||||
}
|
||||
// 当前选中tab被删除
|
||||
if (tabName === this.$store.state.contentTabsActiveName) {
|
||||
let tab = this.$store.state.contentTabs[this.$store.state.contentTabs.length - 1]
|
||||
let tab =
|
||||
this.$store.state.contentTabs[
|
||||
this.$store.state.contentTabs.length - 1
|
||||
];
|
||||
this.$router.push({
|
||||
name: /^iframe_.+/.test(tab.name) ? 'iframe' : tab.name,
|
||||
name: /^iframe_.+/.test(tab.name) ? "iframe" : tab.name,
|
||||
params: { ...tab.params },
|
||||
query: { ...tab.query }
|
||||
})
|
||||
query: { ...tab.query },
|
||||
});
|
||||
}
|
||||
},
|
||||
// tabs, 关闭其它
|
||||
tabsCloseOtherHandle() {
|
||||
this.$store.state.contentTabs = this.$store.state.contentTabs.filter(item => {
|
||||
return item.name === 'home' || item.name === this.$store.state.contentTabsActiveName
|
||||
})
|
||||
this.$store.state.contentTabs = this.$store.state.contentTabs.filter(
|
||||
(item) => {
|
||||
return (
|
||||
item.name === "home" ||
|
||||
item.name === this.$store.state.contentTabsActiveName
|
||||
);
|
||||
}
|
||||
);
|
||||
},
|
||||
// tabs, 关闭全部
|
||||
tabsCloseAllHandle() {
|
||||
this.$store.state.contentTabs = this.$store.state.contentTabs.filter(item => item.name === 'home')
|
||||
this.$router.push({ name: 'home' })
|
||||
}
|
||||
}
|
||||
}
|
||||
this.$store.state.contentTabs = this.$store.state.contentTabs.filter(
|
||||
(item) => item.name === "home"
|
||||
);
|
||||
this.$router.push({ name: "home" });
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
.aui-content {
|
||||
.el-tabs {
|
||||
::v-deep .el-tabs__header {
|
||||
left: 266px;
|
||||
.el-tabs__nav-wrap {
|
||||
.el-tabs__nav-scroll {
|
||||
.el-tabs__nav {
|
||||
.el-tabs__item ::after {
|
||||
background-color: #0058e1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
|
@ -1,3 +1,10 @@
|
|||
<!--
|
||||
* @Author: hisense.liangjunhua
|
||||
* @Date: 2022-06-23 16:41:46
|
||||
* @LastEditors: hisense.liangjunhua
|
||||
* @LastEditTime: 2022-06-24 17:51:42
|
||||
* @Description: 告诉大家这是什么
|
||||
-->
|
||||
<template>
|
||||
<el-dialog
|
||||
:visible.sync="visible"
|
||||
|
@ -13,7 +20,7 @@
|
|||
<el-input v-model="dataForm.password" type="password" :placeholder="$t('updatePassword.password')"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="newPassword" :label="$t('updatePassword.newPassword')">
|
||||
<el-input v-model="dataForm.newPassword" type="password" :placeholder="$t('updatePassword.newPassword')"></el-input>
|
||||
<el-input v-model="dataForm.newPassword" type="password" :placeholder="$t('updatePassword.newPassword')" @input="changeInput"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="confirmPassword" :label="$t('updatePassword.confirmPassword')">
|
||||
<el-input v-model="dataForm.confirmPassword" type="password" :placeholder="$t('updatePassword.confirmPassword')"></el-input>
|
||||
|
@ -28,6 +35,7 @@
|
|||
|
||||
<script>
|
||||
import debounce from 'lodash/debounce'
|
||||
import { Encrypt } from '@/utils/crypto'
|
||||
import { clearLoginInfo } from '@/utils'
|
||||
export default {
|
||||
data () {
|
||||
|
@ -42,6 +50,28 @@ export default {
|
|||
},
|
||||
computed: {
|
||||
dataRule () {
|
||||
var validatePassword = (rule, value, callback) => {
|
||||
if (!value) {
|
||||
this.showLevel = false
|
||||
return callback(new Error(this.$t('validate.pwdStrength')))
|
||||
}
|
||||
if (value.length < 8) {
|
||||
this.showLevel = false
|
||||
return callback(new Error(this.$t('validate.pwdStrength')))
|
||||
}
|
||||
const num = /^.*[0-9]+.*/
|
||||
const low = /^.*[a-z]+.*/
|
||||
const up = /^.*[A-Z]+.*/
|
||||
const spe = /^.*[^a-zA-Z0-9]+.*/
|
||||
console.log('包含数字', num.test(value), '包含字母', low.test(value), up.test(value), '包含特殊符号', spe.test(value))
|
||||
if (!(num.test(value) && (low.test(value) || up.test(value)) && spe.test(value))) {
|
||||
return callback(new Error(this.$t('validate.pwdStrength')))
|
||||
}
|
||||
// if (!this.dataForm.id && !/\S/.test(value)) {
|
||||
// return callback(new Error(this.$t('validate.required')))
|
||||
// }
|
||||
callback()
|
||||
}
|
||||
var validateConfirmPassword = (rule, value, callback) => {
|
||||
if (this.dataForm.newPassword !== value) {
|
||||
return callback(new Error(this.$t('updatePassword.validate.confirmPassword')))
|
||||
|
@ -53,7 +83,8 @@ export default {
|
|||
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
|
||||
],
|
||||
newPassword: [
|
||||
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
|
||||
{ required: true, message: this.$t('validate.required'), trigger: 'blur' },
|
||||
{ validator: validatePassword, trigger: 'blur' }
|
||||
],
|
||||
confirmPassword: [
|
||||
{ required: true, message: this.$t('validate.required'), trigger: 'blur' },
|
||||
|
@ -63,19 +94,33 @@ export default {
|
|||
}
|
||||
},
|
||||
methods: {
|
||||
changeInput (value) {
|
||||
if (value !== value.replace(/ /g, '')) {
|
||||
this.$message({
|
||||
message: '密码中不允许存在空格!',
|
||||
type: 'warning'
|
||||
})
|
||||
this.dataForm.newPassword = value.replace(/ /g, '')
|
||||
// console.log('密码发生变化=============>', value)
|
||||
}
|
||||
},
|
||||
init () {
|
||||
this.visible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs['dataForm'].resetFields()
|
||||
this.$refs.dataForm.resetFields()
|
||||
})
|
||||
},
|
||||
// 表单提交
|
||||
dataFormSubmitHandle: debounce(function () {
|
||||
this.$refs['dataForm'].validate((valid) => {
|
||||
this.$refs.dataForm.validate((valid) => {
|
||||
if (!valid) {
|
||||
return false
|
||||
}
|
||||
this.$http.put('/sys/user/password', this.dataForm).then(({ data: res }) => {
|
||||
this.$http.put('/sys/user/password', {
|
||||
confirmPassword: Encrypt(this.dataForm.confirmPassword),
|
||||
newPassword: Encrypt(this.dataForm.newPassword),
|
||||
password: Encrypt(this.dataForm.password)
|
||||
}).then(({ data: res }) => {
|
||||
if (res.code !== 0) {
|
||||
return this.$message.error(res.msg)
|
||||
}
|
||||
|
@ -91,7 +136,7 @@ export default {
|
|||
})
|
||||
}).catch(() => {})
|
||||
})
|
||||
}, 1000, { 'leading': true, 'trailing': false })
|
||||
}, 1000, { leading: true, trailing: false })
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
|
@ -1,79 +1,122 @@
|
|||
<template>
|
||||
<nav class="aui-navbar" :class="`aui-navbar--${$store.state.navbarLayoutType}`">
|
||||
<nav
|
||||
class="aui-navbar"
|
||||
:class="`aui-navbar--${$store.state.navbarLayoutType}`"
|
||||
>
|
||||
<div class="aui-navbar__header">
|
||||
<h1 class="aui-navbar__brand" @click="$router.push({ name: 'home' })">
|
||||
<a class="aui-navbar__brand-lg" href="javascript:;">{{ $t('brand.lg') }}</a>
|
||||
<a class="aui-navbar__brand-mini" href="javascript:;">{{ $t('brand.mini') }}</a>
|
||||
<a class="aui-navbar__brand-mini" href="javascript:;">{{
|
||||
$t("brand.mini")
|
||||
}}</a>
|
||||
<a class="aui-navbar__brand-lg" href="javascript:;">{{
|
||||
$t("brand.lg")
|
||||
}}</a>
|
||||
<span>——</span>
|
||||
<span class="back-title-text">后台管理系统</span>
|
||||
</h1>
|
||||
</div>
|
||||
<div class="aui-navbar__body">
|
||||
<el-menu class="aui-navbar__menu mr-auto" mode="horizontal">
|
||||
<el-menu-item index="1" @click="$store.state.sidebarFold = !$store.state.sidebarFold">
|
||||
<svg class="icon-svg aui-navbar__icon-menu aui-navbar__icon-menu--switch" aria-hidden="true"><use xlink:href="#icon-outdent"></use></svg>
|
||||
<!-- <el-menu-item
|
||||
index="1"
|
||||
@click="$store.state.sidebarFold = !$store.state.sidebarFold"
|
||||
>
|
||||
<svg
|
||||
class="icon-svg aui-navbar__icon-menu aui-navbar__icon-menu--switch"
|
||||
aria-hidden="true"
|
||||
>
|
||||
<use xlink:href="#icon-outdent"></use>
|
||||
</svg>
|
||||
</el-menu-item>
|
||||
<el-menu-item index="2" @click="refresh()">
|
||||
<svg class="icon-svg aui-navbar__icon-menu aui-navbar__icon-menu--refresh" aria-hidden="true"><use xlink:href="#icon-sync"></use></svg>
|
||||
</el-menu-item>
|
||||
<svg
|
||||
class="
|
||||
icon-svg
|
||||
aui-navbar__icon-menu aui-navbar__icon-menu--refresh
|
||||
"
|
||||
aria-hidden="true"
|
||||
>
|
||||
<use xlink:href="#icon-sync"></use>
|
||||
</svg>
|
||||
</el-menu-item> -->
|
||||
</el-menu>
|
||||
<el-menu class="aui-navbar__menu" mode="horizontal">
|
||||
<el-menu-item index="1">
|
||||
<el-dropdown placement="bottom" :show-timeout="0">
|
||||
<el-button size="mini">{{ $t('_lang') }}</el-button>
|
||||
<el-button size="mini">{{ $t("_lang") }}</el-button>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item v-for="(val, key) in i18nMessages" :key="key" @click.native="$i18n.locale = key">{{ val._lang }}</el-dropdown-item>
|
||||
<el-dropdown-item
|
||||
v-for="(val, key) in i18nMessages"
|
||||
:key="key"
|
||||
@click.native="$i18n.locale = key"
|
||||
>{{ val._lang }}</el-dropdown-item
|
||||
>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
</el-menu-item>
|
||||
<el-menu-item index="2">
|
||||
<a href="//115.28.200.119:9091" target="_blank">
|
||||
<svg class="icon-svg aui-navbar__icon-menu" aria-hidden="true"><use xlink:href="#icon-earth"></use></svg>
|
||||
<svg class="icon-svg aui-navbar__icon-menu" aria-hidden="true">
|
||||
<use xlink:href="#icon-earth"></use>
|
||||
</svg>
|
||||
</a>
|
||||
</el-menu-item>
|
||||
<el-menu-item index="3" v-if="$hasPermission('sys:notice:all')">
|
||||
<el-badge :is-dot="messageTip">
|
||||
<a href="#" @click="myNoticeRouter()"><i class="el-icon-bell"></i></a>
|
||||
<a href="#" @click="myNoticeRouter()"
|
||||
><i class="el-icon-bell"></i
|
||||
></a>
|
||||
</el-badge>
|
||||
</el-menu-item>
|
||||
<el-menu-item index="4" @click="fullscreenHandle()">
|
||||
<svg class="icon-svg aui-navbar__icon-menu" aria-hidden="true"><use xlink:href="#icon-fullscreen"></use></svg>
|
||||
<svg class="icon-svg aui-navbar__icon-menu" aria-hidden="true">
|
||||
<use xlink:href="#icon-fullscreen"></use>
|
||||
</svg>
|
||||
</el-menu-item>
|
||||
<el-menu-item index="5" class="aui-navbar__avatar">
|
||||
<el-dropdown placement="bottom" :show-timeout="0">
|
||||
<span class="el-dropdown-link">
|
||||
<img src="~@/assets/img/avatar.png">
|
||||
<img src="~@/assets/img/avatar.png" />
|
||||
<span>{{ $store.state.user.name }}</span>
|
||||
<i class="el-icon-arrow-down"></i>
|
||||
</span>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<el-dropdown-item @click.native="updatePasswordHandle()">{{ $t('updatePassword.title') }}</el-dropdown-item>
|
||||
<el-dropdown-item @click.native="logoutHandle()">{{ $t('logout') }}</el-dropdown-item>
|
||||
<el-dropdown-item @click.native="updatePasswordHandle()">{{
|
||||
$t("updatePassword.title")
|
||||
}}</el-dropdown-item>
|
||||
<el-dropdown-item @click.native="logoutHandle()">{{
|
||||
$t("logout")
|
||||
}}</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
</el-menu-item>
|
||||
</el-menu>
|
||||
</div>
|
||||
<!-- 弹窗, 修改密码 -->
|
||||
<update-password v-if="updatePasswordVisible" ref="updatePassword"></update-password>
|
||||
<update-password
|
||||
v-if="updatePasswordVisible"
|
||||
ref="updatePassword"
|
||||
></update-password>
|
||||
</nav>
|
||||
</template>
|
||||
<script>
|
||||
import { messages } from '@/i18n'
|
||||
import screenfull from 'screenfull'
|
||||
import UpdatePassword from './main-navbar-update-password'
|
||||
import { clearLoginInfo } from '@/utils'
|
||||
import { messages } from "@/i18n";
|
||||
import screenfull from "screenfull";
|
||||
import UpdatePassword from "./main-navbar-update-password";
|
||||
import { clearLoginInfo } from "@/utils";
|
||||
// import Cookies from 'js-cookie'
|
||||
// var socket = null
|
||||
export default {
|
||||
inject: ['refresh'],
|
||||
inject: ["refresh"],
|
||||
data() {
|
||||
return {
|
||||
i18nMessages: messages,
|
||||
updatePasswordVisible: false,
|
||||
messageTip: false
|
||||
}
|
||||
messageTip: false,
|
||||
};
|
||||
},
|
||||
components: {
|
||||
UpdatePassword
|
||||
UpdatePassword,
|
||||
},
|
||||
created() {
|
||||
// var vue = this
|
||||
|
@ -101,56 +144,96 @@ export default {
|
|||
// }
|
||||
|
||||
// 未读通知数
|
||||
this.getUnReadCount()
|
||||
this.getUnReadCount();
|
||||
},
|
||||
methods: {
|
||||
myNoticeRouter() {
|
||||
this.$router.replace('notice-notice-user')
|
||||
this.$router.replace("notice-notice-user");
|
||||
},
|
||||
getUnReadCount() {
|
||||
this.$http.get('/sys/notice/mynotice/unread').then(({ data: res }) => {
|
||||
this.$http
|
||||
.get("/sys/notice/mynotice/unread")
|
||||
.then(({ data: res }) => {
|
||||
if (res.code !== 0) {
|
||||
return this.$message.error(res.msg)
|
||||
return this.$message.error(res.msg);
|
||||
}
|
||||
if (res.data > 0) {
|
||||
this.messageTip = true
|
||||
this.messageTip = true;
|
||||
}
|
||||
}).catch(() => {})
|
||||
})
|
||||
.catch(() => {});
|
||||
},
|
||||
// 全屏
|
||||
fullscreenHandle() {
|
||||
if (!screenfull.enabled) {
|
||||
return this.$message({
|
||||
message: this.$t('fullscreen.prompt'),
|
||||
type: 'warning',
|
||||
duration: 500
|
||||
})
|
||||
message: this.$t("fullscreen.prompt"),
|
||||
type: "warning",
|
||||
duration: 500,
|
||||
});
|
||||
}
|
||||
screenfull.toggle()
|
||||
screenfull.toggle();
|
||||
},
|
||||
// 修改密码
|
||||
updatePasswordHandle() {
|
||||
this.updatePasswordVisible = true
|
||||
this.updatePasswordVisible = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.updatePassword.init()
|
||||
})
|
||||
this.$refs.updatePassword.init();
|
||||
});
|
||||
},
|
||||
// 退出
|
||||
logoutHandle() {
|
||||
this.$confirm(this.$t('prompt.info', { handle: this.$t('logout') }), this.$t('prompt.title'), {
|
||||
confirmButtonText: this.$t('confirm'),
|
||||
cancelButtonText: this.$t('cancel'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.$http.post('/logout').then(({ data: res }) => {
|
||||
this.$confirm(
|
||||
this.$t("prompt.info", { handle: this.$t("logout") }),
|
||||
this.$t("prompt.title"),
|
||||
{
|
||||
confirmButtonText: this.$t("confirm"),
|
||||
cancelButtonText: this.$t("cancel"),
|
||||
type: "warning",
|
||||
}
|
||||
)
|
||||
.then(() => {
|
||||
this.$http
|
||||
.post("/logout")
|
||||
.then(({ data: res }) => {
|
||||
if (res.code !== 0) {
|
||||
return this.$message.error(res.msg)
|
||||
}
|
||||
clearLoginInfo()
|
||||
this.$router.push({ name: 'login' })
|
||||
}).catch(() => {})
|
||||
}).catch(() => {})
|
||||
}
|
||||
}
|
||||
return this.$message.error(res.msg);
|
||||
}
|
||||
clearLoginInfo();
|
||||
this.$router.push({ name: "login" });
|
||||
})
|
||||
.catch(() => {});
|
||||
})
|
||||
.catch(() => {});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
@font-face {
|
||||
font-family: "header-typeface";
|
||||
src: url("~@/assets/font/header-typeface.ttf");
|
||||
}
|
||||
.aui-navbar {
|
||||
width: 100%;
|
||||
height: 50px;
|
||||
background-image: url("~@/assets/img/activitiMyWorkDynamics/header-bak.png");
|
||||
.aui-navbar__header {
|
||||
width: 25%;
|
||||
.aui-navbar__brand {
|
||||
margin-left: 20px;
|
||||
a {
|
||||
font-size: 22px;
|
||||
color: #ffffff;
|
||||
}
|
||||
.aui-navbar__brand-mini {
|
||||
display: block;
|
||||
}
|
||||
.back-title-text {
|
||||
margin-top: 5px;
|
||||
font-family: header-typeface;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -1,89 +1,135 @@
|
|||
<template>
|
||||
<el-submenu v-if="menu.children && menu.children.length >= 1" :index="menu.id" :popper-append-to-body="false">
|
||||
<el-submenu
|
||||
v-if="menu.children && menu.children.length >= 1"
|
||||
:index="menu.id"
|
||||
:popper-append-to-body="false"
|
||||
>
|
||||
<template slot="title">
|
||||
<svg class="icon-svg aui-sidebar__menu-icon" aria-hidden="true"><use :xlink:href="`#${menu.icon}`"></use></svg>
|
||||
<span>{{ menu.name }}</span>
|
||||
<svg class="icon-svg aui-sidebar__menu-icon" aria-hidden="true">
|
||||
<use :xlink:href="`#${menu.icon}`"></use>
|
||||
</svg>
|
||||
<span class="first-level-text">{{ menu.name }}</span>
|
||||
</template>
|
||||
<sub-menu v-for="item in menu.children" :key="item.id" :menu="item"></sub-menu>
|
||||
<sub-menu
|
||||
v-for="item in menu.children"
|
||||
:key="item.id"
|
||||
:menu="item"
|
||||
></sub-menu>
|
||||
</el-submenu>
|
||||
<el-menu-item v-else :index="menu.id" ref="li">
|
||||
<a
|
||||
:href="isBrowserTabOpen(menu.id) ? getBrowserTabOpenURL(menu.id) : 'javascript:;'"
|
||||
:href="
|
||||
isBrowserTabOpen(menu.id)
|
||||
? getBrowserTabOpenURL(menu.id)
|
||||
: 'javascript:;'
|
||||
"
|
||||
:target="isBrowserTabOpen(menu.id) ? '_blank' : '_self'"
|
||||
@click="isBrowserTabOpen(menu.id) ? 'return false;' : gotoRouteHandle(menu.id)">
|
||||
<svg class="icon-svg aui-sidebar__menu-icon" aria-hidden="true"><use :xlink:href="`#${menu.icon}`"></use></svg>
|
||||
@click="
|
||||
isBrowserTabOpen(menu.id) ? 'return false;' : gotoRouteHandle(menu.id)
|
||||
"
|
||||
>
|
||||
<svg class="icon-svg aui-sidebar__menu-icon" aria-hidden="true">
|
||||
<use :xlink:href="`#${menu.icon}`"></use>
|
||||
</svg>
|
||||
<span>{{ menu.name }}</span>
|
||||
</a>
|
||||
</el-menu-item>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import SubMenu from './main-sidebar-sub-menu'
|
||||
import SubMenu from "./main-sidebar-sub-menu";
|
||||
export default {
|
||||
name: 'sub-menu',
|
||||
name: "sub-menu",
|
||||
data() {
|
||||
return {
|
||||
browserTabOpenList: [
|
||||
'1156748733921165314',
|
||||
]
|
||||
}
|
||||
browserTabOpenList: ["1156748733921165314"],
|
||||
};
|
||||
},
|
||||
props: {
|
||||
menu: {
|
||||
type: Object,
|
||||
required: true
|
||||
}
|
||||
required: true,
|
||||
},
|
||||
},
|
||||
components: {
|
||||
SubMenu
|
||||
SubMenu,
|
||||
},
|
||||
created() {
|
||||
this.$nextTick(() => {
|
||||
if (this.$refs.li) {
|
||||
let $li = this.$refs.li.$el
|
||||
let $a = $li.firstElementChild
|
||||
let $li = this.$refs.li.$el;
|
||||
let $a = $li.firstElementChild;
|
||||
if ($a) {
|
||||
let pl = '0', pr = '0'
|
||||
let pl = "0",
|
||||
pr = "0";
|
||||
if ($li.currentStyle) {
|
||||
pl = $li.currentStyle['paddingLeft']
|
||||
pr = $li.currentStyle['paddingRight']
|
||||
pl = $li.currentStyle["paddingLeft"];
|
||||
pr = $li.currentStyle["paddingRight"];
|
||||
} else {
|
||||
pl = window.document.defaultView.getComputedStyle($li, null)['paddingLeft']
|
||||
pr = window.document.defaultView.getComputedStyle($li, null)['paddingRight']
|
||||
pl = window.document.defaultView.getComputedStyle($li, null)[
|
||||
"paddingLeft"
|
||||
];
|
||||
pr = window.document.defaultView.getComputedStyle($li, null)[
|
||||
"paddingRight"
|
||||
];
|
||||
}
|
||||
$li.setAttribute('style', `padding-left: 0; padding-right: 0;`)
|
||||
$a.setAttribute('style', `padding-left: ${pl}; padding-right: ${pr};`)
|
||||
$li.setAttribute("style", `padding-left: 0; padding-right: 0;`);
|
||||
$a.setAttribute(
|
||||
"style",
|
||||
`padding-left: ${pl}; padding-right: ${pr};`
|
||||
);
|
||||
}
|
||||
}
|
||||
})
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
// 是否通过浏览器Tab打开菜单
|
||||
isBrowserTabOpen(menuId) {
|
||||
return this.browserTabOpenList.filter(item => item === menuId).length >= 1;
|
||||
return (
|
||||
this.browserTabOpenList.filter((item) => item === menuId).length >= 1
|
||||
);
|
||||
},
|
||||
// 获取浏览器Tab打开菜单URL
|
||||
getBrowserTabOpenURL(menuId) {
|
||||
var route = window.SITE_CONFIG['dynamicMenuRoutes'].filter(item => item.meta.menuId === menuId)[0]
|
||||
return route ? route.meta.iframeURL : '';
|
||||
var route = window.SITE_CONFIG["dynamicMenuRoutes"].filter(
|
||||
(item) => item.meta.menuId === menuId
|
||||
)[0];
|
||||
return route ? route.meta.iframeURL : "";
|
||||
},
|
||||
// 通过menuId与动态(菜单)路由进行匹配跳转至指定路由
|
||||
gotoRouteHandle(menuId) {
|
||||
var route = window.SITE_CONFIG['dynamicMenuRoutes'].filter(item => item.meta.menuId === menuId)[0]
|
||||
var route = window.SITE_CONFIG["dynamicMenuRoutes"].filter(
|
||||
(item) => item.meta.menuId === menuId
|
||||
)[0];
|
||||
if (route) {
|
||||
this.$router.push({ name: route.name })
|
||||
}
|
||||
}
|
||||
}
|
||||
this.$router.push({ name: route.name });
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss">
|
||||
.aui-sidebar__menu {
|
||||
.el-menu-item > a {
|
||||
.first-level-text {
|
||||
font-size: 16px;
|
||||
color: #212121;
|
||||
font-weight: bold;
|
||||
}
|
||||
.el-menu-item {
|
||||
&.is-active {
|
||||
color: #ffffff;
|
||||
background-color: #0058e1;
|
||||
border: none;
|
||||
}
|
||||
a {
|
||||
display: block;
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
}
|
||||
span {
|
||||
font-size: 16px;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -1,30 +1,68 @@
|
|||
<!--
|
||||
* @Author: kongjun qdkongjun@gmail.com
|
||||
* @Date: 2022-06-20 09:29:59
|
||||
* @LastEditors: kongjun qdkongjun@gmail.com
|
||||
* @LastEditTime: 2022-06-22 10:04:56
|
||||
* @FilePath: \back\src\views\main-sidebar.vue
|
||||
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
||||
-->
|
||||
<template>
|
||||
<aside :class="['aui-sidebar', `aui-sidebar--${$store.state.sidebarLayoutSkin}`]">
|
||||
<aside
|
||||
:class="['aui-sidebar', `aui-sidebar--${$store.state.sidebarLayoutSkin}`]"
|
||||
>
|
||||
<div class="aui-sidebar__inner">
|
||||
<el-menu
|
||||
:default-active="$store.state.sidebarMenuActiveName"
|
||||
:collapse="$store.state.sidebarFold"
|
||||
:unique-opened="true"
|
||||
:collapseTransition="false"
|
||||
class="aui-sidebar__menu">
|
||||
<sub-menu v-for="menu in $store.state.sidebarMenuList" :key="menu.id" :menu="menu" />
|
||||
class="aui-sidebar__menu"
|
||||
>
|
||||
<sub-menu
|
||||
v-for="menu in $store.state.sidebarMenuList"
|
||||
:key="menu.id"
|
||||
:menu="menu"
|
||||
/>
|
||||
</el-menu>
|
||||
</div>
|
||||
</aside>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import SubMenu from './main-sidebar-sub-menu'
|
||||
import SubMenu from "./main-sidebar-sub-menu";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
}
|
||||
return {};
|
||||
},
|
||||
components: {
|
||||
SubMenu
|
||||
SubMenu,
|
||||
},
|
||||
created() {
|
||||
this.$store.state.sidebarMenuList = window.SITE_CONFIG['menuList']
|
||||
}
|
||||
}
|
||||
this.$store.state.sidebarMenuList = window.SITE_CONFIG["menuList"];
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
.aui-sidebar {
|
||||
width: 266px;
|
||||
.aui-sidebar__inner {
|
||||
width: 260px;
|
||||
//overflow-y: hidden;
|
||||
/*滚动条样式*/
|
||||
&::-webkit-scrollbar {
|
||||
width: 0px;
|
||||
}
|
||||
&::-webkit-scrollbar-thumb {
|
||||
border-radius: 5;
|
||||
background: rgba(0, 0, 0, 0.25);
|
||||
}
|
||||
&::-webkit-scrollbar-track {
|
||||
border-radius: 0;
|
||||
background: #f2f2f2;
|
||||
}
|
||||
.aui-sidebar__menu {
|
||||
width: 266px;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -1,21 +1,42 @@
|
|||
<!--
|
||||
* @Author: kongjun qdkongjun@gmail.com
|
||||
* @Date: 2022-06-20 09:29:59
|
||||
* @LastEditors: kongjun qdkongjun@gmail.com
|
||||
* @LastEditTime: 2022-06-21 11:36:51
|
||||
* @FilePath: \back\src\views\main-theme-tools.vue
|
||||
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
|
||||
-->
|
||||
<template>
|
||||
<div class="aui-theme-tools" :class="{ 'aui-theme-tools--open': isOpen }">
|
||||
<div class="aui-theme-tools__toggle" @click="isOpen = !isOpen">
|
||||
<svg class="icon-svg" aria-hidden="true"><use xlink:href="#icon-setting"></use></svg>
|
||||
<svg class="icon-svg" aria-hidden="true">
|
||||
<use xlink:href="#icon-setting"></use>
|
||||
</svg>
|
||||
</div>
|
||||
<div class="aui-theme-tools__content">
|
||||
<div class="aui-theme-tools__item">
|
||||
<h3>Navbar</h3>
|
||||
<el-checkbox v-model="$store.state.navbarLayoutType" true-label="colorful">colorful 鲜艳</el-checkbox>
|
||||
<el-checkbox
|
||||
v-model="$store.state.navbarLayoutType"
|
||||
true-label="colorful"
|
||||
>colorful 鲜艳</el-checkbox
|
||||
>
|
||||
</div>
|
||||
<div class="aui-theme-tools__item">
|
||||
<h3>Sidebar</h3>
|
||||
<el-checkbox v-model="$store.state.sidebarLayoutSkin" true-label="dark">dark 黑色</el-checkbox>
|
||||
<el-checkbox v-model="$store.state.sidebarLayoutSkin" true-label="dark"
|
||||
>dark 黑色</el-checkbox
|
||||
>
|
||||
</div>
|
||||
<div class="aui-theme-tools__item">
|
||||
<h3>Theme</h3>
|
||||
<el-radio-group v-model="themeColor" @change="themeColorChangeHandle">
|
||||
<el-radio v-for="item in themeList" :key="item.name" :label="item.name">{{ `${item.name} ${item.desc}` }}</el-radio>
|
||||
<el-radio
|
||||
v-for="item in themeList"
|
||||
:key="item.name"
|
||||
:label="item.name"
|
||||
>{{ `${item.name} ${item.desc}` }}</el-radio
|
||||
>
|
||||
</el-radio-group>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -27,35 +48,47 @@ export default {
|
|||
data() {
|
||||
return {
|
||||
isOpen: false,
|
||||
themeList: require('@/element-ui/config.js'),
|
||||
themeColor: 'turquoise'
|
||||
}
|
||||
themeList: require("@/element-ui/config.js"),
|
||||
themeColor: "blue",
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.themeColorChangeHandle("blue");
|
||||
},
|
||||
methods: {
|
||||
themeColorChangeHandle(val) {
|
||||
var styleList = [
|
||||
{
|
||||
id: 'J_elementTheme',
|
||||
url: `${process.env.BASE_URL}element-theme/${val}/index.css?t=${new Date().getTime()}`
|
||||
id: "J_elementTheme",
|
||||
url: `${
|
||||
process.env.BASE_URL
|
||||
}element-theme/${val}/index.css?t=${new Date().getTime()}`,
|
||||
},
|
||||
{
|
||||
id: 'J_auiTheme',
|
||||
url: `${process.env.BASE_URL}element-theme/${val}/aui.css?t=${new Date().getTime()}`
|
||||
}
|
||||
]
|
||||
id: "J_auiTheme",
|
||||
url: `${
|
||||
process.env.BASE_URL
|
||||
}element-theme/${val}/aui.css?t=${new Date().getTime()}`,
|
||||
},
|
||||
];
|
||||
for (var i = 0; i < styleList.length; i++) {
|
||||
var el = document.querySelector(`#${styleList[i].id}`)
|
||||
var el = document.querySelector(`#${styleList[i].id}`);
|
||||
if (el) {
|
||||
el.href = styleList[i].url
|
||||
continue
|
||||
}
|
||||
el = document.createElement('link')
|
||||
el.id = styleList[i].id
|
||||
el.href = styleList[i].url
|
||||
el.rel = 'stylesheet'
|
||||
document.querySelector('head').appendChild(el)
|
||||
}
|
||||
}
|
||||
el.href = styleList[i].url;
|
||||
continue;
|
||||
}
|
||||
el = document.createElement("link");
|
||||
el.id = styleList[i].id;
|
||||
el.href = styleList[i].url;
|
||||
el.rel = "stylesheet";
|
||||
document.querySelector("head").appendChild(el);
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
.aui-theme-tools__toggle {
|
||||
background-color: #0058e1;
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
<template>
|
||||
<div v-loading.fullscreen.lock="loading" :element-loading-text="$t('loading')" :class="['aui-wrapper', { 'aui-sidebar--fold': $store.state.sidebarFold }]">
|
||||
<div
|
||||
v-loading.fullscreen.lock="loading"
|
||||
:element-loading-text="$t('loading')"
|
||||
:class="['aui-wrapper', { 'aui-sidebar--fold': $store.state.sidebarFold }]"
|
||||
>
|
||||
<template v-if="!loading">
|
||||
<main-navbar />
|
||||
<main-sidebar />
|
||||
|
@ -12,109 +16,125 @@
|
|||
</template>
|
||||
|
||||
<script>
|
||||
import MainNavbar from './main-navbar'
|
||||
import MainSidebar from './main-sidebar'
|
||||
import MainContent from './main-content'
|
||||
import MainThemeTools from './main-theme-tools'
|
||||
import debounce from 'lodash/debounce'
|
||||
import { isURL } from '@/utils/validate'
|
||||
import MainNavbar from "./main-navbar";
|
||||
import MainSidebar from "./main-sidebar";
|
||||
import MainContent from "./main-content";
|
||||
import MainThemeTools from "./main-theme-tools";
|
||||
import debounce from "lodash/debounce";
|
||||
import { isURL } from "@/utils/validate";
|
||||
export default {
|
||||
provide() {
|
||||
return {
|
||||
// 刷新
|
||||
refresh() {
|
||||
this.$store.state.contentIsNeedRefresh = true
|
||||
this.$store.state.contentIsNeedRefresh = true;
|
||||
this.$nextTick(() => {
|
||||
this.$store.state.contentIsNeedRefresh = false
|
||||
})
|
||||
}
|
||||
}
|
||||
this.$store.state.contentIsNeedRefresh = false;
|
||||
});
|
||||
},
|
||||
};
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
loading: true
|
||||
}
|
||||
loading: true,
|
||||
};
|
||||
},
|
||||
components: {
|
||||
MainNavbar,
|
||||
MainSidebar,
|
||||
MainContent,
|
||||
MainThemeTools
|
||||
MainThemeTools,
|
||||
},
|
||||
watch: {
|
||||
$route: 'routeHandle'
|
||||
$route: "routeHandle",
|
||||
},
|
||||
created() {
|
||||
this.windowResizeHandle()
|
||||
this.routeHandle(this.$route)
|
||||
Promise.all([
|
||||
this.getUserInfo(),
|
||||
this.getPermissions()
|
||||
]).then(() => {
|
||||
this.loading = false
|
||||
})
|
||||
this.windowResizeHandle();
|
||||
this.routeHandle(this.$route);
|
||||
Promise.all([this.getUserInfo(), this.getPermissions()]).then(() => {
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
methods: {
|
||||
// 窗口改变大小
|
||||
windowResizeHandle() {
|
||||
this.$store.state.sidebarFold = document.documentElement['clientWidth'] <= 992 || false
|
||||
window.addEventListener('resize', debounce(() => {
|
||||
this.$store.state.sidebarFold = document.documentElement['clientWidth'] <= 992 || false
|
||||
}, 150))
|
||||
this.$store.state.sidebarFold =
|
||||
document.documentElement["clientWidth"] <= 992 || false;
|
||||
window.addEventListener(
|
||||
"resize",
|
||||
debounce(() => {
|
||||
this.$store.state.sidebarFold =
|
||||
document.documentElement["clientWidth"] <= 992 || false;
|
||||
}, 150)
|
||||
);
|
||||
},
|
||||
// 路由, 监听
|
||||
routeHandle(route) {
|
||||
if (!route.meta.isTab) {
|
||||
return false
|
||||
return false;
|
||||
}
|
||||
let tab = {}
|
||||
let routeName = route.name
|
||||
let routeMeta = route.meta
|
||||
if (route.name === 'iframe') {
|
||||
let url = route.query.url || ''
|
||||
let tab = {};
|
||||
let routeName = route.name;
|
||||
let routeMeta = route.meta;
|
||||
if (route.name === "iframe") {
|
||||
let url = route.query.url || "";
|
||||
if (!isURL(url)) {
|
||||
return false
|
||||
return false;
|
||||
}
|
||||
let key = route.query.key || new Date().getTime()
|
||||
routeName = `${routeName}_${key}`
|
||||
routeMeta.title = key.toString()
|
||||
routeMeta.menuId = route.query.menuId || ''
|
||||
routeMeta.iframeURL = url
|
||||
let key = route.query.key || new Date().getTime();
|
||||
routeName = `${routeName}_${key}`;
|
||||
routeMeta.title = key.toString();
|
||||
routeMeta.menuId = route.query.menuId || "";
|
||||
routeMeta.iframeURL = url;
|
||||
}
|
||||
tab = this.$store.state.contentTabs.filter(item => item.name === routeName)[0]
|
||||
tab = this.$store.state.contentTabs.filter(
|
||||
(item) => item.name === routeName
|
||||
)[0];
|
||||
if (!tab) {
|
||||
tab = {
|
||||
...window.SITE_CONFIG['contentTabDefault'],
|
||||
...window.SITE_CONFIG["contentTabDefault"],
|
||||
...routeMeta,
|
||||
'name': routeName,
|
||||
'params': { ...route.params },
|
||||
'query': { ...route.query }
|
||||
name: routeName,
|
||||
params: { ...route.params },
|
||||
query: { ...route.query },
|
||||
};
|
||||
this.$store.state.contentTabs =
|
||||
this.$store.state.contentTabs.concat(tab);
|
||||
}
|
||||
this.$store.state.contentTabs = this.$store.state.contentTabs.concat(tab)
|
||||
}
|
||||
this.$store.state.sidebarMenuActiveName = tab.menuId
|
||||
this.$store.state.contentTabsActiveName = tab.name
|
||||
this.$store.state.sidebarMenuActiveName = tab.menuId;
|
||||
this.$store.state.contentTabsActiveName = tab.name;
|
||||
},
|
||||
// 获取当前管理员信息
|
||||
getUserInfo() {
|
||||
return this.$http.get('/sys/user/info').then(({ data: res }) => {
|
||||
return this.$http
|
||||
.get("/sys/user/info")
|
||||
.then(({ data: res }) => {
|
||||
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.name = res.data.username
|
||||
this.$store.state.user.superAdmin = res.data.superAdmin
|
||||
}).catch(() => {})
|
||||
this.$store.state.user.id = res.data.id;
|
||||
this.$store.state.user.name = res.data.username;
|
||||
this.$store.state.user.superAdmin = res.data.superAdmin;
|
||||
})
|
||||
.catch(() => {});
|
||||
},
|
||||
// 获取权限
|
||||
getPermissions() {
|
||||
return this.$http.get('/sys/menu/permissions').then(({ data: res }) => {
|
||||
return this.$http
|
||||
.get("/sys/menu/permissions")
|
||||
.then(({ data: res }) => {
|
||||
if (res.code !== 0) {
|
||||
return this.$message.error(res.msg)
|
||||
}
|
||||
window.SITE_CONFIG['permissions'] = res.data
|
||||
}).catch(() => {})
|
||||
}
|
||||
}
|
||||
return this.$message.error(res.msg);
|
||||
}
|
||||
window.SITE_CONFIG["permissions"] = res.data;
|
||||
})
|
||||
.catch(() => {});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
.aui-content__wrapper {
|
||||
margin-left: 266px;
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -0,0 +1,134 @@
|
|||
<template>
|
||||
<div>
|
||||
<el-dialog
|
||||
:visible.sync="visible"
|
||||
title="关联应用"
|
||||
@close="close"
|
||||
:close-on-click-modal="false"
|
||||
:close-on-press-escape="false"
|
||||
:key="showKey"
|
||||
>
|
||||
<div class="relate-application-content">
|
||||
<el-transfer
|
||||
v-model="transferValue"
|
||||
filterable
|
||||
:filter-method="filterMethod"
|
||||
filter-placeholder="请输入应用名称"
|
||||
:titles="nameArray"
|
||||
:props="{
|
||||
key: 'id',
|
||||
label: 'name',
|
||||
}"
|
||||
:data="transferData"
|
||||
></el-transfer>
|
||||
</div>
|
||||
<template slot="footer">
|
||||
<el-button @click="visible = false">{{ $t("cancel") }}</el-button>
|
||||
<el-button type="primary" @click="confirmSubmitHandle()">{{
|
||||
$t("confirm")
|
||||
}}</el-button>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import debounce from "lodash/debounce";
|
||||
export default {
|
||||
components: {},
|
||||
data() {
|
||||
return {
|
||||
showKey: 0,
|
||||
visible: true,
|
||||
transferData: [], //穿梭框所有数据
|
||||
transferValue: [], //已关联的数据id
|
||||
};
|
||||
},
|
||||
props: {
|
||||
relateInfo: {
|
||||
type: Object,
|
||||
default: {},
|
||||
},
|
||||
nameArray: {
|
||||
type: Array,
|
||||
default: ["未关联应用名称", "已关联应用名称"],
|
||||
},
|
||||
},
|
||||
computed: {},
|
||||
methods: {
|
||||
close() {
|
||||
this.$emit("isShowRelatePopup", false);
|
||||
},
|
||||
// 表单提交
|
||||
confirmSubmitHandle: debounce(
|
||||
function () {
|
||||
this.$http
|
||||
.post("/dataResourceRel/saveDataResourceRel", {
|
||||
linkType: this.relateInfo.linkType || 2,
|
||||
id: this.relateInfo.id,
|
||||
referenceIds: this.transferValue,
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code == 0) {
|
||||
this.$message.success("关联成功!");
|
||||
} else {
|
||||
this.$message.error("关联失败,请联系管理员!");
|
||||
}
|
||||
this.$emit("isShowRelatePopup", false);
|
||||
})
|
||||
.catch(() => {});
|
||||
},
|
||||
1000,
|
||||
{ leading: true, trailing: false }
|
||||
),
|
||||
filterMethod(query, item) {
|
||||
return item.name && item.name.indexOf(query) > -1;
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
if (this.relateInfo && this.relateInfo.responseData) {
|
||||
const alreadLinkedArr = this.relateInfo.responseData.alreadLinked || [];
|
||||
this.transferData = alreadLinkedArr.concat(
|
||||
this.relateInfo.responseData.notLinked || []
|
||||
);
|
||||
alreadLinkedArr.length &&
|
||||
alreadLinkedArr.forEach((item) => {
|
||||
this.transferValue.push(item.id);
|
||||
});
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.icon-input ::v-deep .el-input__inner {
|
||||
cursor: pointer;
|
||||
}
|
||||
::v-deep .el-dialog__body {
|
||||
height: 580px;
|
||||
overflow: auto;
|
||||
}
|
||||
::v-deep .el-checkbox-button__inner {
|
||||
width: 130px;
|
||||
margin: 0 10px 5px;
|
||||
border-left: unset !important;
|
||||
border-radius: unset !important;
|
||||
border: 1px solid #dcdfe6 !important;
|
||||
}
|
||||
.relate-application-content {
|
||||
height: 100%;
|
||||
::v-deep .el-transfer {
|
||||
height: 100%;
|
||||
}
|
||||
::v-deep .el-transfer-panel {
|
||||
width: 39.5%;
|
||||
height: 100%;
|
||||
}
|
||||
::v-deep .el-transfer-panel__body {
|
||||
height: 100%;
|
||||
}
|
||||
::v-deep .el-transfer-panel__list.is-filterable {
|
||||
height: calc(100% - 102px);
|
||||
}
|
||||
}
|
||||
</style>
|
|
@ -1,10 +1,7 @@
|
|||
<template>
|
||||
<el-card shadow="never" class="aui-card--fill">
|
||||
<div class="mod-ability__bsabilityai">
|
||||
<el-form
|
||||
:inline="true"
|
||||
:model="dataForm"
|
||||
>
|
||||
<el-form :inline="true" :model="dataForm">
|
||||
<el-form-item>
|
||||
<el-input
|
||||
v-model="dataForm.name"
|
||||
|
@ -13,7 +10,7 @@
|
|||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button @click="getDataList2(dataForm.name)">{{
|
||||
<el-button type="primary" @click="getDataList2(dataForm.name)">{{
|
||||
$t("query")
|
||||
}}</el-button>
|
||||
</el-form-item>
|
||||
|
@ -49,7 +46,7 @@
|
|||
:height="qp ? '650px' : '650px'"
|
||||
border
|
||||
@selection-change="dataListSelectionChangeHandle"
|
||||
style="width: 100%;"
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-table-column
|
||||
type="selection"
|
||||
|
@ -71,9 +68,7 @@
|
|||
align="center"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
{{
|
||||
findValue(scope.row.infoList, item.attrType)
|
||||
}}
|
||||
{{ findValue(scope.row.infoList, item.attrType) }}
|
||||
</template>
|
||||
</af-table-column>
|
||||
<el-table-column
|
||||
|
@ -104,6 +99,7 @@
|
|||
<el-button type="text" size="small" @click="showDocument(scope.row)"
|
||||
>开发文档</el-button
|
||||
>
|
||||
<el-button type="text" size="small" @click="showRelateApplication(scope.row)">关联应用</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
@ -124,192 +120,228 @@
|
|||
ref="addOrUpdate"
|
||||
@refreshDataList="getDataList"
|
||||
></add-or-update>
|
||||
<relate-application v-if="relateApplicationVisible" ref="relateApplication" :nameArray="['未关联应用名称', '已关联应用名称']" :relateInfo="relateInfo" @isShowRelatePopup="handleIsShowRelatePopup"></relate-application>
|
||||
</div>
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import mixinViewModule from '@/mixins/view-module'
|
||||
import AddOrUpdate from './bsabilityai-add-or-update'
|
||||
import dictionaries from '@/utils/dictionaries'
|
||||
import qs from 'qs'
|
||||
import mixinViewModule from "@/mixins/view-module";
|
||||
import AddOrUpdate from "./bsabilityai-add-or-update";
|
||||
import dictionaries from "@/utils/dictionaries";
|
||||
import qs from "qs";
|
||||
import RelateApplication from "./bsabilityai-relate-application.vue"
|
||||
export default {
|
||||
mixins: [mixinViewModule],
|
||||
data() {
|
||||
return {
|
||||
mixinViewModuleOptions: {
|
||||
getDataListURL: '/resource/page',
|
||||
getDataListURL: "/resource/page",
|
||||
getDataListIsPage: true,
|
||||
exportURL: '/ability/bsabilityai/export',
|
||||
deleteURL: '/resource/delete',
|
||||
deleteIsBatch: true
|
||||
exportURL: "/ability/bsabilityai/export",
|
||||
deleteURL: "/resource/delete",
|
||||
deleteIsBatch: true,
|
||||
},
|
||||
disabled: false,
|
||||
sceneArr: dictionaries.sceneArr,
|
||||
fieldArr: dictionaries.fieldArr,
|
||||
shareFormArr: dictionaries.shareFormArr,
|
||||
dataForm: {
|
||||
name: '',
|
||||
creator: '',
|
||||
name: "",
|
||||
creator: "",
|
||||
delFlag: 0,
|
||||
selectType: 0,
|
||||
type: '组件服务'
|
||||
type: "组件服务",
|
||||
},
|
||||
qp: false
|
||||
qp: false,
|
||||
// 关联应用弹窗
|
||||
relateApplicationVisible: false,
|
||||
relateInfo: {
|
||||
id: '',
|
||||
responseData: {},
|
||||
linkType: ''
|
||||
}
|
||||
};
|
||||
},
|
||||
watch: {},
|
||||
components: {
|
||||
AddOrUpdate
|
||||
AddOrUpdate,
|
||||
RelateApplication
|
||||
},
|
||||
created() {
|
||||
this.dataForm.name = ''
|
||||
this.dataForm.type = '组件服务'
|
||||
this.dataForm.name = "";
|
||||
this.dataForm.type = "组件服务";
|
||||
},
|
||||
mounted() {
|
||||
window.addEventListener('resize', this.a)
|
||||
this.fullScreen()
|
||||
window.addEventListener("resize", this.a);
|
||||
this.fullScreen();
|
||||
},
|
||||
methods: {
|
||||
reset() {
|
||||
this.$http.get(
|
||||
this.mixinViewModuleOptions.getDataListURL + '?' + qs.stringify({
|
||||
this.$http
|
||||
.get(
|
||||
this.mixinViewModuleOptions.getDataListURL +
|
||||
"?" +
|
||||
qs.stringify({
|
||||
// order: this.order,
|
||||
// orderField: this.orderField,
|
||||
// type: '组件服务',
|
||||
page: 1,
|
||||
limit: 10,
|
||||
creator: '',
|
||||
creator: "",
|
||||
selectType: 0,
|
||||
delFlag: 0,
|
||||
type: '组件服务',
|
||||
name: ''
|
||||
type: "组件服务",
|
||||
name: "",
|
||||
})
|
||||
)
|
||||
.then(({ data: res }) => {
|
||||
this.dataForm.name = ''
|
||||
this.dataForm.name = "";
|
||||
if (res.code !== 0) {
|
||||
this.dataList = []
|
||||
this.total = 0
|
||||
return this.$message.error(res.msg)
|
||||
this.dataList = [];
|
||||
this.total = 0;
|
||||
return this.$message.error(res.msg);
|
||||
}
|
||||
this.dataList = this.mixinViewModuleOptions.getDataListIsPage
|
||||
? res.data.list
|
||||
: res.data
|
||||
: res.data;
|
||||
this.total = this.mixinViewModuleOptions.getDataListIsPage
|
||||
? res.data.total
|
||||
: 0
|
||||
: 0;
|
||||
if (this.mixinViewModuleOptions.requestCallback) {
|
||||
this.mixinViewModuleOptions.requestCallback(res.data)
|
||||
this.mixinViewModuleOptions.requestCallback(res.data);
|
||||
}
|
||||
this.dataListLoading = false
|
||||
this.dataListLoading = false;
|
||||
})
|
||||
.catch(() => {
|
||||
this.dataListLoading = false
|
||||
})
|
||||
this.dataListLoading = false;
|
||||
});
|
||||
},
|
||||
findValue(list, type) {
|
||||
const found = list.find(item => item.attrType === type)
|
||||
const found = list.find((item) => item.attrType === type);
|
||||
if (found) {
|
||||
return found.attrValue
|
||||
return found.attrValue;
|
||||
} else {
|
||||
return '暂无数据'
|
||||
return "暂无数据";
|
||||
}
|
||||
},
|
||||
showDetail(val) {
|
||||
// this.addOrUpdateHandle(id)
|
||||
this.addOrUpdateVisible = true
|
||||
this.disabled = false
|
||||
console.log('显示数据=============》', val)
|
||||
this.addOrUpdateVisible = true;
|
||||
this.disabled = false;
|
||||
console.log("显示数据=============》", val);
|
||||
this.$nextTick(() => {
|
||||
this.$refs.addOrUpdate.UpdateState = false
|
||||
this.$refs.addOrUpdate.dataFormShowDetails = val
|
||||
this.$refs.addOrUpdate.init()
|
||||
})
|
||||
this.disabled = true
|
||||
this.$refs.addOrUpdate.UpdateState = false;
|
||||
this.$refs.addOrUpdate.dataFormShowDetails = val;
|
||||
this.$refs.addOrUpdate.init();
|
||||
});
|
||||
this.disabled = true;
|
||||
},
|
||||
showDocument(val) {
|
||||
console.log(val)
|
||||
window.open(window.SITE_CONFIG.frontUrl + '?id=' + val.id + '&&type=' + val.type, '_blank')
|
||||
console.log(val);
|
||||
window.open(
|
||||
window.SITE_CONFIG.frontUrl + "?id=" + val.id + "&&type=" + val.type,
|
||||
"_blank"
|
||||
);
|
||||
},
|
||||
getDataList2(names) {
|
||||
if (names != null) {
|
||||
this.$http.get(
|
||||
this.mixinViewModuleOptions.getDataListURL + '?' + qs.stringify({
|
||||
this.$http
|
||||
.get(
|
||||
this.mixinViewModuleOptions.getDataListURL +
|
||||
"?" +
|
||||
qs.stringify({
|
||||
// order: this.order,
|
||||
// orderField: this.orderField,
|
||||
// type: '组件服务',
|
||||
pageNum: 1,
|
||||
pageSize: this.limit,
|
||||
type: '组件服务',
|
||||
creator: '',
|
||||
type: "组件服务",
|
||||
creator: "",
|
||||
selectType: 0,
|
||||
delFlag: 0,
|
||||
name: names
|
||||
name: names,
|
||||
})
|
||||
)
|
||||
.then(({ data: res }) => {
|
||||
console.log('res', res)
|
||||
console.log("res", res);
|
||||
if (res.code !== 0) {
|
||||
this.dataList = []
|
||||
this.total = 0
|
||||
return this.$message.error(res.msg)
|
||||
this.dataList = [];
|
||||
this.total = 0;
|
||||
return this.$message.error(res.msg);
|
||||
}
|
||||
if (res.data.list.length !== 0) {
|
||||
this.dataList = res.data.list
|
||||
this.dataList = res.data.list;
|
||||
this.total = this.mixinViewModuleOptions.getDataListIsPage
|
||||
? res.data.total
|
||||
: 0
|
||||
: 0;
|
||||
if (this.mixinViewModuleOptions.requestCallback) {
|
||||
this.mixinViewModuleOptions.requestCallback(res.data)
|
||||
this.mixinViewModuleOptions.requestCallback(res.data);
|
||||
}
|
||||
this.dataListLoading = false
|
||||
this.dataListLoading = false;
|
||||
} else {
|
||||
this.$message.error('未查询到相关信息')
|
||||
this.reset()
|
||||
this.$message.error("未查询到相关信息");
|
||||
this.reset();
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
this.dataListLoading = false
|
||||
})
|
||||
this.dataListLoading = false;
|
||||
});
|
||||
} else {
|
||||
this.$message.error('查询信息不能为空')
|
||||
this.$message.error("查询信息不能为空");
|
||||
}
|
||||
},
|
||||
fullScreen() {
|
||||
if (window.outerHeight === screen.availHeight) {
|
||||
if (window.outerWidth === screen.availWidth) {
|
||||
console.log(
|
||||
'全屏1',
|
||||
"全屏1",
|
||||
window.outerHeight,
|
||||
screen.availHeight,
|
||||
window.outerWidth,
|
||||
screen.availWidth
|
||||
)
|
||||
this.qp = false
|
||||
);
|
||||
this.qp = false;
|
||||
} else {
|
||||
console.log(
|
||||
'不是全屏2',
|
||||
"不是全屏2",
|
||||
window.outerHeight,
|
||||
screen.availHeight,
|
||||
window.outerWidth,
|
||||
screen.availWidth
|
||||
)
|
||||
this.qp = true
|
||||
);
|
||||
this.qp = true;
|
||||
}
|
||||
} else {
|
||||
console.log(
|
||||
'不是全屏3',
|
||||
"不是全屏3",
|
||||
window.outerHeight,
|
||||
screen.availHeight,
|
||||
window.outerWidth,
|
||||
screen.availWidth
|
||||
)
|
||||
this.qp = true
|
||||
}
|
||||
);
|
||||
this.qp = true;
|
||||
}
|
||||
},
|
||||
// 点击关联应用按钮
|
||||
showRelateApplication(row){
|
||||
this.$http.get(`dataResourceRel/queryApplicationRelByResourceId?referenceId=${row.id}`).then(({ data: res }) => {
|
||||
if( res && res.data ) {
|
||||
this.relateApplicationVisible = true;
|
||||
this.relateInfo = {
|
||||
id: row.id,
|
||||
responseData: res.data,
|
||||
linkType: '2'
|
||||
};
|
||||
}
|
||||
}).catch(() => { })
|
||||
},
|
||||
// 是否展示关联应用弹窗
|
||||
handleIsShowRelatePopup(type) {
|
||||
this.relateApplicationVisible = type;
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.el-tooltip__popper {
|
||||
|
|
|
@ -0,0 +1,128 @@
|
|||
<!--
|
||||
* @Author: hisense.liangjunhua
|
||||
* @Date: 2022-06-20 10:38:17
|
||||
* @LastEditors: hisense.liangjunhua
|
||||
* @LastEditTime: 2022-06-20 11:33:13
|
||||
* @Description: 告诉大家这是什么
|
||||
-->
|
||||
<template>
|
||||
<div class="bsabilityimport">
|
||||
<div class="item" @click="downloadTemplate()">
|
||||
<svg t="1655692930310" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1593" width="200" height="200"><path d="M599.13 0.476L33.55 109.306a20.778 20.778 0 0 0-16.492 20.42v764.308a20.778 20.778 0 0 0 16.372 20.48l565.58 108.83a20.837 20.837 0 0 0 3.81 0.654 19.29 19.29 0 0 0 12.622-4.465 21.313 21.313 0 0 0 7.56-16.015V20.361a21.313 21.313 0 0 0-7.56-16.074 19.23 19.23 0 0 0-16.313-3.81z m-206.11 696.08l-46.14-83.348c-10.597-18.575-20.241-37.864-32.148-59.951h-2.203c-10.538 21.67-20.004 40.305-29.767 58.344l-43.937 76.323-87.278-5 115.557-175.985L158.454 342.8l91.147-5.953 41.317 70.608c9.466 16.55 18.337 33.697 30.541 55.784h2.798c9.824-22.683 18.159-40.543 27.03-58.404l38.935-77.395 86.683-5.953-108.592 188.249L483.93 701.915zM966.519 122.76H663.487v143.36h40.364v40.96h-40.364v102.4h40.364v40.96h-40.364V552.9h40.364v40.96h-40.364v122.939h40.364v40.96h-40.364v143.419h302.972a40.781 40.781 0 0 0 40.424-40.96V163.72a40.781 40.781 0 0 0-40.364-40.96zM905.912 757.7H744.275v-40.96h161.637z m0-163.9H744.275v-40.9h161.637z m0-143.418H744.275v-40.9h161.637z m0-143.42H744.275v-40.84h161.637z" fill="#1296db" p-id="1594"></path></svg>
|
||||
<span>下载模板</span>
|
||||
</div>
|
||||
<el-upload
|
||||
ref="addUpload"
|
||||
class="item"
|
||||
:action="fileUploadUrl"
|
||||
:on-success="onSuccess"
|
||||
:on-remove="onRemove"
|
||||
:show-file-list='false'
|
||||
:on-error="onErrorFile"
|
||||
:on-exceed='onExceed'
|
||||
:limit='1'
|
||||
:on-preview="onPreview"
|
||||
list-type="text"
|
||||
>
|
||||
<svg t="1655692986683" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2083" width="200" height="200"><path d="M192 256v29h9.9c-6.5-9.3-9.9-19-9.9-29z m384 128c-41.9 0-82.3-2.2-120-6.4L590.2 512 467.5 634.8c34.4 3.4 70.8 5.2 108.5 5.2 212.1 0 384-57.3 384-128V256c0 70.7-171.9 128-384 128z m-263.9-99h51.3l17.2 17.2c57.2 11.3 124 17.8 195.4 17.8 212.1 0 384-57.3 384-128S788.1 64 576 64s-384 57.3-384 128c0 36.6 46.2 69.7 120.1 93zM576 704c-59.1 0-115.2-4.5-165.2-12.4L363.4 739H192v93c0 70.7 171.9 128 384 128s384-57.3 384-128V576c0 70.7-171.9 128-384 128z" fill="#E6C27C" p-id="2084"></path><path d="M336.9 349H198.6l98.9 98.9H64v128.2h233.5L198.6 675h138.3l162.9-163z" fill="#497CAD" p-id="2085"></path></svg>
|
||||
<div>导入数据</div>
|
||||
</el-upload>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import Cookies from 'js-cookie'
|
||||
export default {
|
||||
name: '',
|
||||
components: {
|
||||
|
||||
},
|
||||
props: {
|
||||
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
fileUploadUrl: window.SITE_CONFIG.apiURL + '/resource//importResource?token=' + Cookies.get('ucsToken')
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
downloadTemplate () {
|
||||
window.open(window.SITE_CONFIG.apiURL + '/%E8%83%BD%E5%8A%9B%E8%B5%84%E6%BA%90%E5%AF%BC%E5%85%A5%E6%A8%A1%E6%9D%BF.xlsx?token=' + Cookies.get('ucsToken'))
|
||||
},
|
||||
onSuccess (res, file) {
|
||||
this.$message({
|
||||
message: '导入成功',
|
||||
type: 'success'
|
||||
})
|
||||
this.$refs.addUpload.clearFiles()
|
||||
},
|
||||
onErrorFile () {
|
||||
this.$message('导入失败!')
|
||||
this.$refs.addUpload.clearFiles() // 去掉文件列表
|
||||
},
|
||||
onRemove (file, fileList) {
|
||||
console.log(file, fileList)
|
||||
},
|
||||
onPreview (file) {
|
||||
console.log('点击预览===============>', file)
|
||||
window.open(file.response.data)
|
||||
},
|
||||
onExceed (files, fileList) {
|
||||
this.$message.warning('当前附件数量已达上限,请先删除部分附件!')
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang='scss' scoped>
|
||||
.bsabilityimport {
|
||||
display: flex;
|
||||
justify-content: space-around;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
padding: 250px 300px;
|
||||
.item {
|
||||
padding: 20px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
border: 1px solid rgba(0, 0, 0, 0);
|
||||
span {
|
||||
font-size: 20px;
|
||||
font-weight: 600;
|
||||
margin-top: 20px;
|
||||
}
|
||||
div {
|
||||
font-size: 20px;
|
||||
font-weight: 600;
|
||||
margin-top: 20px;
|
||||
}
|
||||
}
|
||||
.item:hover {
|
||||
cursor: pointer;
|
||||
border: 1px solid #1296db;
|
||||
border-radius: 10px;
|
||||
svg {
|
||||
animation: turn 2s linear infinite;
|
||||
animation-iteration-count: 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes turn {
|
||||
0% {
|
||||
-webkit-transform: rotateY(0deg);
|
||||
}
|
||||
25% {
|
||||
-webkit-transform: rotateY(90deg);
|
||||
}
|
||||
50% {
|
||||
-webkit-transform: rotateY(180deg);
|
||||
}
|
||||
75% {
|
||||
-webkit-transform: rotateY(270deg);
|
||||
}
|
||||
100% {
|
||||
-webkit-transform: rotateY(360deg);
|
||||
}
|
||||
}
|
||||
</style>
|
|
@ -1,10 +1,7 @@
|
|||
<template>
|
||||
<el-card shadow="never" class="aui-card--fill">
|
||||
<div class="mod-ability__bsabilityai">
|
||||
<el-form
|
||||
:inline="true"
|
||||
:model="dataForm"
|
||||
>
|
||||
<el-form :inline="true" :model="dataForm">
|
||||
<el-form-item>
|
||||
<el-input
|
||||
v-model="dataForm.name"
|
||||
|
@ -13,7 +10,9 @@
|
|||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button @click="getDataList2(dataForm.name)">{{ $t("query") }}</el-button>
|
||||
<el-button @click="getDataList2(dataForm.name)">{{
|
||||
$t("query")
|
||||
}}</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="info" @click="exportHandle()">{{
|
||||
|
@ -45,7 +44,7 @@
|
|||
:data="dataList"
|
||||
border
|
||||
@selection-change="dataListSelectionChangeHandle"
|
||||
style="width: 100%;"
|
||||
style="width: 100%"
|
||||
:height="qp ? '810px' : '650px'"
|
||||
>
|
||||
<el-table-column
|
||||
|
@ -67,12 +66,10 @@
|
|||
:label="item.attrType"
|
||||
header-align="center"
|
||||
align="center"
|
||||
show-overflow-tooltip="true"
|
||||
:show-overflow-tooltip="true"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
{{
|
||||
findValue(scope.row.infoList, item.attrType)
|
||||
}}
|
||||
{{ findValue(scope.row.infoList, item.attrType) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
|
@ -101,7 +98,33 @@
|
|||
<el-button type="text" size="small" @click="showDetail(scope.row)"
|
||||
>展示</el-button
|
||||
>
|
||||
<el-button type="text" size="small" @click="showDocument(scope.row)">开发文档</el-button>
|
||||
<el-button type="text" size="small" @click="showDocument(scope.row)"
|
||||
>开发文档</el-button
|
||||
>
|
||||
<el-button
|
||||
type="text"
|
||||
size="small"
|
||||
@click="applyAndAssembly(scope.row)"
|
||||
>应用与组件</el-button
|
||||
>
|
||||
<el-button
|
||||
type="text"
|
||||
size="small"
|
||||
@click="applyAndDataResource(scope.row)"
|
||||
>应用与数据资源</el-button
|
||||
>
|
||||
<el-button
|
||||
type="text"
|
||||
size="small"
|
||||
@click="applyAndProject(scope.row)"
|
||||
>应用与项目</el-button
|
||||
>
|
||||
<el-button
|
||||
type="text"
|
||||
size="small"
|
||||
@click="applyAndInfrastructure(scope.row)"
|
||||
>应用与基础设施</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
@ -122,57 +145,72 @@
|
|||
ref="addOrUpdate"
|
||||
@refreshDataList="getDataList"
|
||||
></add-or-update>
|
||||
<relate-application
|
||||
v-if="relateApplicationResourceVisible"
|
||||
ref="relateApplication"
|
||||
:relateInfo="relationData"
|
||||
:nameArray="topNameArray"
|
||||
@isShowRelatePopup="handleIsShowRelatePopupApply"
|
||||
></relate-application>
|
||||
</div>
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import mixinViewModule from '@/mixins/view-module'
|
||||
import AddOrUpdate from './bsabilityservice-add-or-update'
|
||||
import dictionaries from '@/utils/dictionaries'
|
||||
import qs from 'qs'
|
||||
import { type } from 'os'
|
||||
import mixinViewModule from "@/mixins/view-module";
|
||||
import AddOrUpdate from "./bsabilityservice-add-or-update";
|
||||
import dictionaries from "@/utils/dictionaries";
|
||||
import RelateApplication from "./bsabilityai-relate-application.vue";
|
||||
import qs from "qs";
|
||||
import { type } from "os";
|
||||
export default {
|
||||
mixins: [mixinViewModule],
|
||||
data() {
|
||||
return {
|
||||
mixinViewModuleOptions: {
|
||||
getDataListURL: '/resource/page',
|
||||
getDataListURL: "/resource/page",
|
||||
getDataListIsPage: true,
|
||||
exportURL: '/ability/bsabilityai/export',
|
||||
deleteURL: '/resource/delete',
|
||||
deleteIsBatch: true
|
||||
exportURL: "/ability/bsabilityai/export",
|
||||
deleteURL: "/resource/delete",
|
||||
deleteIsBatch: true,
|
||||
},
|
||||
disabled: false,
|
||||
sceneArr: dictionaries.sceneArr,
|
||||
fieldArr: dictionaries.fieldArr,
|
||||
shareFormArr: dictionaries.shareFormArr,
|
||||
dataForm: {
|
||||
name: '',
|
||||
creator: '',
|
||||
name: "",
|
||||
creator: "",
|
||||
selectType: 0,
|
||||
delFlag: 0,
|
||||
type: '应用资源'
|
||||
type: "应用资源",
|
||||
},
|
||||
qp: false
|
||||
}
|
||||
qp: false,
|
||||
relateApplicationResourceVisible: false,
|
||||
relationData: {}, //打开穿梭框时传递的参数
|
||||
topNameArray: [], //
|
||||
};
|
||||
},
|
||||
watch: {},
|
||||
components: {
|
||||
AddOrUpdate
|
||||
AddOrUpdate,
|
||||
RelateApplication,
|
||||
},
|
||||
created() {
|
||||
this.dataForm.name = ''
|
||||
this.dataForm.type = '应用资源'
|
||||
this.dataForm.name = "";
|
||||
this.dataForm.type = "应用资源";
|
||||
},
|
||||
mounted() {
|
||||
window.addEventListener('resize', this.a)
|
||||
this.fullScreen()
|
||||
window.addEventListener("resize", this.a);
|
||||
this.fullScreen();
|
||||
},
|
||||
methods: {
|
||||
reset() {
|
||||
this.$http.get(
|
||||
this.mixinViewModuleOptions.getDataListURL + '?' + qs.stringify({
|
||||
this.$http
|
||||
.get(
|
||||
this.mixinViewModuleOptions.getDataListURL +
|
||||
"?" +
|
||||
qs.stringify({
|
||||
// order: this.order,
|
||||
// orderField: this.orderField,
|
||||
// type: '组件服务',
|
||||
|
@ -180,124 +218,230 @@ export default {
|
|||
selectType: 0,
|
||||
limit: 10,
|
||||
delFlag: 0,
|
||||
creator: '',
|
||||
type: '应用资源',
|
||||
name: ''
|
||||
creator: "",
|
||||
type: "应用资源",
|
||||
name: "",
|
||||
})
|
||||
|
||||
).then(({ data: res }) => {
|
||||
this.dataForm.name = ''
|
||||
)
|
||||
.then(({ data: res }) => {
|
||||
this.dataForm.name = "";
|
||||
if (res.code !== 0) {
|
||||
this.dataList = []
|
||||
this.total = 0
|
||||
return this.$message.error(res.msg)
|
||||
this.dataList = [];
|
||||
this.total = 0;
|
||||
return this.$message.error(res.msg);
|
||||
}
|
||||
this.dataList = this.mixinViewModuleOptions.getDataListIsPage ? res.data.list : res.data
|
||||
this.total = this.mixinViewModuleOptions.getDataListIsPage ? res.data.total : 0
|
||||
this.dataList = this.mixinViewModuleOptions.getDataListIsPage
|
||||
? res.data.list
|
||||
: res.data;
|
||||
this.total = this.mixinViewModuleOptions.getDataListIsPage
|
||||
? res.data.total
|
||||
: 0;
|
||||
if (this.mixinViewModuleOptions.requestCallback) {
|
||||
this.mixinViewModuleOptions.requestCallback(res.data)
|
||||
this.mixinViewModuleOptions.requestCallback(res.data);
|
||||
}
|
||||
this.dataListLoading = false
|
||||
}).catch(() => {
|
||||
this.dataListLoading = false
|
||||
this.dataListLoading = false;
|
||||
})
|
||||
.catch(() => {
|
||||
this.dataListLoading = false;
|
||||
});
|
||||
},
|
||||
showDetail(val) {
|
||||
this.addOrUpdateVisible = true
|
||||
this.disabled = false
|
||||
this.addOrUpdateVisible = true;
|
||||
this.disabled = false;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.addOrUpdate.UpdateState = false
|
||||
this.$refs.addOrUpdate.dataFormShowDetails = val
|
||||
this.$refs.addOrUpdate.init()
|
||||
})
|
||||
this.disabled = true
|
||||
this.$refs.addOrUpdate.UpdateState = false;
|
||||
this.$refs.addOrUpdate.dataFormShowDetails = val;
|
||||
this.$refs.addOrUpdate.init();
|
||||
});
|
||||
this.disabled = true;
|
||||
},
|
||||
showDocument(val) {
|
||||
console.log(val)
|
||||
window.open(window.SITE_CONFIG.frontUrl + '?id=' + val.id + '&&type=' + val.type, '_blank')
|
||||
console.log(val);
|
||||
window.open(
|
||||
window.SITE_CONFIG.frontUrl + "?id=" + val.id + "&&type=" + val.type,
|
||||
"_blank"
|
||||
);
|
||||
},
|
||||
findValue(list, type) {
|
||||
const found = list.find(item => item.attrType === type)
|
||||
const found = list.find((item) => item.attrType === type);
|
||||
if (found) {
|
||||
return found.attrValue
|
||||
return found.attrValue;
|
||||
} else {
|
||||
return '暂无数据'
|
||||
return "暂无数据";
|
||||
}
|
||||
},
|
||||
getDataList2(names) {
|
||||
if (names != null) {
|
||||
this.$http.get(
|
||||
this.mixinViewModuleOptions.getDataListURL + '?' + qs.stringify({
|
||||
this.$http
|
||||
.get(
|
||||
this.mixinViewModuleOptions.getDataListURL +
|
||||
"?" +
|
||||
qs.stringify({
|
||||
// order: this.order,
|
||||
// orderField: this.orderField,
|
||||
// type: '组件服务',
|
||||
pageNum: 1,
|
||||
pageSize: this.limit,
|
||||
type: '应用资源',
|
||||
creator: '',
|
||||
type: "应用资源",
|
||||
creator: "",
|
||||
selectType: 0,
|
||||
delFlag: 0,
|
||||
name: names
|
||||
name: names,
|
||||
})
|
||||
)
|
||||
.then(({ data: res }) => {
|
||||
if (res.code !== 0) {
|
||||
this.dataList = []
|
||||
this.total = 0
|
||||
return this.$message.error(res.msg)
|
||||
this.dataList = [];
|
||||
this.total = 0;
|
||||
return this.$message.error(res.msg);
|
||||
}
|
||||
if (res.data.list.length !== 0) {
|
||||
this.dataList = res.data.list
|
||||
this.total = this.mixinViewModuleOptions.getDataListIsPage ? res.data.total : 0
|
||||
this.dataList = res.data.list;
|
||||
this.total = this.mixinViewModuleOptions.getDataListIsPage
|
||||
? res.data.total
|
||||
: 0;
|
||||
if (this.mixinViewModuleOptions.requestCallback) {
|
||||
this.mixinViewModuleOptions.requestCallback(res.data)
|
||||
this.mixinViewModuleOptions.requestCallback(res.data);
|
||||
}
|
||||
this.dataListLoading = false
|
||||
this.dataListLoading = false;
|
||||
} else {
|
||||
this.$message.error('未查询到相关信息')
|
||||
this.reset()
|
||||
this.$message.error("未查询到相关信息");
|
||||
this.reset();
|
||||
}
|
||||
}).catch(() => {
|
||||
this.dataListLoading = false
|
||||
})
|
||||
.catch(() => {
|
||||
this.dataListLoading = false;
|
||||
});
|
||||
} else {
|
||||
this.$message.error('查询不能输入为空')
|
||||
this.$message.error("查询不能输入为空");
|
||||
}
|
||||
},
|
||||
fullScreen() {
|
||||
if (window.outerHeight === screen.availHeight) {
|
||||
if (window.outerWidth === screen.availWidth) {
|
||||
console.log(
|
||||
'全屏1',
|
||||
"全屏1",
|
||||
window.outerHeight,
|
||||
screen.availHeight,
|
||||
window.outerWidth,
|
||||
screen.availWidth
|
||||
)
|
||||
this.qp = false
|
||||
);
|
||||
this.qp = false;
|
||||
} else {
|
||||
console.log(
|
||||
'不是全屏2',
|
||||
"不是全屏2",
|
||||
window.outerHeight,
|
||||
screen.availHeight,
|
||||
window.outerWidth,
|
||||
screen.availWidth
|
||||
)
|
||||
this.qp = true
|
||||
);
|
||||
this.qp = true;
|
||||
}
|
||||
} else {
|
||||
console.log(
|
||||
'不是全屏3',
|
||||
"不是全屏3",
|
||||
window.outerHeight,
|
||||
screen.availHeight,
|
||||
window.outerWidth,
|
||||
screen.availWidth
|
||||
)
|
||||
this.qp = true
|
||||
);
|
||||
this.qp = true;
|
||||
}
|
||||
},
|
||||
//应用与组件
|
||||
applyAndAssembly(val) {
|
||||
console.log("vvvv", val);
|
||||
//根据id和类型查询已关联的组件,将id,type和查出来的数据传递给组件
|
||||
let type = "组件服务";
|
||||
let id = val.id;
|
||||
this.$http
|
||||
.get(`/dataResourceRel/queryResourceRelByKeyId`, {
|
||||
params: {
|
||||
keyId: id,
|
||||
type: type,
|
||||
referenceName: "",
|
||||
},
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code !== 0) {
|
||||
return this.$message.error(res.msg);
|
||||
}
|
||||
console.log("rrrrressssz", res.data);
|
||||
this.relateApplicationResourceVisible = true;
|
||||
this.relationData = {
|
||||
id: id,
|
||||
linkType: "1",
|
||||
responseData: res.data,
|
||||
};
|
||||
this.topNameArray = ["未关联组件名称", "已关联组件名称"];
|
||||
console.log(" this.relationData", this.relationData);
|
||||
//将数据传递给引入的组件
|
||||
});
|
||||
},
|
||||
//应用与数据资源
|
||||
applyAndDataResource(val) {
|
||||
console.log("数据资源");
|
||||
},
|
||||
//应用与项目
|
||||
applyAndProject(val) {
|
||||
let type = "项目";
|
||||
let id = val.id;
|
||||
this.$http
|
||||
.get(`/dataResourceRel/queryResourceRelByKeyId`, {
|
||||
params: {
|
||||
keyId: id,
|
||||
type: type,
|
||||
referenceName: "",
|
||||
},
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code !== 0) {
|
||||
return this.$message.error(res.msg);
|
||||
}
|
||||
console.log("rrrrressssx", res.data);
|
||||
this.relateApplicationResourceVisible = true;
|
||||
this.relationData = {
|
||||
id: id,
|
||||
linkType: "1",
|
||||
responseData: res.data,
|
||||
};
|
||||
this.topNameArray = ["未关联项目名称", "已关联项目名称"];
|
||||
//将数据传递给引入的组件
|
||||
});
|
||||
},
|
||||
//应用与基础设施
|
||||
applyAndInfrastructure(val) {
|
||||
let type = "基础设施";
|
||||
let id = val.id;
|
||||
this.$http
|
||||
.get(`/dataResourceRel/queryResourceRelByKeyId`, {
|
||||
params: {
|
||||
keyId: id,
|
||||
type: type,
|
||||
referenceName: "",
|
||||
},
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code !== 0) {
|
||||
return this.$message.error(res.msg);
|
||||
}
|
||||
console.log("rrrrressssj", res.data);
|
||||
this.relateApplicationResourceVisible = true;
|
||||
this.relationData = {
|
||||
id: id,
|
||||
linkType: "1",
|
||||
responseData: res.data,
|
||||
};
|
||||
this.topNameArray = ["未关联基础设施名称", "已关联基础设施名称"];
|
||||
//将数据传递给引入的组件
|
||||
});
|
||||
},
|
||||
// 是否展示关联应用弹窗
|
||||
handleIsShowRelatePopupApply(type) {
|
||||
this.relateApplicationResourceVisible = type;
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.el-tooltip__popper {
|
||||
|
|
|
@ -0,0 +1,110 @@
|
|||
<!-- 数据资源目录编制 /bscatalogue/dataResources -->
|
||||
<template>
|
||||
<el-card shadow="never" class="aui-card--fill">
|
||||
<div class="mod-pay__order">
|
||||
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
|
||||
<el-form-item>
|
||||
<ren-select v-model="dataForm.status" dict-type="category" :placeholder="$t('dataresources.componentType')"></ren-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-input v-model="dataForm.orderId" :placeholder="$t('dataresources.componentName')" clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-date-picker v-model="dataForm.applydate" value-format="yyyy-MM-dd" type="date" :placeholder="$t('dataresources.putOnDate')" clearable></el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button @click="getDataList()">{{ $t('query') }}</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="resetDataList()">{{ $t('reset') }}</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-table v-loading="dataListLoading" :data="dataList" border @selection-change="dataListSelectionChangeHandle" style="width: 100%;">
|
||||
<el-table-column prop="orderId" :label="$t('dataresources.resourcesName')" header-align="center" align="center"></el-table-column>
|
||||
<el-table-column prop="productName" :label="$t('dataresources.resourcesCode')" header-align="center" align="center"></el-table-column>
|
||||
<el-table-column prop="payAmount" :label="$t('dataresources.resourcesProvide')" header-align="center" align="center"></el-table-column>
|
||||
<el-table-column prop="status" :label="$t('dataresources.resourcesAbstract')" header-align="center" align="center"></el-table-column>
|
||||
<el-table-column prop="payAt" :label="$t('dataresources.putOnDate')" header-align="center" align="center"></el-table-column>
|
||||
<el-table-column :label="$t('handle')" fixed="right" header-align="center" align="center" width="150">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="primary" @click="showRelateApplication(scope.row)">{{ $t('dataresources.associatedApplication') }}</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-pagination
|
||||
:current-page="page"
|
||||
:page-sizes="[10, 20, 50, 100]"
|
||||
:page-size="limit"
|
||||
:total="total"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="pageSizeChangeHandle"
|
||||
@current-change="pageCurrentChangeHandle">
|
||||
</el-pagination>
|
||||
<!-- 弹窗, 新增 / 修改 -->
|
||||
<!-- <add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update> -->
|
||||
<relate-application v-if="relateApplicationVisible" ref="relateApplication" :relateInfo="relateInfo" @isShowRelatePopup="handleIsShowRelatePopup"></relate-application>
|
||||
</div>
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import mixinViewModule from '@/mixins/view-module'
|
||||
// import AddOrUpdate from './order-add-or-update'
|
||||
import {addDynamicRoute} from "@/router";
|
||||
import RelateApplication from "./bsabilityai-relate-application.vue"
|
||||
|
||||
export default {
|
||||
mixins: [mixinViewModule],
|
||||
data () {
|
||||
return {
|
||||
mixinViewModuleOptions: {
|
||||
getDataListURL: '/pay/order/page',
|
||||
getDataListIsPage: true,
|
||||
deleteURL: '/pay/order',
|
||||
deleteIsBatch: true
|
||||
},
|
||||
dataForm: {
|
||||
orderId: '',
|
||||
status: '',
|
||||
userId: ''
|
||||
},
|
||||
// 关联应用弹窗
|
||||
relateApplicationVisible: false,
|
||||
relateInfo: {
|
||||
id: '',
|
||||
responseData: {},
|
||||
linkType: ''
|
||||
}
|
||||
}
|
||||
},
|
||||
components: {
|
||||
// AddOrUpdate,
|
||||
RelateApplication,
|
||||
},
|
||||
methods: {
|
||||
//重置
|
||||
resetDataList(){
|
||||
this.dataForm=this.noDataForm;
|
||||
this.page=1; // 当前页码
|
||||
this.query();
|
||||
},
|
||||
// 点击关联应用按钮
|
||||
showRelateApplication(row){
|
||||
this.$http.get(`dataResourceRel/queryApplicationRelByResourceId?referenceId=${row.id}`).then(({ data: res }) => {
|
||||
if( res && res.data ) {
|
||||
this.relateApplicationVisible = true;
|
||||
this.relateInfo = {
|
||||
id: row.id,
|
||||
responseData: res.data,
|
||||
linkType: '2'
|
||||
};
|
||||
}
|
||||
}).catch(() => { })
|
||||
},
|
||||
// 是否展示关联应用弹窗
|
||||
handleIsShowRelatePopup(type) {
|
||||
this.relateApplicationVisible = type;
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
|
@ -0,0 +1,107 @@
|
|||
<!-- 基础设施目录编制 /bscatalogue/infrastructure -->
|
||||
<template>
|
||||
<el-card shadow="never" class="aui-card--fill">
|
||||
<div class="mod-pay__order">
|
||||
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
|
||||
<el-form-item>
|
||||
<ren-select v-model="dataForm.status" dict-type="resourceType" :placeholder="$t('infrastructure.resourceCategory')"></ren-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-input v-model="dataForm.orderId" :placeholder="$t('infrastructure.resourceName')" clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button @click="getDataList()">{{ $t('query') }}</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="resetDataList()">{{ $t('reset') }}</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-table v-loading="dataListLoading" :data="dataList" border @selection-change="dataListSelectionChangeHandle" style="width: 100%;">
|
||||
<el-table-column prop="orderId" :label="$t('infrastructure.resourceName')" header-align="center" align="center"></el-table-column>
|
||||
<el-table-column prop="productName" :label="$t('infrastructure.district')" header-align="center" align="center"></el-table-column>
|
||||
<el-table-column prop="payAmount" :label="$t('infrastructure.street')" header-align="center" align="center"></el-table-column>
|
||||
<el-table-column prop="status" :label="$t('infrastructure.department')" header-align="center" align="center"></el-table-column>
|
||||
<el-table-column :label="$t('handle')" fixed="right" header-align="center" align="center" width="150">
|
||||
<template slot-scope="scope">
|
||||
<el-button type="primary" @click="showRelateApplication(scope.row)">{{ $t('infrastructure.associatedApplication') }}</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-pagination
|
||||
:current-page="page"
|
||||
:page-sizes="[10, 20, 50, 100]"
|
||||
:page-size="limit"
|
||||
:total="total"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="pageSizeChangeHandle"
|
||||
@current-change="pageCurrentChangeHandle">
|
||||
</el-pagination>
|
||||
<!-- 弹窗, 新增 / 修改 -->
|
||||
<!-- <add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update> -->
|
||||
<relate-application v-if="relateApplicationVisible" ref="relateApplication" :relateInfo="relateInfo" @isShowRelatePopup="handleIsShowRelatePopup"></relate-application>
|
||||
</div>
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import mixinViewModule from '@/mixins/view-module'
|
||||
// import AddOrUpdate from './order-add-or-update'
|
||||
import {addDynamicRoute} from "@/router";
|
||||
import RelateApplication from "./bsabilityai-relate-application.vue"
|
||||
export default {
|
||||
mixins: [mixinViewModule],
|
||||
data () {
|
||||
return {
|
||||
mixinViewModuleOptions: {
|
||||
getDataListURL: '/resource/page',
|
||||
getDataListIsPage: true,
|
||||
deleteURL: '',
|
||||
deleteIsBatch: true
|
||||
},
|
||||
dataForm: {
|
||||
orderId: '',
|
||||
status: '',
|
||||
userId: '',
|
||||
type: "基础设施",
|
||||
},
|
||||
// 关联应用弹窗
|
||||
relateApplicationVisible: false,
|
||||
relateInfo: {
|
||||
id: '',
|
||||
responseData: {},
|
||||
linkType: ''
|
||||
}
|
||||
}
|
||||
},
|
||||
components: {
|
||||
// AddOrUpdate,
|
||||
RelateApplication,
|
||||
},
|
||||
methods: {
|
||||
//重置
|
||||
resetDataList(){
|
||||
this.dataForm=this.noDataForm;
|
||||
this.page=1; // 当前页码
|
||||
this.query();
|
||||
},
|
||||
// 点击关联应用按钮
|
||||
showRelateApplication(row){
|
||||
this.$http.get(`dataResourceRel/queryApplicationRelByResourceId?referenceId=${row.id}`).then(({ data: res }) => {
|
||||
if( res && res.data ) {
|
||||
this.relateApplicationVisible = true;
|
||||
this.relateInfo = {
|
||||
id: row.id,
|
||||
responseData: res.data,
|
||||
linkType: '2'
|
||||
};
|
||||
}
|
||||
}).catch(() => { })
|
||||
},
|
||||
// 是否展示关联应用弹窗
|
||||
handleIsShowRelatePopup(type) {
|
||||
this.relateApplicationVisible = type;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
|
@ -0,0 +1,818 @@
|
|||
<template>
|
||||
<div class='container'>
|
||||
<span class='title-style'>应用资源</span>
|
||||
<span class='page-introduction'>发布情况统计</span>
|
||||
<div class='container-body'>
|
||||
<div class='container-body1'>
|
||||
<span style='font-size:18px;color;#000000;'>应用贡献组件被调用次数分布</span>
|
||||
<div id="main1" style="width: 400px;height:230px;"></div>
|
||||
</div>
|
||||
<div class='container-body2'>
|
||||
<span style='font-size:18px;color;#000000;'>应用贡献组件数量分布</span>
|
||||
<div id="main2" style="width: 400px;height:200px;"></div>
|
||||
</div>
|
||||
<div class='container-body3'>
|
||||
<span style='font-size:18px;color;#000000;'>贡献组件被应用使用数量分布</span>
|
||||
<div id="main3" style="width: 400px;height:230px;"></div>
|
||||
</div>
|
||||
<div class='container-body4'>
|
||||
<span style='font-size:18px;color;#000000;'>应用贡献组件数量分布</span>
|
||||
<div id="main4" style="width: 650px;height:230px;"></div>
|
||||
</div>
|
||||
<div class='container-body5'>
|
||||
<div style='margin-bottom:30px'>
|
||||
<span style='font-size:18px;color;#000000;'>应用贡献组件被调用</span>
|
||||
<img src="@/assets/img/TOP5.png" style='margin-left:10px'>
|
||||
</div>
|
||||
<div v-for="(item,index) in usedList" :key='index' >
|
||||
<div style='display:flex'>
|
||||
<div class='ranking-img' :style="{background:colorList[index%5],width: widthList[index%5]}">
|
||||
<span style='font-weight:bold' :style="{color:numColorList[index%5]}">{{index+1}}</span>
|
||||
</div>
|
||||
<span class='num-style'>{{item.name}}</span>
|
||||
<span class='count-style' :style="{color:numColorList[index%5]}">{{item.count}}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class='container-body6'>
|
||||
<span style='font-size:18px;color;#000000;'>评分分布情况</span>
|
||||
<div id="main6" style="width: 400px;height:200px;"></div>
|
||||
</div>
|
||||
<div class='container-body7'>
|
||||
<span style='font-size:18px;color;#000000;'>发布端应用分布情况</span>
|
||||
<div id="main7" style="width: 300px;height:200px;"></div>
|
||||
</div>
|
||||
<div class='container-body8'>
|
||||
<span style='font-size:18px;color;#000000;'>应用领域分布情况</span>
|
||||
<div id="main8" style="width: 300px;height:200px;"></div>
|
||||
</div>
|
||||
<div class='container-body9'>
|
||||
<span style='font-size:18px;color;#000000;'>应用状态分布情况</span>
|
||||
<div id="main9" style="width: 250px;height:200px;"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import * as echarts from 'echarts';
|
||||
|
||||
export default {
|
||||
data(){
|
||||
return{
|
||||
colorList:['linear-gradient(to right, rgba(82, 106, 255,0.8),transparent)', 'linear-gradient(to right,rgba(251, 123, 5),transparent)','linear-gradient(to right,rgba(250, 179, 2,.6),transparent)','linear-gradient(to right,rgba(82, 106, 255,.6),transparent','linear-gradient(to right,rgba(82, 106, 255,.6),transparent)',],
|
||||
widthList:['90px','80px','70px','60px','50px'],
|
||||
numColorList:['#fc5656','#ff8a00','#f9af0a','#808fff','#808fff'],
|
||||
usedList:[{name:'组件名称一',count:111},{name:'组件名称一',count:111},{name:'组件名称一',count:111},{name:'组件名称四',count:111},{name:'组件名称五',count:111},],
|
||||
|
||||
}
|
||||
},
|
||||
mounted(){
|
||||
this.myEcharts1()
|
||||
this.myEcharts2()
|
||||
this.myEcharts3()
|
||||
this.myEcharts4()
|
||||
this.myEcharts6()
|
||||
this.myEcharts7()
|
||||
this.myEcharts8()
|
||||
this.myEcharts9()
|
||||
},
|
||||
methods:{
|
||||
myEcharts1(){
|
||||
var chartDom = document.getElementById('main1');
|
||||
var myChart = echarts.init(chartDom);
|
||||
var option;
|
||||
option = {
|
||||
grid: {
|
||||
bottom: '23%',
|
||||
},
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
data: ['算法', '图层', '开发', '业务'],
|
||||
color:['#f5f5f5'],
|
||||
axisTick:{
|
||||
show:false,//不显示坐标轴刻度线
|
||||
},
|
||||
splitLine: {
|
||||
show: true,
|
||||
color:['#f5f5f5']
|
||||
},
|
||||
axisLine:{
|
||||
lineStyle:{
|
||||
color:"#ebebeb"
|
||||
}
|
||||
},
|
||||
axisLabel: {//y轴文字的配置
|
||||
textStyle: {
|
||||
color: "#999999",//Y轴内容文字颜色
|
||||
},
|
||||
},
|
||||
},
|
||||
yAxis: {
|
||||
name:'次数',
|
||||
splitLine: {
|
||||
show: false
|
||||
},
|
||||
type: 'value',
|
||||
interval:20, //控制y轴的刻度
|
||||
type: 'value',
|
||||
axisTick:{ //控制y轴的刻度
|
||||
show:false
|
||||
},
|
||||
nameTextStyle:{
|
||||
color:"#999999"
|
||||
},
|
||||
axisLine:{
|
||||
lineStyle:{
|
||||
color:"#ebebeb"
|
||||
}
|
||||
},
|
||||
axisLabel: {//y轴文字的配置
|
||||
textStyle: {
|
||||
color: "#999999",//Y轴内容文字颜色
|
||||
},
|
||||
},
|
||||
},
|
||||
series: [
|
||||
{
|
||||
data: [60, 90, 50, 80],
|
||||
type: 'bar',
|
||||
barWidth: 14,
|
||||
|
||||
itemStyle: {
|
||||
barBorderRadius: [20,20,20,20],
|
||||
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
||||
{ offset: 0, color: 'rgba(178, 189, 255,0.8)' },
|
||||
// { offset: 0.5, color: '#188df0' },
|
||||
{ offset: 1, color: 'rgba(82, 106, 255,0.8)' }
|
||||
])
|
||||
},
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
option && myChart.setOption(option);
|
||||
},
|
||||
myEcharts2(){
|
||||
var chartDom = document.getElementById('main2');
|
||||
var myChart = echarts.init(chartDom);
|
||||
var option;
|
||||
option = {
|
||||
tooltip: {
|
||||
trigger: 'item'
|
||||
},
|
||||
legend: {
|
||||
orient: '',
|
||||
top: '22%',
|
||||
left: '50%',
|
||||
width:"auto",
|
||||
height:"auto",
|
||||
orient: "vertical",
|
||||
itemGap: 15,
|
||||
itemWidth: 14,
|
||||
// 使用回调函数
|
||||
formatter: function(name) {
|
||||
var data = option.series[0].data;
|
||||
var total = 0;
|
||||
var tarValue;
|
||||
for (var i = 0; i < data.length; i++) {
|
||||
total += data[i].value;
|
||||
if (data[i].name == name) {
|
||||
tarValue = data[i].value;
|
||||
}
|
||||
}
|
||||
var v = tarValue;
|
||||
var p = Math.round(((tarValue / total) * 100));
|
||||
return `${name} ${p}%`;
|
||||
},
|
||||
itemStyle:{},
|
||||
textStyle: {
|
||||
color: "#666666",
|
||||
padding:[0,8,0,18]
|
||||
},
|
||||
},
|
||||
color: ['#0087ff', '#51cb8d', '#fcc549', '#ef6567', '#ff8a00', '#fc5656'],
|
||||
series: [
|
||||
{
|
||||
// name: 'Access From',
|
||||
type: 'pie',
|
||||
radius: ['40%', '60%'],
|
||||
center:['22%', '50%'],
|
||||
avoidLabelOverlap: false,
|
||||
itemStyle: {
|
||||
borderRadius: 10,
|
||||
borderColor: '#fff',
|
||||
borderWidth: 2
|
||||
},
|
||||
label: {
|
||||
show: false,
|
||||
position: 'center'
|
||||
},
|
||||
// emphasis: {
|
||||
// label: {
|
||||
// show: true,
|
||||
// fontSize: '40',
|
||||
// fontWeight: 'bold'
|
||||
// }
|
||||
// },
|
||||
labelLine: {
|
||||
show: false
|
||||
},
|
||||
data: [
|
||||
{ value: 1048, name: '算法' },
|
||||
{ value: 735, name: '图层' },
|
||||
{ value: 580, name: '开发' },
|
||||
{ value: 484, name: '业务' },
|
||||
]
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
option && myChart.setOption(option);
|
||||
},
|
||||
myEcharts3(){
|
||||
var chartDom = document.getElementById('main3');
|
||||
var myChart = echarts.init(chartDom);
|
||||
var option;
|
||||
option = {
|
||||
grid: {
|
||||
bottom: '23%',
|
||||
},
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
data: ['算法', '图层', '开发', '业务'],
|
||||
color:['#f5f5f5'],
|
||||
axisTick:{
|
||||
show:false,//不显示坐标轴刻度线
|
||||
},
|
||||
splitLine: {
|
||||
show: true,
|
||||
color:['#f5f5f5']
|
||||
},
|
||||
axisLine:{
|
||||
lineStyle:{
|
||||
color:"#ebebeb"
|
||||
}
|
||||
},
|
||||
axisLabel: {//x轴文字的配置
|
||||
textStyle: {
|
||||
color: "#999999",//x轴内容文字颜色
|
||||
},
|
||||
},
|
||||
},
|
||||
yAxis: {
|
||||
name:'应用数',
|
||||
nameTextStyle:{
|
||||
color:"#999999"
|
||||
},
|
||||
splitLine: {
|
||||
show: false
|
||||
},
|
||||
type: 'value',
|
||||
interval:20, //控制y轴的刻度
|
||||
type: 'value',
|
||||
axisTick:{ //控制y轴的刻度
|
||||
show:false
|
||||
},
|
||||
axisLine:{
|
||||
lineStyle:{
|
||||
color:"#ebebeb"
|
||||
}
|
||||
},
|
||||
axisLabel: {//y轴文字的配置
|
||||
textStyle: {
|
||||
color: "#999999",//Y轴内容文字颜色
|
||||
},
|
||||
},
|
||||
},
|
||||
series: [
|
||||
{
|
||||
data: [60, 90, 50, 80],
|
||||
type: 'bar',
|
||||
barWidth: 14,
|
||||
|
||||
itemStyle: {
|
||||
barBorderRadius: [20,20,20,20],
|
||||
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
||||
{ offset: 0, color: 'rgba(178, 189, 255,0.8)' },
|
||||
// { offset: 0.5, color: '#188df0' },
|
||||
{ offset: 1, color: 'rgba(82, 106, 255,0.8)' }
|
||||
])
|
||||
},
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
option && myChart.setOption(option);
|
||||
},
|
||||
myEcharts4(){
|
||||
var chartDom = document.getElementById('main4');
|
||||
var myChart = echarts.init(chartDom);
|
||||
var option;
|
||||
option = {
|
||||
grid: {
|
||||
right:'15%',
|
||||
bottom: '23%',
|
||||
},
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
data: ['组件名称1', '组件名称2', '组件名称3', '组件名称4', '组件名称5', '组件名称6'],
|
||||
color:['#f5f5f5'],
|
||||
axisTick:{
|
||||
show:false,//不显示坐标轴刻度线
|
||||
},
|
||||
splitLine: {
|
||||
show: true,
|
||||
color:['#f5f5f5']
|
||||
},
|
||||
axisLine:{
|
||||
lineStyle:{
|
||||
color:"#ebebeb"
|
||||
}
|
||||
},
|
||||
axisLabel: {//y轴文字的配置
|
||||
textStyle: {
|
||||
color: "#999999",//Y轴内容文字颜色
|
||||
},
|
||||
},
|
||||
},
|
||||
yAxis: {
|
||||
name:'数量',
|
||||
nameTextStyle:{
|
||||
color:"#999999"
|
||||
},
|
||||
splitLine: {
|
||||
show: false
|
||||
},
|
||||
type: 'value',
|
||||
interval:20, //控制y轴的刻度
|
||||
type: 'value',
|
||||
axisTick:{ //控制y轴的刻度
|
||||
show:false
|
||||
},
|
||||
axisLine:{
|
||||
lineStyle:{
|
||||
color:"#ebebeb"
|
||||
}
|
||||
},
|
||||
axisLabel: {//y轴文字的配置
|
||||
textStyle: {
|
||||
color: "#999999",//Y轴内容文字颜色
|
||||
},
|
||||
},
|
||||
},
|
||||
series: [
|
||||
{
|
||||
data: [60, 90, 50, 80, 50, 80],
|
||||
type: 'bar',
|
||||
barWidth: 14,
|
||||
|
||||
itemStyle: {
|
||||
barBorderRadius: [20,20,20,20],
|
||||
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
||||
{ offset: 0, color: 'rgba(178, 189, 255,0.8)' },
|
||||
// { offset: 0.5, color: '#188df0' },
|
||||
{ offset: 1, color: 'rgba(82, 106, 255,0.8)' }
|
||||
])
|
||||
},
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
option && myChart.setOption(option);
|
||||
},
|
||||
myEcharts6(){
|
||||
var chartDom = document.getElementById('main6');
|
||||
var myChart = echarts.init(chartDom);
|
||||
var option;
|
||||
option = {
|
||||
tooltip: {
|
||||
trigger: 'item'
|
||||
},
|
||||
legend: {
|
||||
orient: '',
|
||||
top: '14%',
|
||||
left: '55%',
|
||||
width:"auto",
|
||||
height:"auto",
|
||||
orient: "vertical",
|
||||
itemGap: 15,
|
||||
itemWidth: 14,
|
||||
// 使用回调函数
|
||||
formatter: function(name) {
|
||||
var data = option.series[0].data;
|
||||
var total = 0;
|
||||
var tarValue;
|
||||
for (var i = 0; i < data.length; i++) {
|
||||
total += data[i].value;
|
||||
if (data[i].name == name) {
|
||||
tarValue = data[i].value;
|
||||
}
|
||||
}
|
||||
var v = tarValue;
|
||||
var p = Math.round(((tarValue / total) * 100));
|
||||
return `${name} ${p}%`;
|
||||
},
|
||||
itemStyle:{},
|
||||
textStyle: {
|
||||
color: "#666666",
|
||||
padding:[0,8,0,18]
|
||||
},
|
||||
},
|
||||
color: ['#0087ff', '#51cb8d', '#fcc549', '#ef6567', '#ff8a00', '#fc5656'],
|
||||
series: [
|
||||
{
|
||||
type: 'pie',
|
||||
radius: ['40%', '60%'],
|
||||
center:['22%', '50%'],
|
||||
avoidLabelOverlap: false,
|
||||
itemStyle: {
|
||||
borderRadius: 10,
|
||||
borderColor: '#fff',
|
||||
borderWidth: 2
|
||||
},
|
||||
label: {
|
||||
show: false,
|
||||
position: 'center'
|
||||
},
|
||||
// emphasis: {
|
||||
// label: {
|
||||
// show: true,
|
||||
// fontSize: '40',
|
||||
// fontWeight: 'bold'
|
||||
// }
|
||||
// },
|
||||
labelLine: {
|
||||
show: false
|
||||
},
|
||||
data: [
|
||||
{ value: 1048, name: '1分' },
|
||||
{ value: 735, name: '2分' },
|
||||
{ value: 580, name: '3分' },
|
||||
{ value: 484, name: '4分' },
|
||||
{ value: 300, name: '5分' }
|
||||
]
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
option && myChart.setOption(option);
|
||||
},
|
||||
myEcharts7(){
|
||||
var chartDom = document.getElementById('main7');
|
||||
var myChart = echarts.init(chartDom);
|
||||
var option;
|
||||
option = {
|
||||
tooltip: {
|
||||
trigger: 'item'
|
||||
},
|
||||
legend: {
|
||||
orient: '',
|
||||
top: '14%',
|
||||
left: '40%',
|
||||
width:"auto",
|
||||
height:"auto",
|
||||
orient: "vertical",
|
||||
itemGap: 15,
|
||||
itemWidth: 14,
|
||||
// 使用回调函数
|
||||
formatter: function(name) {
|
||||
var data = option.series[0].data;
|
||||
var total = 0;
|
||||
var tarValue;
|
||||
for (var i = 0; i < data.length; i++) {
|
||||
total += data[i].value;
|
||||
if (data[i].name == name) {
|
||||
tarValue = data[i].value;
|
||||
}
|
||||
}
|
||||
var v = tarValue;
|
||||
var p = Math.round(((tarValue / total) * 100));
|
||||
return `${name} ${p}%`;
|
||||
},
|
||||
itemStyle:{},
|
||||
textStyle: {
|
||||
color: "#666666",
|
||||
fontSize:12,
|
||||
padding:[0,0,0,10]
|
||||
},
|
||||
},
|
||||
color: ['#0087ff', '#51cb8d', '#fcc549', '#ef6567', '#ff8a00', '#fc5656'],
|
||||
series: [
|
||||
{
|
||||
type: 'pie',
|
||||
radius: ['30%', '45%'],
|
||||
center:['19%', '50%'],
|
||||
avoidLabelOverlap: false,
|
||||
itemStyle: {
|
||||
borderRadius: 10,
|
||||
borderColor: '#fff',
|
||||
borderWidth: 2
|
||||
},
|
||||
label: {
|
||||
show: false,
|
||||
position: 'center'
|
||||
},
|
||||
// emphasis: {
|
||||
// label: {
|
||||
// show: true,
|
||||
// fontSize: '40',
|
||||
// fontWeight: 'bold'
|
||||
// }
|
||||
// },
|
||||
labelLine: {
|
||||
show: false
|
||||
},
|
||||
data: [
|
||||
{ value: 1048, name: '应用名称1' },
|
||||
{ value: 735, name: '应用名称2' },
|
||||
{ value: 580, name: '应用名称3' },
|
||||
{ value: 484, name: '应用名称4' },
|
||||
{ value: 300, name: '应用名称5' }
|
||||
]
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
option && myChart.setOption(option);
|
||||
},
|
||||
myEcharts8(){
|
||||
var chartDom = document.getElementById('main8');
|
||||
var myChart = echarts.init(chartDom);
|
||||
var option;
|
||||
option = {
|
||||
tooltip: {
|
||||
trigger: 'item'
|
||||
},
|
||||
legend: {
|
||||
orient: '',
|
||||
top: '14%',
|
||||
left: '40%',
|
||||
width:"auto",
|
||||
height:"auto",
|
||||
orient: "vertical",
|
||||
itemGap: 15,
|
||||
itemWidth: 14,
|
||||
// 使用回调函数
|
||||
formatter: function(name) {
|
||||
var data = option.series[0].data;
|
||||
var total = 0;
|
||||
var tarValue;
|
||||
for (var i = 0; i < data.length; i++) {
|
||||
total += data[i].value;
|
||||
if (data[i].name == name) {
|
||||
tarValue = data[i].value;
|
||||
}
|
||||
}
|
||||
var v = tarValue;
|
||||
var p = Math.round(((tarValue / total) * 100));
|
||||
return `${name} ${p}%`;
|
||||
},
|
||||
itemStyle:{},
|
||||
textStyle: {
|
||||
color: "#666666",
|
||||
fontSize:12,
|
||||
padding:[0,8,0,10]
|
||||
},
|
||||
},
|
||||
color: ['#0087ff', '#51cb8d', '#fcc549', '#ef6567', '#ff8a00', '#fc5656'],
|
||||
series: [
|
||||
{
|
||||
type: 'pie',
|
||||
radius: ['30%', '45%'],
|
||||
center:['19%', '50%'],
|
||||
avoidLabelOverlap: false,
|
||||
itemStyle: {
|
||||
borderRadius: 10,
|
||||
borderColor: '#fff',
|
||||
borderWidth: 2
|
||||
},
|
||||
label: {
|
||||
show: false,
|
||||
position: 'center'
|
||||
},
|
||||
// emphasis: {
|
||||
// label: {
|
||||
// show: true,
|
||||
// fontSize: '40',
|
||||
// fontWeight: 'bold'
|
||||
// }
|
||||
// },
|
||||
labelLine: {
|
||||
show: false
|
||||
},
|
||||
data: [
|
||||
{ value: 1048, name: '应用领域1' },
|
||||
{ value: 735, name: '应用领域2' },
|
||||
{ value: 580, name: '应用领域3' },
|
||||
{ value: 484, name: '应用领域4' },
|
||||
{ value: 300, name: '应用领域5' }
|
||||
]
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
option && myChart.setOption(option);
|
||||
},
|
||||
myEcharts9(){
|
||||
var chartDom = document.getElementById('main9');
|
||||
var myChart = echarts.init(chartDom);
|
||||
var option;
|
||||
option = {
|
||||
tooltip: {
|
||||
trigger: 'item'
|
||||
},
|
||||
legend: {
|
||||
orient: '',
|
||||
top: '14%',
|
||||
left: '47%',
|
||||
width:"auto",
|
||||
height:"auto",
|
||||
orient: "vertical",
|
||||
itemGap: 15,
|
||||
itemWidth: 14,
|
||||
// 使用回调函数
|
||||
formatter: function(name) {
|
||||
var data = option.series[0].data;
|
||||
var total = 0;
|
||||
var tarValue;
|
||||
for (var i = 0; i < data.length; i++) {
|
||||
total += data[i].value;
|
||||
if (data[i].name == name) {
|
||||
tarValue = data[i].value;
|
||||
}
|
||||
}
|
||||
var v = tarValue;
|
||||
var p = Math.round(((tarValue / total) * 100));
|
||||
return `${name} ${p}%`;
|
||||
},
|
||||
itemStyle:{},
|
||||
textStyle: {
|
||||
color: "#666666",
|
||||
fontSize:12,
|
||||
padding:[0,8,0,10]
|
||||
},
|
||||
},
|
||||
color: ['#0087ff', '#51cb8d', '#fcc549', '#ef6567', '#ff8a00', '#fc5656'],
|
||||
series: [
|
||||
{
|
||||
type: 'pie',
|
||||
radius: ['30%', '45%'],
|
||||
center:['22%', '50%'],
|
||||
avoidLabelOverlap: false,
|
||||
itemStyle: {
|
||||
borderRadius: 10,
|
||||
borderColor: '#fff',
|
||||
borderWidth: 2
|
||||
},
|
||||
label: {
|
||||
show: false,
|
||||
position: 'center'
|
||||
},
|
||||
// emphasis: {
|
||||
// label: {
|
||||
// show: true,
|
||||
// fontSize: '40',
|
||||
// fontWeight: 'bold'
|
||||
// }
|
||||
// },
|
||||
labelLine: {
|
||||
show: false
|
||||
},
|
||||
data: [
|
||||
{ value: 1048, name: '应用状态1' },
|
||||
{ value: 735, name: '应用状态2' },
|
||||
{ value: 580, name: '应用状态3' },
|
||||
{ value: 484, name: '应用状态4' },
|
||||
{ value: 300, name: '应用状态5' }
|
||||
]
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
option && myChart.setOption(option);
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.container{
|
||||
padding-top: 15px;
|
||||
}
|
||||
.title-style{
|
||||
font-size: 24px;
|
||||
color:#000000;
|
||||
font-weight: bold;
|
||||
}
|
||||
.page-introduction{
|
||||
font-size: 18px;
|
||||
color:#666666;
|
||||
margin-left: 20px;
|
||||
}
|
||||
.container-body{
|
||||
width:1300px;
|
||||
margin-top:30px;
|
||||
display: flex;
|
||||
flex-wrap:wrap
|
||||
}
|
||||
.container-body1{
|
||||
width:420px;
|
||||
height:250px;
|
||||
background-color: #ffffff;
|
||||
margin-right:20px;
|
||||
padding-top:20px;
|
||||
padding-left: 20px;
|
||||
|
||||
}
|
||||
.container-body2{
|
||||
width:420px;
|
||||
height:250px;
|
||||
background-color: #ffffff;
|
||||
margin-right:20px;
|
||||
padding-top:20px;
|
||||
padding-left: 20px;
|
||||
}
|
||||
.container-body3{
|
||||
width:420px;
|
||||
height:250px;
|
||||
background-color: #ffffff;
|
||||
padding-top:20px;
|
||||
padding-left: 20px;
|
||||
}
|
||||
.container-body4{
|
||||
width:640px;
|
||||
height:300px;
|
||||
background-color: #ffffff;
|
||||
padding-top:20px;
|
||||
padding-left: 20px;
|
||||
margin-top: 20px;
|
||||
margin-right: 20px;
|
||||
}
|
||||
.container-body5{
|
||||
width:640px;
|
||||
height:300px;
|
||||
background-color: #ffffff;
|
||||
padding-top:20px;
|
||||
padding-left: 20px;
|
||||
margin-top: 20px;
|
||||
}
|
||||
.container-body6{
|
||||
width:420px;
|
||||
height:250px;
|
||||
background-color: #ffffff;
|
||||
margin-right:20px;
|
||||
padding-top:20px;
|
||||
padding-left: 20px;
|
||||
margin-top: 20px;
|
||||
}
|
||||
.container-body7{
|
||||
width:287px;
|
||||
height:250px;
|
||||
background-color: #ffffff;
|
||||
padding-top:20px;
|
||||
padding-left: 20px;
|
||||
margin-top: 20px;
|
||||
}
|
||||
.container-body8{
|
||||
width:287px;
|
||||
height:250px;
|
||||
background-color: #ffffff;
|
||||
padding-top:20px;
|
||||
padding-left: 20px;
|
||||
margin-top: 20px;
|
||||
}
|
||||
.container-body9{
|
||||
width:286px;
|
||||
height:250px;
|
||||
background-color: #ffffff;
|
||||
padding-top:20px;
|
||||
padding-left: 20px;
|
||||
margin-top: 20px;
|
||||
}
|
||||
.ranking-img{
|
||||
width:60px;
|
||||
height:26px;
|
||||
display: flex;
|
||||
line-height: 26px;
|
||||
margin-bottom:15px;
|
||||
margin-right:10px;
|
||||
padding-left: 15px;
|
||||
}
|
||||
.num-style{
|
||||
position:absolute;
|
||||
display: flex;
|
||||
margin-left:90px;
|
||||
margin-top:5px;
|
||||
color:#333333;
|
||||
font-size: 16px;
|
||||
}
|
||||
.count-style{
|
||||
position:absolute;
|
||||
display: flex;
|
||||
margin-left:400px;
|
||||
margin-top:5px;
|
||||
color:#333333;
|
||||
font-size: 18px;
|
||||
font-weight: bold;
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,415 @@
|
|||
<template>
|
||||
<div class='container'>
|
||||
<span class='title-style'>组件服务</span>
|
||||
<span class='page-introduction'>发布情况统计</span>
|
||||
<div class='container-body'>
|
||||
<div class='container-body1'>
|
||||
<span style='font-size:18px;color;#000000;'>评分发布情况</span>
|
||||
<div id="main1" style="width: 400px;height:200px;"></div>
|
||||
</div>
|
||||
<div class='container-body2'>
|
||||
<span style='font-size:18px;color;#000000;'>发布量情况分布</span>
|
||||
<div id="main2" style="width: 400px;height:200px;"></div>
|
||||
</div>
|
||||
<div class='container-body3'>
|
||||
<span style='font-size:18px;color;#000000;'>应用领域分布情况</span>
|
||||
<div id="main3" style="width: 400px;height:200px;"></div>
|
||||
</div>
|
||||
<div class='container-body4'>
|
||||
<div style='margin-bottom:30px'>
|
||||
<span style='font-size:18px;color;#000000;'>被调用组件及数量</span>
|
||||
<img src="@/assets/img/TOP5.png" style='margin-left:10px'>
|
||||
</div>
|
||||
<div v-for="(item,index) in usedList" :key='index' >
|
||||
<div style='display:flex'>
|
||||
<div class='ranking-img' :style="{background:colorList[index%5],width: widthList[index%5]}">
|
||||
<span style='font-weight:bold' :style="{color:numColorList[index%5]}">{{index+1}}</span>
|
||||
</div>
|
||||
<span class='num-style'>{{item.name}}</span>
|
||||
<span class='count-style' :style="{color:numColorList[index%5]}">{{item.count}}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class='container-body5'>
|
||||
<div style='margin-bottom:30px'>
|
||||
<span style='font-size:18px;color;#000000;'>被申请组件及数量</span>
|
||||
<img src="@/assets/img/TOP5.png" style='margin-left:10px'>
|
||||
</div>
|
||||
<div v-for="(item,index) in applicationList" :key='index' >
|
||||
<div style='display:flex'>
|
||||
<div class='ranking-img' :style="{background:colorList[index%5],width: widthList[index%5]}">
|
||||
<span style='font-weight:bold' :style="{color:numColorList[index%5]}">{{index+1}}</span>
|
||||
</div>
|
||||
<span class='num-style'>{{item.name}}</span>
|
||||
<span class='count-style' :style="{color:numColorList[index%5]}">{{item.count}}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class='footer'>
|
||||
<div class='footer-left' ></div>
|
||||
<span style='color:#b7c2d1;font-size:16px'>到底啦</span>
|
||||
<div class='footer-right'></div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import * as echarts from 'echarts';
|
||||
|
||||
export default {
|
||||
data(){
|
||||
return{
|
||||
colorList:['linear-gradient(to right, rgba(251, 59, 5,0.6),transparent)', 'linear-gradient(to right,rgba(251, 123, 5),transparent)','linear-gradient(to right,rgba(250, 179, 2,.6),transparent)','linear-gradient(to right,rgba(82, 106, 255,.6),transparent','linear-gradient(to right,rgba(82, 106, 255,.6),transparent)',],
|
||||
widthList:['90px','80px','70px','60px','50px'],
|
||||
numColorList:['#fc5656','#ff8a00','#f9af0a','#808fff','#808fff'],
|
||||
usedList:[{name:'组件名称一',count:111},{name:'组件名称一',count:111},{name:'组件名称一',count:111},{name:'组件名称四',count:111},{name:'组件名称五',count:111},],
|
||||
applicationList:[{name:'组件名称一',count:111},{name:'组件名称一',count:111},{name:'组件名称一',count:111},{name:'组件名称四',count:111},{name:'组件名称五',count:111},]
|
||||
}
|
||||
},
|
||||
mounted(){
|
||||
this.myEcharts1()
|
||||
this.myEcharts2()
|
||||
this.myEcharts3()
|
||||
},
|
||||
methods:{
|
||||
myEcharts1(){
|
||||
var chartDom = document.getElementById('main1');
|
||||
var myChart = echarts.init(chartDom);
|
||||
var option;
|
||||
option = {
|
||||
tooltip: {
|
||||
trigger: 'item'
|
||||
},
|
||||
legend: {
|
||||
orient: '',
|
||||
top: '14%',
|
||||
left: '55%',
|
||||
width:"auto",
|
||||
height:"auto",
|
||||
orient: "vertical",
|
||||
itemGap: 15,
|
||||
itemWidth: 14,
|
||||
// 使用回调函数
|
||||
formatter: function(name) {
|
||||
var data = option.series[0].data;
|
||||
var total = 0;
|
||||
var tarValue;
|
||||
for (var i = 0; i < data.length; i++) {
|
||||
total += data[i].value;
|
||||
if (data[i].name == name) {
|
||||
tarValue = data[i].value;
|
||||
}
|
||||
}
|
||||
var v = tarValue;
|
||||
var p = Math.round(((tarValue / total) * 100));
|
||||
return `${name} ${p}%`;
|
||||
},
|
||||
itemStyle:{},
|
||||
textStyle: {
|
||||
color: "#666666",
|
||||
padding:[0,8,0,18]
|
||||
},
|
||||
},
|
||||
color: ['#0087ff', '#51cb8d', '#fcc549', '#ef6567', '#ff8a00', '#fc5656'],
|
||||
series: [
|
||||
{
|
||||
type: 'pie',
|
||||
radius: ['40%', '60%'],
|
||||
center:['22%', '50%'],
|
||||
avoidLabelOverlap: false,
|
||||
itemStyle: {
|
||||
borderRadius: 10,
|
||||
borderColor: '#fff',
|
||||
borderWidth: 2
|
||||
},
|
||||
label: {
|
||||
show: false,
|
||||
position: 'center'
|
||||
},
|
||||
// emphasis: {
|
||||
// label: {
|
||||
// show: true,
|
||||
// fontSize: '40',
|
||||
// fontWeight: 'bold'
|
||||
// }
|
||||
// },
|
||||
labelLine: {
|
||||
show: false
|
||||
},
|
||||
data: [
|
||||
{ value: 1048, name: '1分' },
|
||||
{ value: 735, name: '2分' },
|
||||
{ value: 580, name: '3分' },
|
||||
{ value: 484, name: '4分' },
|
||||
{ value: 300, name: '5分' }
|
||||
]
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
option && myChart.setOption(option);
|
||||
},
|
||||
myEcharts2(){
|
||||
var chartDom = document.getElementById('main2');
|
||||
var myChart = echarts.init(chartDom);
|
||||
var option;
|
||||
option = {
|
||||
tooltip: {
|
||||
trigger: 'item'
|
||||
},
|
||||
legend: {
|
||||
orient: '',
|
||||
top: '22%',
|
||||
left: '50%',
|
||||
width:"auto",
|
||||
height:"auto",
|
||||
orient: "vertical",
|
||||
itemGap: 15,
|
||||
itemWidth: 14,
|
||||
// 使用回调函数
|
||||
formatter: function(name) {
|
||||
var data = option.series[0].data;
|
||||
var total = 0;
|
||||
var tarValue;
|
||||
for (var i = 0; i < data.length; i++) {
|
||||
total += data[i].value;
|
||||
if (data[i].name == name) {
|
||||
tarValue = data[i].value;
|
||||
}
|
||||
}
|
||||
var v = tarValue;
|
||||
var p = Math.round(((tarValue / total) * 100));
|
||||
return `${name} ${p}%`;
|
||||
},
|
||||
itemStyle:{},
|
||||
textStyle: {
|
||||
color: "#666666",
|
||||
padding:[0,8,0,18]
|
||||
},
|
||||
},
|
||||
color: ['#0087ff', '#51cb8d', '#fcc549', '#ef6567', '#ff8a00', '#fc5656'],
|
||||
series: [
|
||||
{
|
||||
// name: 'Access From',
|
||||
type: 'pie',
|
||||
radius: ['40%', '60%'],
|
||||
center:['22%', '50%'],
|
||||
avoidLabelOverlap: false,
|
||||
itemStyle: {
|
||||
borderRadius: 10,
|
||||
borderColor: '#fff',
|
||||
borderWidth: 2
|
||||
},
|
||||
label: {
|
||||
show: false,
|
||||
position: 'center'
|
||||
},
|
||||
// emphasis: {
|
||||
// label: {
|
||||
// show: true,
|
||||
// fontSize: '40',
|
||||
// fontWeight: 'bold'
|
||||
// }
|
||||
// },
|
||||
labelLine: {
|
||||
show: false
|
||||
},
|
||||
data: [
|
||||
{ value: 1048, name: '算法' },
|
||||
{ value: 735, name: '图层' },
|
||||
{ value: 580, name: '开发' },
|
||||
{ value: 484, name: '业务' },
|
||||
]
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
option && myChart.setOption(option);
|
||||
},
|
||||
myEcharts3(){
|
||||
var chartDom = document.getElementById('main3');
|
||||
var myChart = echarts.init(chartDom);
|
||||
var option;
|
||||
option = {
|
||||
tooltip: {
|
||||
trigger: 'item'
|
||||
},
|
||||
legend: {
|
||||
orient: '',
|
||||
top: '22%',
|
||||
left: '50%',
|
||||
width:"auto",
|
||||
height:"auto",
|
||||
orient: "vertical",
|
||||
itemGap: 15,
|
||||
itemWidth: 14,
|
||||
// 使用回调函数
|
||||
formatter: function(name) {
|
||||
var data = option.series[0].data;
|
||||
var total = 0;
|
||||
var tarValue;
|
||||
for (var i = 0; i < data.length; i++) {
|
||||
total += data[i].value;
|
||||
if (data[i].name == name) {
|
||||
tarValue = data[i].value;
|
||||
}
|
||||
}
|
||||
var v = tarValue;
|
||||
var p = Math.round(((tarValue / total) * 100));
|
||||
return `${name} ${p}%`;
|
||||
},
|
||||
itemStyle:{},
|
||||
textStyle: {
|
||||
color: "#666666",
|
||||
padding:[0,8,0,18]
|
||||
},
|
||||
},
|
||||
color: ['#0087ff', '#51cb8d', '#fcc549', '#ef6567', '#ff8a00', '#fc5656'],
|
||||
series: [
|
||||
{
|
||||
// name: 'Access From',
|
||||
type: 'pie',
|
||||
radius: ['40%', '60%'],
|
||||
center:['22%', '50%'],
|
||||
avoidLabelOverlap: false,
|
||||
itemStyle: {
|
||||
borderRadius: 10,
|
||||
borderColor: '#fff',
|
||||
borderWidth: 2
|
||||
},
|
||||
label: {
|
||||
show: false,
|
||||
position: 'center'
|
||||
},
|
||||
// emphasis: {
|
||||
// label: {
|
||||
// show: true,
|
||||
// fontSize: '40',
|
||||
// fontWeight: 'bold'
|
||||
// }
|
||||
// },
|
||||
labelLine: {
|
||||
show: false
|
||||
},
|
||||
data: [
|
||||
{ value: 1048, name: '应用领域' },
|
||||
{ value: 735, name: '应用领域2' },
|
||||
{ value: 580, name: '应用领域3' },
|
||||
{ value: 484, name: '应用领域4' },
|
||||
]
|
||||
}
|
||||
]
|
||||
};
|
||||
|
||||
option && myChart.setOption(option);
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped>
|
||||
.container{
|
||||
padding-top: 15px;
|
||||
}
|
||||
.title-style{
|
||||
font-size: 24px;
|
||||
color:#000000;
|
||||
font-weight: bold;
|
||||
}
|
||||
.page-introduction{
|
||||
font-size: 18px;
|
||||
color:#666666;
|
||||
margin-left: 20px;
|
||||
}
|
||||
.container-body{
|
||||
width:1300px;
|
||||
margin-top:30px;
|
||||
display: flex;
|
||||
flex-wrap:wrap
|
||||
}
|
||||
.container-body1{
|
||||
width:420px;
|
||||
height:250px;
|
||||
background-color: #ffffff;
|
||||
margin-right:20px;
|
||||
padding-top:20px;
|
||||
padding-left: 20px;
|
||||
|
||||
}
|
||||
.container-body2{
|
||||
width:420px;
|
||||
height:250px;
|
||||
background-color: #ffffff;
|
||||
margin-right:20px;
|
||||
padding-top:20px;
|
||||
padding-left: 20px;
|
||||
}
|
||||
.container-body3{
|
||||
width:420px;
|
||||
height:250px;
|
||||
background-color: #ffffff;
|
||||
padding-top:20px;
|
||||
padding-left: 20px;
|
||||
}
|
||||
.container-body4{
|
||||
width:640px;
|
||||
height:300px;
|
||||
background-color: #ffffff;
|
||||
padding-top:20px;
|
||||
padding-left: 20px;
|
||||
margin-top: 20px;
|
||||
margin-right: 20px;
|
||||
}
|
||||
.container-body5{
|
||||
width:640px;
|
||||
height:300px;
|
||||
background-color: #ffffff;
|
||||
padding-top:20px;
|
||||
padding-left: 20px;
|
||||
margin-top: 20px;
|
||||
}
|
||||
.footer{
|
||||
display: flex;
|
||||
margin-top:50px;
|
||||
margin-left:365px;
|
||||
}
|
||||
.footer-left{
|
||||
width:250px;
|
||||
height:1px;
|
||||
background-color:#e0eaf8;
|
||||
margin-right:10px;
|
||||
margin-top:8px
|
||||
}
|
||||
.footer-right{
|
||||
width:250px;
|
||||
height:1px;
|
||||
background-color:#e0eaf8;
|
||||
margin-left:10px;
|
||||
margin-top:8px
|
||||
}
|
||||
.ranking-img{
|
||||
width:60px;
|
||||
height:26px;
|
||||
display: flex;
|
||||
line-height: 26px;
|
||||
margin-bottom:15px;
|
||||
margin-right:10px;
|
||||
padding-left: 15px;
|
||||
}
|
||||
.num-style{
|
||||
position:absolute;
|
||||
display: flex;
|
||||
margin-left:90px;
|
||||
margin-top:5px;
|
||||
color:#333333;
|
||||
font-size: 16px;
|
||||
}
|
||||
.count-style{
|
||||
position:absolute;
|
||||
display: flex;
|
||||
margin-left:400px;
|
||||
margin-top:5px;
|
||||
color:#333333;
|
||||
font-size: 18px;
|
||||
font-weight: bold;
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,250 @@
|
|||
<template>
|
||||
<div>
|
||||
<el-card shadow="never" class="aui-card--fill" v-if='homeIsShow'>
|
||||
<div class="mod-demand__bsdemand">
|
||||
<div class='top-box'>
|
||||
<span class='title'>能力统计</span>
|
||||
<div class='title-list-style'>
|
||||
<div v-for="(item,index) in titleList" :key='index' class='title-single' :class="{'choseStyle':choseId=== index}" @click="choseBtn(index)">
|
||||
<span class='box-style'>{{item.name}}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class='second-title'>
|
||||
<span style='margin-right:30px' :class="[departmentId===1?'departmentStyle':'']" @click="handleChose(1)">
|
||||
部门发布情况
|
||||
</span>
|
||||
<span :class="[departmentId===2?'departmentStyle':'']" @click="handleChose(2)">
|
||||
部门使用情况
|
||||
</span>
|
||||
</div>
|
||||
<div class='line-style'></div>
|
||||
<el-table
|
||||
:data="tableData"
|
||||
border
|
||||
style="width: 100%">
|
||||
<el-table-column
|
||||
prop="name"
|
||||
label="部门名称"
|
||||
min-width="100%">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="releaseNum"
|
||||
label="发布总数"
|
||||
min-width="100%">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="applyNum"
|
||||
label="被申请总数"
|
||||
min-width="100%">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="browseNmu"
|
||||
label="浏览总量"
|
||||
min-width="100%">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="collectNum"
|
||||
label="收藏量"
|
||||
min-width="100%">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="transferNum"
|
||||
label="被调用总数"
|
||||
min-width="100%">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="applicationNum"
|
||||
label="被应用总数"
|
||||
min-width="100%">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="needApplicationNum"
|
||||
label="需申请数量"
|
||||
min-width="100%">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="reductionNum"
|
||||
label="免批数量"
|
||||
min-width="100%">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="操作"
|
||||
min-width="92%">
|
||||
<template slot-scope="scope">
|
||||
<el-button @click="handleClick(scope.row)" type="text" size="small">查看详情</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<div class="block">
|
||||
<el-pagination
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"
|
||||
:current-page="currentPage4"
|
||||
:page-sizes="[10, 20, 30, 40]"
|
||||
layout="total, prev, pager, next, jumper"
|
||||
:total="40">
|
||||
</el-pagination>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
<component-services v-if='servicesIsShow' ></component-services>
|
||||
<application-resources v-if='resourcesIsShow'></application-resources>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</template>
|
||||
<script>
|
||||
import componentServices from './componentServices.vue'
|
||||
import applicationResources from './applicationResources.vue'
|
||||
export default {
|
||||
components:{componentServices,applicationResources},
|
||||
data(){
|
||||
return{
|
||||
choseId:null,
|
||||
departmentId:1,
|
||||
currentPage4: 4,
|
||||
homeIsShow:true,
|
||||
servicesIsShow:false,
|
||||
resourcesIsShow:false,
|
||||
titleList:[
|
||||
{name:'组件服务',key:1}, {name:'应用资源',key:2}, {name:'基础设施',key:3}, {name:'数据资源',key:3}, {name:'知识库',key:3},
|
||||
],
|
||||
tableData: [{
|
||||
name: '部门名称一',
|
||||
releaseNum: 111,
|
||||
applyNum: 222,
|
||||
browseNmu: 333,
|
||||
collectNum:444,
|
||||
transferNum:555,
|
||||
applicationNum:666,
|
||||
needApplicationNum:777,
|
||||
reductionNum:888,
|
||||
},{
|
||||
name: '部门名称一',
|
||||
releaseNum: 111,
|
||||
applyNum: 222,
|
||||
browseNmu: 333,
|
||||
collectNum:444,
|
||||
transferNum:555,
|
||||
applicationNum:666,
|
||||
needApplicationNum:777,
|
||||
reductionNum:888,
|
||||
},{
|
||||
name: '部门名称一',
|
||||
releaseNum: 111,
|
||||
applyNum: 222,
|
||||
browseNmu: 333,
|
||||
collectNum:444,
|
||||
transferNum:555,
|
||||
applicationNum:666,
|
||||
needApplicationNum:777,
|
||||
reductionNum:888,
|
||||
},{
|
||||
name: '部门名称一',
|
||||
releaseNum: 111,
|
||||
applyNum: 222,
|
||||
browseNmu: 333,
|
||||
collectNum:444,
|
||||
transferNum:555,
|
||||
applicationNum:666,
|
||||
needApplicationNum:777,
|
||||
reductionNum:888,
|
||||
},
|
||||
]
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleClick(row) {
|
||||
console.log(row);
|
||||
},
|
||||
//选择组件
|
||||
choseBtn(index){
|
||||
this.choseId=index
|
||||
if (index===0){
|
||||
this.homeIsShow=false
|
||||
this.servicesIsShow=true
|
||||
} else if(index===1){
|
||||
this.homeIsShow=false
|
||||
this.servicesIsShow=false
|
||||
this.resourcesIsShow=true
|
||||
}
|
||||
},
|
||||
//选择发布or使用表格
|
||||
handleChose(index){
|
||||
this.departmentId=index
|
||||
},
|
||||
//翻页
|
||||
handleSizeChange(val) {
|
||||
console.log(`每页 ${val} 条`);
|
||||
},
|
||||
handleCurrentChange(val) {
|
||||
console.log(`当前页: ${val}`);
|
||||
}
|
||||
},
|
||||
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.top-box{
|
||||
height:80px;
|
||||
background-color: #fafafc;
|
||||
}
|
||||
.title{
|
||||
display: flex;
|
||||
font-size:20px;
|
||||
color:#000000;
|
||||
font-weight: bold;
|
||||
padding-left:15px;
|
||||
padding-top:10px;
|
||||
}
|
||||
.title-list-style{
|
||||
display: flex;
|
||||
margin-top:10px;
|
||||
|
||||
}
|
||||
.title-single{
|
||||
font-size:14px;
|
||||
width:90px;
|
||||
color:#666666;
|
||||
height:24px;
|
||||
margin-left:10px;
|
||||
border:1px solid #cccccc;
|
||||
border-radius: 12px;
|
||||
cursor:pointer
|
||||
|
||||
}
|
||||
.box-style{
|
||||
width:90px;
|
||||
height:24px;
|
||||
display:flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
padding-bottom: 2px;
|
||||
}
|
||||
.second-title{
|
||||
margin-top:20px;
|
||||
font-size: 14px;
|
||||
color:#979eb9;
|
||||
cursor:pointer
|
||||
}
|
||||
.line-style{
|
||||
width:100%;
|
||||
height:1px;
|
||||
background-color:#f5f6fa;
|
||||
margin-top:15px;
|
||||
margin-bottom:15px;
|
||||
}
|
||||
.aui-card--fill{
|
||||
width:100% !important;
|
||||
padding: 0px !important;
|
||||
}
|
||||
.choseStyle{
|
||||
color:#526aff;
|
||||
border:1px solid #526aff
|
||||
}
|
||||
.departmentStyle{
|
||||
color:#526aff
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,417 @@
|
|||
<!-- 流程业务表单 -->
|
||||
<template>
|
||||
<el-card shadow="never" class="aui-card--fill">
|
||||
|
||||
<!-- 申请人详情 -->
|
||||
<div>
|
||||
<h3>申请人信息</h3>
|
||||
<div class="big-BOX">
|
||||
<p>
|
||||
<span>申请人:<span> {{dataForm.content.applyUserName || '--'}}</span></span>
|
||||
<span>电话:<span>{{dataForm.content.applyUserPhone || '--'}}</span></span>
|
||||
<span>单位:<span>{{dataForm.content.applyUserDeptName || '--'}}</span></span>
|
||||
</p>
|
||||
<p>
|
||||
<span>应用领域:<span>{{dataForm.content.detailsField || '--'}}</span></span>
|
||||
<span> 需求类型:<span> {{dataForm.content.detailsType || '--'}}</span></span>
|
||||
<span> 需求标题: <span> {{dataForm.content.demandSubject || '--'}}</span></span>
|
||||
</p>
|
||||
<p>
|
||||
<span> 需求描述:<span> {{dataForm.content.demandDetails|| '--'}}</span></span>
|
||||
</p>
|
||||
<p>
|
||||
<span> 申请附件:<span> {{dataForm.content.enclosure|| '--'}}<button @click="downloadFile(dataForm.content.enclosure)">下载</button></span></span>
|
||||
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 申请能力 -->
|
||||
<div class="AbilityApply">
|
||||
<h3>申请能力</h3>
|
||||
<ul v-for="item in dataList" :key="item.id">
|
||||
<li class="title">{{item.address}}</li>
|
||||
<li class="clearfix">
|
||||
<img
|
||||
src="~@/assets/img/imgLeft.png"
|
||||
/>
|
||||
<div>
|
||||
<h2>{{item.name}}<span>{{item.type}}</span></h2>
|
||||
<p>{{item.describe}}</p>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<!-- 流程综合组件 -->
|
||||
<!-- <ren-process-multiple
|
||||
v-if="processVisible"
|
||||
updateInstanceIdUrl="/processForm/tabilityapplication/updateInstanceId"
|
||||
saveFormUrl="/processForm/tabilityapplication"
|
||||
dataFormName="dataForm"
|
||||
ref="renProcessMultiple"
|
||||
></ren-process-multiple> -->
|
||||
|
||||
<!-- 审批 -->
|
||||
<div class="agreeOr">
|
||||
<h3>审批</h3>
|
||||
<div>
|
||||
<el-radio-group v-model="agreeOrList" style="width:230px;">
|
||||
<el-radio-button label="同意" class="blueAll">同意</el-radio-button>
|
||||
<el-radio-button label="退回" class="redAll">退回</el-radio-button>
|
||||
</el-radio-group>
|
||||
<el-input v-if="agreeOrList ==='同意' " v-model="inputAgree" placeholder="请输入同意内容"></el-input>
|
||||
<el-input v-if="agreeOrList ==='退回'" v-model="inputNo" placeholder="请输入退回内容"></el-input>
|
||||
<el-button class="inputBule" @click="agreeOrNot">提交</el-button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 流程详情 -->
|
||||
<ren-process-detail-import></ren-process-detail-import>
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// 引入工作流公共方法
|
||||
import processModule from '@/mixins/process-module'
|
||||
import qs from 'qs'
|
||||
import RenProcessDetailImport from '@/components/ren-process-detail/src/ren-process-detail-import'
|
||||
export default {
|
||||
// 注入公共方法
|
||||
mixins: [processModule],
|
||||
data () {
|
||||
return {
|
||||
visible: true,
|
||||
// 表单属性是否可编辑
|
||||
// fieldDisabled: false,
|
||||
// dataForm: {
|
||||
// id: '',
|
||||
// user: '',
|
||||
// phone: '',
|
||||
// unit: '',
|
||||
// area: '',
|
||||
// system: '',
|
||||
// scene: '',
|
||||
// basis: ''
|
||||
// }
|
||||
dataForm: {
|
||||
id: '',
|
||||
content: []
|
||||
},
|
||||
dataList: [
|
||||
{
|
||||
// img: '~@/assets/img/imgLeft.png',
|
||||
address: '青岛市应急管理局',
|
||||
name: '组件名称',
|
||||
type: '组件服务',
|
||||
describe: '资源描述资源描述资源描述资源描述资源描述资源描述'
|
||||
},
|
||||
{
|
||||
// img: '~@/assets/img/imgLeft.png',
|
||||
address: '青岛市应急管理局',
|
||||
name: '组件名称',
|
||||
type: '组件服务',
|
||||
describe: '资源描述资源描述资源描述资源描述资源描述资源描述'
|
||||
},
|
||||
{
|
||||
// img: '~@/assets/img/imgLeft.png',
|
||||
address: '青岛市应急管理局',
|
||||
name: '组件名称',
|
||||
type: '组件服务',
|
||||
describe: '资源描述资源描述资源描述资源描述资源描述资源描述'
|
||||
}
|
||||
],
|
||||
inputAgree: '',
|
||||
inputNo: '',
|
||||
agreeOrList: '同意'
|
||||
}
|
||||
},
|
||||
created () {
|
||||
// 将业务KEY赋值给表单
|
||||
this.dataForm.id = this.$route.params.businessKey
|
||||
console.log(this.dataForm, 'ela')
|
||||
this.init()
|
||||
// 流程回调
|
||||
var callbacks = {
|
||||
startProcessSuccessCallback: this.closeCurrentTab,
|
||||
startProcessErrorCallback: this.startProcessErrorCallback,
|
||||
taskHandleSuccessCallback: this.closeCurrentTab,
|
||||
taskHandleErrorCallback: this.taskHandleErrorCallback,
|
||||
formSaveSuccessCallback: null,
|
||||
formSaveErrorCallback: null
|
||||
}
|
||||
// 初始化综合组件
|
||||
this.initProcessMultiple(callbacks)
|
||||
},
|
||||
computed: {
|
||||
// dataRule () {
|
||||
// return {
|
||||
// inputAgree: [
|
||||
// { required: true, message: this.$t('validate.required'), trigger: 'blur' }
|
||||
// ],
|
||||
// inputNo: [
|
||||
// { required: true, message: this.$t('validate.required'), trigger: 'blur' }
|
||||
// ]
|
||||
// }
|
||||
// }
|
||||
},
|
||||
components: {
|
||||
RenProcessDetailImport
|
||||
},
|
||||
methods: {
|
||||
init () {
|
||||
// this.visible = true
|
||||
this.$nextTick(() => {
|
||||
// this.$refs.dataForm.resetFields()
|
||||
if (this.dataForm.id) {
|
||||
// 如业务KEY已存在,不允许编辑
|
||||
// this.fieldDisabled = true
|
||||
this.getInfo()
|
||||
console.log(this.dataForm, 'init')
|
||||
}
|
||||
})
|
||||
},
|
||||
// 获取信息
|
||||
getInfo () {
|
||||
this.$http
|
||||
.get(`/demanData/${this.dataForm.id}`)
|
||||
.then(({ data: res }) => {
|
||||
if (res.code !== 0) {
|
||||
console.log(res.data)
|
||||
return this.$message.error(res.msg)
|
||||
}
|
||||
console.log(res.data, 'elas')
|
||||
this.dataForm.content = res.data
|
||||
console.log(this.dataForm, 'ela')
|
||||
})
|
||||
.catch(() => {})
|
||||
},
|
||||
// 申请能力
|
||||
applyData () {
|
||||
this.$http
|
||||
.get(`/resource/select/${this.dataForm.id}`)
|
||||
.then(({ data: res }) => {
|
||||
if (res.code !== 0) {
|
||||
console.log(res.data, 'wh')
|
||||
// return this.$message.error(res.msg)
|
||||
}
|
||||
// console.log(res.data, 'elas')
|
||||
// this.dataForm.content = res.data
|
||||
// console.log(this.dataForm, 'ela')
|
||||
})
|
||||
.catch(() => {})
|
||||
},
|
||||
|
||||
// 同意与退回
|
||||
agreeOrNot () {
|
||||
if (this.agreeOrList === '同意') {
|
||||
console.log('this.dataForm', this.dataForm)
|
||||
const params = qs.stringify({
|
||||
taskId: this.dataForm.content.instanceId,
|
||||
comment: this.inputAgree
|
||||
})
|
||||
console.log(params)
|
||||
this.$http.post('/act/task/complete?' + params).then(({ data: res }) => {
|
||||
if (res.code !== 0) {
|
||||
console.log(res)
|
||||
this.$message.error(res.msg)
|
||||
}
|
||||
}).catch(() => {})
|
||||
} else if (this.agreeOrList === '退回') {
|
||||
const params = qs.stringify({
|
||||
taskId: this.dataForm.content.instanceId,
|
||||
comment: this.inputNo
|
||||
})
|
||||
this.$http.post('/act/task/backToFirst?', params).then(({ data: res }) => {
|
||||
if (res.code !== 0) {
|
||||
this.$message.error(res.msg)
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
// 启动流程出错回调
|
||||
startProcessErrorCallback (data) {
|
||||
console.log(data)
|
||||
},
|
||||
// 任务处理出错回调
|
||||
taskHandleErrorCallback (data) {}
|
||||
},
|
||||
mounted () {
|
||||
this.applyData()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
::v-deep .big-BOX{
|
||||
background:rgba(244,245,248,0.8);
|
||||
padding:24px;
|
||||
h3{
|
||||
font-size:16px;
|
||||
color:#212121
|
||||
}
|
||||
p{
|
||||
width:78%;
|
||||
display:flex;
|
||||
justify-content: space-between;
|
||||
color:#212121;
|
||||
font-size:14px;
|
||||
span{
|
||||
display:inline-block;
|
||||
margin-left:8px;
|
||||
line-height:32px;
|
||||
span{
|
||||
font-weight:bold;
|
||||
}
|
||||
}
|
||||
}
|
||||
p:last-of-type{
|
||||
margin-top:16px;
|
||||
width:100%;
|
||||
span{
|
||||
display:flex;
|
||||
span{
|
||||
padding-left:12px;
|
||||
height:32px;
|
||||
background:rgba(232,234,239,1);
|
||||
border-radius:2px;
|
||||
button{
|
||||
background:unset;
|
||||
border:0;
|
||||
color:#0558e1;
|
||||
font-size:14px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
::v-deep .AbilityApply{
|
||||
margin-top:32px;
|
||||
|
||||
h3{
|
||||
font-size:16px;
|
||||
color:#212121;
|
||||
border-bottom:1px solid #dddee1;
|
||||
padding-bottom:10px;
|
||||
}
|
||||
ul{
|
||||
padding-left: 0px;
|
||||
li{
|
||||
list-style:none;
|
||||
padding: 30px 0;
|
||||
border-bottom: 1px solid #dddee1;
|
||||
display:flex;
|
||||
img{
|
||||
width:100px;
|
||||
height:100px;
|
||||
}
|
||||
div{
|
||||
margin-left:16px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
h2{
|
||||
margin-bottom:20px;
|
||||
font-size:20px;
|
||||
color:#000;
|
||||
display:flex;
|
||||
span{
|
||||
display:block;
|
||||
font-size:14px;
|
||||
color:#ffffff;
|
||||
margin-left:8px;
|
||||
background:rgba(0,184,230,0.8);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 0 5px;
|
||||
border-radius: 4px;
|
||||
}
|
||||
}
|
||||
p{
|
||||
margin-bottom:0;
|
||||
}
|
||||
}
|
||||
}
|
||||
.clearfix:after{
|
||||
display:block;
|
||||
content:"";
|
||||
clear:both;
|
||||
}
|
||||
.title{
|
||||
color:#0558e1;
|
||||
font-size:18px;
|
||||
padding-bottom:0;
|
||||
border-bottom: 0;
|
||||
|
||||
}
|
||||
.title:before {
|
||||
content: "";
|
||||
width: 6px;
|
||||
height: 6px;
|
||||
display: inline-block;
|
||||
border-radius: 50%;
|
||||
background: #0558e1;
|
||||
vertical-align: middle;
|
||||
margin-right: 10px;
|
||||
margin-top: 6px;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
::v-deep .agreeOr>div{
|
||||
display:flex;
|
||||
align-items: center;
|
||||
.el-input{
|
||||
margin-right: 10px;
|
||||
margin-left: 32px;
|
||||
}
|
||||
|
||||
}
|
||||
::v-deep .agreeOr>div:last-of-type{
|
||||
margin-top:15px;
|
||||
}
|
||||
.blueAll{
|
||||
::v-deep .el-radio-button__inner{
|
||||
width:80px;
|
||||
height:32px;
|
||||
line-height:32px;
|
||||
padding:0;
|
||||
border-radius:2px;
|
||||
background:#0558e1;
|
||||
color:#ffffff;
|
||||
border:1px solid #0558e1;
|
||||
}
|
||||
}
|
||||
.inputBule{
|
||||
width:55px;
|
||||
height:32px;
|
||||
line-height:32px;
|
||||
padding:0;
|
||||
border-radius:2px;
|
||||
background:#0558e1;
|
||||
color:#ffffff;
|
||||
border:1px solid #0558e1;
|
||||
}
|
||||
::v-deep .is-active{
|
||||
background:#ffffff;
|
||||
color:#0558e1;
|
||||
}
|
||||
.redAll{
|
||||
margin-left:10px;
|
||||
::v-deep .el-radio-button__inner{
|
||||
width:80px;
|
||||
height:32px;
|
||||
line-height:32px;
|
||||
padding:0;
|
||||
border-radius:2px;
|
||||
border:1px solid #e83a48;
|
||||
background:#ffffff;
|
||||
color:#e83a48;
|
||||
margin-left:10px;
|
||||
}
|
||||
:v-deep .el-radio-button__inner{
|
||||
box-shadow: unset;
|
||||
}
|
||||
}
|
||||
.blueInput{
|
||||
width:55px;
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,114 @@
|
|||
<template>
|
||||
<div class="wrapper">
|
||||
<div>
|
||||
<el-form
|
||||
:model="dataForm"
|
||||
ref="dataForm"
|
||||
@keyup.enter.native="dataFormSubmitHandle()"
|
||||
:label-width="$i18n.locale === 'en-US' ? '120px' : 'auto'"
|
||||
>
|
||||
<el-form-item label="评论内容">
|
||||
<el-input
|
||||
v-model="dataForm.comment"
|
||||
:disabled="fieldDisabled"
|
||||
placeholder="评论内容"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
<!-- 流程综合组件 -->
|
||||
<ren-process-multiple
|
||||
v-if="processVisible"
|
||||
updateInstanceIdUrl="/processForm/tabilityapplication/updateInstanceId"
|
||||
saveFormUrl="/processForm/tabilityapplication"
|
||||
dataFormName="dataForm"
|
||||
ref="renProcessMultiple"
|
||||
></ren-process-multiple>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import processModule from '@/mixins/process-module'
|
||||
export default {
|
||||
// 注入公共方法
|
||||
mixins: [processModule],
|
||||
components: {},
|
||||
props: {
|
||||
// fromList: {
|
||||
// // type: Array,
|
||||
// // default: () => {
|
||||
// // return []
|
||||
// // }
|
||||
// }
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
// processVisible: true,
|
||||
visible: false,
|
||||
// 表单属性是否可编辑
|
||||
fieldDisabled: false,
|
||||
dataForm: [],
|
||||
id: '',
|
||||
shifoushizujian: true
|
||||
}
|
||||
},
|
||||
watch: {},
|
||||
computed: {},
|
||||
methods: {
|
||||
init () {
|
||||
this.visible = true
|
||||
// this.getInfo(this.$router.currentRoute.params.params.params.resourceDTO.id)
|
||||
// this.dataForm = this.$router.currentRoute.params.params.params.resourceDTO
|
||||
// this.id=this.$router.currentRoute
|
||||
this.$nextTick(() => {
|
||||
this.$refs.dataForm.resetFields()
|
||||
// if (this.dataForm.id) {
|
||||
// 如业务KEY已存在,不允许编辑
|
||||
this.fieldDisabled = true
|
||||
// this.id = this.$router.currentRoute.businessKey
|
||||
this.getInfo(this.$router.currentRoute.params.businessKey)
|
||||
console.log('id', this.$router.currentRoute.params.businessKey)
|
||||
// }
|
||||
})
|
||||
},
|
||||
getInfo (id) {
|
||||
this.$http.get('/resourceMountApply/' + id).then(({ data: res }) => {
|
||||
if (res.code !== 0) {
|
||||
return this.$message.error(res.msg)
|
||||
}
|
||||
this.dataForm = res.data.resourceDTO
|
||||
if (this.dataForm.type != '应用资源') {
|
||||
this.shifoushizujian = false
|
||||
} else {
|
||||
this.shifoushizujian = true
|
||||
}
|
||||
console.log('this.dataForm', this.dataForm)
|
||||
})
|
||||
}
|
||||
},
|
||||
created () {
|
||||
// this.dataForm = this.$router.currentRoute.params.id
|
||||
this.init()
|
||||
console.log('fromList', this.$router.currentRoute.params.businessKey)
|
||||
// this.dataForm = this.$router.currentRoute.params.params.params.resourceDTO
|
||||
var callbacks = {
|
||||
startProcessSuccessCallback: this.closeCurrentTab,
|
||||
startProcessErrorCallback: this.startProcessErrorCallback,
|
||||
taskHandleSuccessCallback: this.closeCurrentTab,
|
||||
taskHandleErrorCallback: this.taskHandleErrorCallback,
|
||||
formSaveSuccessCallback: null,
|
||||
formSaveErrorCallback: null
|
||||
}
|
||||
// 初始化综合组件
|
||||
this.initProcessMultiple(callbacks)
|
||||
},
|
||||
mounted () {}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.kuandukuandukuandu{
|
||||
max-width:1500px;
|
||||
}
|
||||
.wrapper {
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,136 @@
|
|||
<!-- 流程业务表单 -->
|
||||
<template>
|
||||
<el-card shadow="never" class="aui-card--fill">
|
||||
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" :label-width="$i18n.locale === 'en-US' ? '120px' : '80px'">
|
||||
<el-form-item label="申请人" prop="user">
|
||||
<el-input v-model="dataForm.user" :disabled="fieldDisabled" placeholder="请输入申请人"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="申请电话" prop="phone">
|
||||
<el-input v-model="dataForm.phone" :disabled="fieldDisabled" placeholder="请输入申请人电话"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="申请单位" prop="unit">
|
||||
<el-input v-model="dataForm.unit" :disabled="fieldDisabled" placeholder="请输入申请单位"></el-input>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="所在地区" prop="area">
|
||||
<el-input v-model="dataForm.area" :disabled="fieldDisabled" placeholder="请输入所在地区"></el-input>
|
||||
</el-form-item> -->
|
||||
<el-form-item label="申请应用" prop="system">
|
||||
<el-input v-model="dataForm.system" :disabled="fieldDisabled" placeholder="请输入申请应用"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="应用场景" prop="scene">
|
||||
<el-input v-model="dataForm.scene" :disabled="fieldDisabled" placeholder="请输入应用场景"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="申请依据" prop="basis">
|
||||
<el-input v-model="dataForm.basis" :disabled="fieldDisabled" placeholder="请输入申请依据"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="dataForm.enclosure" label="申请附件" prop="enclosure">
|
||||
<el-button @click="downloadFile(dataForm.enclosure, '申请附件')">附件下载</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<!-- 流程综合组件 -->
|
||||
<ren-process-multiple v-if="processVisible" updateInstanceIdUrl="/processForm/tabilityapplication/updateInstanceId" saveFormUrl="/processForm/tabilityapplication" dataFormName="dataForm" ref="renProcessMultiple" ></ren-process-multiple>
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// 引入工作流公共方法
|
||||
import processModule from '@/mixins/process-module'
|
||||
export default {
|
||||
// 注入公共方法
|
||||
mixins: [processModule],
|
||||
data () {
|
||||
return {
|
||||
visible: false,
|
||||
// 表单属性是否可编辑
|
||||
fieldDisabled: false,
|
||||
dataForm: {
|
||||
id: '',
|
||||
user: '',
|
||||
phone: '',
|
||||
unit: '',
|
||||
area: '',
|
||||
system: '',
|
||||
scene: '',
|
||||
basis: '',
|
||||
enclosure: ''
|
||||
}
|
||||
}
|
||||
},
|
||||
created () {
|
||||
// 将业务KEY赋值给表单
|
||||
this.dataForm.id = this.$route.params.businessKey
|
||||
this.init()
|
||||
// 流程回调
|
||||
var callbacks = {
|
||||
startProcessSuccessCallback: this.closeCurrentTab,
|
||||
startProcessErrorCallback: this.startProcessErrorCallback,
|
||||
taskHandleSuccessCallback: this.closeCurrentTab,
|
||||
taskHandleErrorCallback: this.taskHandleErrorCallback,
|
||||
formSaveSuccessCallback: null,
|
||||
formSaveErrorCallback: null
|
||||
}
|
||||
// 初始化综合组件
|
||||
this.initProcessMultiple(callbacks)
|
||||
},
|
||||
computed: {
|
||||
dataRule () {
|
||||
return {
|
||||
user: [
|
||||
{ required: true, message: '请输入申请人', trigger: 'blur' }
|
||||
],
|
||||
phone: [
|
||||
{ required: true, message: '请输入申请人电话', trigger: 'blur' },
|
||||
{ type: 'string', pattern: /^1[3456789]\d{9}$/, message: '请输入正确的电话号码', trigger: 'blur' }
|
||||
],
|
||||
unit: [
|
||||
{ required: true, message: '请输入申请单位', trigger: 'blur' }
|
||||
],
|
||||
// area: [
|
||||
// { required: true, message: '请输入所在地区', trigger: 'blur' }
|
||||
// ],
|
||||
system: [
|
||||
{ required: true, message: '请输入申请应用', trigger: 'blur' }
|
||||
],
|
||||
scene: [
|
||||
{ required: true, message: '请输入应用场景', trigger: 'blur' }
|
||||
],
|
||||
basis: [
|
||||
{ required: true, message: '请输入申请依据', trigger: 'blur' }
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
init () {
|
||||
this.visible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.dataForm.resetFields()
|
||||
if (this.dataForm.id) {
|
||||
// 如业务KEY已存在,不允许编辑
|
||||
this.fieldDisabled = true
|
||||
this.getInfo()
|
||||
}
|
||||
})
|
||||
},
|
||||
// 获取信息
|
||||
getInfo () {
|
||||
this.$http.get(`/processForm/tabilityapplication/${this.dataForm.id}`).then(({ data: res }) => {
|
||||
if (res.code !== 0) {
|
||||
return this.$message.error(res.msg)
|
||||
}
|
||||
this.dataForm = {
|
||||
...this.dataForm,
|
||||
...res.data
|
||||
}
|
||||
}).catch(() => {})
|
||||
},
|
||||
// 启动流程出错回调
|
||||
startProcessErrorCallback (data) {
|
||||
console.log(data)
|
||||
},
|
||||
// 任务处理出错回调
|
||||
taskHandleErrorCallback (data) {
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
|
@ -1,64 +1,134 @@
|
|||
<!-- 流程业务表单 -->
|
||||
<template>
|
||||
<el-card shadow="never" class="aui-card--fill">
|
||||
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" :label-width="$i18n.locale === 'en-US' ? '120px' : '80px'">
|
||||
<el-form-item label="申请人" prop="user">
|
||||
<el-input v-model="dataForm.user" :disabled="fieldDisabled" placeholder="请输入申请人"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="申请电话" prop="phone">
|
||||
<el-input v-model="dataForm.phone" :disabled="fieldDisabled" placeholder="请输入申请人电话"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="申请单位" prop="unit">
|
||||
<el-input v-model="dataForm.unit" :disabled="fieldDisabled" placeholder="请输入申请单位"></el-input>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="所在地区" prop="area">
|
||||
<el-input v-model="dataForm.area" :disabled="fieldDisabled" placeholder="请输入所在地区"></el-input>
|
||||
</el-form-item> -->
|
||||
<el-form-item label="申请应用" prop="system">
|
||||
<el-input v-model="dataForm.system" :disabled="fieldDisabled" placeholder="请输入申请应用"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="应用场景" prop="scene">
|
||||
<el-input v-model="dataForm.scene" :disabled="fieldDisabled" placeholder="请输入应用场景"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="申请依据" prop="basis">
|
||||
<el-input v-model="dataForm.basis" :disabled="fieldDisabled" placeholder="请输入申请依据"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item v-if="dataForm.enclosure" label="申请附件" prop="enclosure">
|
||||
<el-button @click="downloadFile(dataForm.enclosure, '申请附件')">附件下载</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<!-- 申请人详情 -->
|
||||
<div>
|
||||
<h3>申请人信息</h3>
|
||||
<div class="big-BOX">
|
||||
<p>
|
||||
<span>申请人:<span> {{dataForm.content.user || '--'}}</span></span>
|
||||
<span>电话:<span>{{dataForm.content.phone || '--'}}</span></span>
|
||||
<span>单位:<span>{{dataForm.content.unit || '--'}}</span></span>
|
||||
</p>
|
||||
<p>
|
||||
<span>申请应用:<span>{{dataForm.content.system || '--'}}</span></span>
|
||||
<span> 应用场景:<span> {{dataForm.content.scene || '--'}}</span></span>
|
||||
<span> 申请依据: <span> {{dataForm.content.basis || '--'}}</span></span>
|
||||
</p>
|
||||
<p>
|
||||
<span> 能力应用期望效果:<span> {{dataForm.content.demandDetails|| '--'}}</span></span>
|
||||
</p>
|
||||
<p v-if="dataForm.content.enclosure">
|
||||
<span> 申请附件:<span> {{dataForm.content.enclosure|| '--'}}<button @click="downloadFile(dataForm.content.enclosure)">下载</button></span></span>
|
||||
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 申请能力 -->
|
||||
<div class="AbilityApply">
|
||||
<h3>申请能力</h3>
|
||||
<ul v-for="item in dataList" :key="item.id">
|
||||
<li class="title">{{item.address}}</li>
|
||||
<li class="clearfix">
|
||||
<img
|
||||
src="~@/assets/img/imgLeft.png"
|
||||
/>
|
||||
<div>
|
||||
<h2>{{item.name}}<span>{{item.type}}</span></h2>
|
||||
<p>{{item.describe}}</p>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<!-- 流程综合组件 -->
|
||||
<ren-process-multiple v-if="processVisible" updateInstanceIdUrl="/processForm/tabilityapplication/updateInstanceId" saveFormUrl="/processForm/tabilityapplication" dataFormName="dataForm" ref="renProcessMultiple" ></ren-process-multiple>
|
||||
<!-- <ren-process-multiple
|
||||
v-if="processVisible"
|
||||
updateInstanceIdUrl="/processForm/tabilityapplication/updateInstanceId"
|
||||
saveFormUrl="/processForm/tabilityapplication"
|
||||
dataFormName="dataForm"
|
||||
ref="renProcessMultiple"
|
||||
></ren-process-multiple> -->
|
||||
|
||||
<!-- 审批 -->
|
||||
<div class="agreeOr">
|
||||
<h3>审批</h3>
|
||||
<div>
|
||||
<el-radio-group v-model="agreeOrList" style="width:230px;">
|
||||
<el-radio-button label="同意" class="blueAll">同意</el-radio-button>
|
||||
<el-radio-button label="退回" class="redAll">退回</el-radio-button>
|
||||
</el-radio-group>
|
||||
<el-input v-if="agreeOrList ==='同意' " v-model="inputAgree" placeholder="请输入同意意见"></el-input>
|
||||
<el-input v-if="agreeOrList ==='退回'" v-model="inputNo" placeholder="请输入退回意见"></el-input>
|
||||
<el-button class="inputBule" @click="agreeOrNot">提交</el-button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 流程详情 -->
|
||||
<ren-process-detail-import></ren-process-detail-import>
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
// 引入工作流公共方法
|
||||
import processModule from '@/mixins/process-module'
|
||||
import qs from 'qs'
|
||||
import RenProcessDetailImport from '@/components/ren-process-detail/src/ren-process-detail-import'
|
||||
export default {
|
||||
// 注入公共方法
|
||||
mixins: [processModule],
|
||||
data () {
|
||||
return {
|
||||
visible: false,
|
||||
visible: true,
|
||||
// 表单属性是否可编辑
|
||||
fieldDisabled: false,
|
||||
// fieldDisabled: false,
|
||||
// dataForm: {
|
||||
// id: '',
|
||||
// user: '',
|
||||
// phone: '',
|
||||
// unit: '',
|
||||
// area: '',
|
||||
// system: '',
|
||||
// scene: '',
|
||||
// basis: ''
|
||||
// }
|
||||
dataForm: {
|
||||
id: '',
|
||||
user: '',
|
||||
phone: '',
|
||||
unit: '',
|
||||
area: '',
|
||||
system: '',
|
||||
scene: '',
|
||||
basis: '',
|
||||
enclosure: ''
|
||||
content: []
|
||||
},
|
||||
dataList: [
|
||||
{
|
||||
// img: '~@/assets/img/imgLeft.png',
|
||||
address: '青岛市应急管理局',
|
||||
name: '组件名称',
|
||||
type: '组件服务',
|
||||
describe: '资源描述资源描述资源描述资源描述资源描述资源描述'
|
||||
},
|
||||
{
|
||||
// img: '~@/assets/img/imgLeft.png',
|
||||
address: '青岛市应急管理局',
|
||||
name: '组件名称',
|
||||
type: '组件服务',
|
||||
describe: '资源描述资源描述资源描述资源描述资源描述资源描述'
|
||||
},
|
||||
{
|
||||
// img: '~@/assets/img/imgLeft.png',
|
||||
address: '青岛市应急管理局',
|
||||
name: '组件名称',
|
||||
type: '组件服务',
|
||||
describe: '资源描述资源描述资源描述资源描述资源描述资源描述'
|
||||
}
|
||||
],
|
||||
inputAgree: '',
|
||||
inputNo: '',
|
||||
agreeOrList: '同意'
|
||||
}
|
||||
},
|
||||
created () {
|
||||
// 将业务KEY赋值给表单
|
||||
this.dataForm.id = this.$route.params.businessKey
|
||||
console.log(this.dataForm, 'ela')
|
||||
this.init()
|
||||
// 流程回调
|
||||
var callbacks = {
|
||||
|
@ -73,64 +143,278 @@ export default {
|
|||
this.initProcessMultiple(callbacks)
|
||||
},
|
||||
computed: {
|
||||
dataRule () {
|
||||
return {
|
||||
user: [
|
||||
{ required: true, message: '请输入申请人', trigger: 'blur' }
|
||||
],
|
||||
phone: [
|
||||
{ required: true, message: '请输入申请人电话', trigger: 'blur' },
|
||||
{ type: 'string', pattern: /^1[3456789]\d{9}$/, message: '请输入正确的电话号码', trigger: 'blur' }
|
||||
],
|
||||
unit: [
|
||||
{ required: true, message: '请输入申请单位', trigger: 'blur' }
|
||||
],
|
||||
// area: [
|
||||
// { required: true, message: '请输入所在地区', trigger: 'blur' }
|
||||
// dataRule () {
|
||||
// return {
|
||||
// inputAgree: [
|
||||
// { required: true, message: this.$t('validate.required'), trigger: 'blur' }
|
||||
// ],
|
||||
system: [
|
||||
{ required: true, message: '请输入申请应用', trigger: 'blur' }
|
||||
],
|
||||
scene: [
|
||||
{ required: true, message: '请输入应用场景', trigger: 'blur' }
|
||||
],
|
||||
basis: [
|
||||
{ required: true, message: '请输入申请依据', trigger: 'blur' }
|
||||
]
|
||||
}
|
||||
}
|
||||
// inputNo: [
|
||||
// { required: true, message: this.$t('validate.required'), trigger: 'blur' }
|
||||
// ]
|
||||
// }
|
||||
// }
|
||||
},
|
||||
components: {
|
||||
RenProcessDetailImport
|
||||
},
|
||||
methods: {
|
||||
init () {
|
||||
this.visible = true
|
||||
// this.visible = true
|
||||
this.$nextTick(() => {
|
||||
this.$refs.dataForm.resetFields()
|
||||
// this.$refs.dataForm.resetFields()
|
||||
if (this.dataForm.id) {
|
||||
// 如业务KEY已存在,不允许编辑
|
||||
this.fieldDisabled = true
|
||||
// this.fieldDisabled = true
|
||||
this.getInfo()
|
||||
console.log(this.dataForm, 'init')
|
||||
}
|
||||
})
|
||||
},
|
||||
// 获取信息
|
||||
getInfo () {
|
||||
this.$http.get(`/processForm/tabilityapplication/${this.dataForm.id}`).then(({ data: res }) => {
|
||||
this.$http
|
||||
.get(`/processForm/tabilityapplication/${this.dataForm.id}`)
|
||||
.then(({ data: res }) => {
|
||||
if (res.code !== 0) {
|
||||
console.log(res.data)
|
||||
return this.$message.error(res.msg)
|
||||
}
|
||||
this.dataForm = {
|
||||
...this.dataForm,
|
||||
...res.data
|
||||
console.log(res.data, 'elas')
|
||||
this.dataForm.content = res.data
|
||||
console.log(this.dataForm, 'ela')
|
||||
})
|
||||
.catch(() => {})
|
||||
},
|
||||
// 申请能力
|
||||
applyData () {
|
||||
this.$http
|
||||
.get(`/resource/select/${this.dataForm.instanceId}`)
|
||||
.then(({ data: res }) => {
|
||||
if (res.code !== 0) {
|
||||
console.log(res.data, 'hhhhh')
|
||||
// return this.$message.error(res.msg)
|
||||
}
|
||||
// console.log(res.data, 'elas')
|
||||
// this.dataForm.content = res.data
|
||||
// console.log(this.dataForm, 'ela')
|
||||
})
|
||||
.catch(() => {})
|
||||
},
|
||||
|
||||
// 同意与退回
|
||||
agreeOrNot () {
|
||||
if (this.agreeOrList === '同意') {
|
||||
console.log('this.dataForm', this.dataForm)
|
||||
const params = qs.stringify({
|
||||
taskId: this.dataForm.content.instanceId,
|
||||
comment: this.inputAgree
|
||||
})
|
||||
console.log(params)
|
||||
this.$http.post('/act/task/complete?' + params).then(({ data: res }) => {
|
||||
if (res.code !== 0) {
|
||||
console.log(res)
|
||||
this.$message.error(res.msg)
|
||||
}
|
||||
}).catch(() => {})
|
||||
} else if (this.agreeOrList === '退回') {
|
||||
const params = qs.stringify({
|
||||
taskId: this.dataForm.content.instanceId,
|
||||
comment: this.inputNo
|
||||
})
|
||||
this.$http.post('/act/task/backToFirst?', params).then(({ data: res }) => {
|
||||
if (res.code !== 0) {
|
||||
this.$message.error(res.msg)
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
// 启动流程出错回调
|
||||
startProcessErrorCallback (data) {
|
||||
console.log(data)
|
||||
},
|
||||
// 任务处理出错回调
|
||||
taskHandleErrorCallback (data) {
|
||||
}
|
||||
taskHandleErrorCallback (data) {}
|
||||
},
|
||||
mounted () {
|
||||
this.applyData()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style scoped lang="scss">
|
||||
::v-deep .big-BOX{
|
||||
background:rgba(244,245,248,0.8);
|
||||
padding:24px;
|
||||
h3{
|
||||
font-size:16px;
|
||||
color:#212121
|
||||
}
|
||||
p{
|
||||
width:78%;
|
||||
display:flex;
|
||||
justify-content: space-between;
|
||||
color:#212121;
|
||||
font-size:14px;
|
||||
span{
|
||||
display:inline-block;
|
||||
margin-left:8px;
|
||||
line-height:32px;
|
||||
span{
|
||||
font-weight:bold;
|
||||
}
|
||||
}
|
||||
}
|
||||
p:last-of-type{
|
||||
margin-top:16px;
|
||||
width:100%;
|
||||
span{
|
||||
display:flex;
|
||||
span{
|
||||
padding:0 12px;
|
||||
height:32px;
|
||||
background:rgba(232,234,239,1);
|
||||
border-radius:2px;
|
||||
button{
|
||||
background:unset;
|
||||
border:0;
|
||||
color:#0558e1;
|
||||
font-size:14px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
::v-deep .AbilityApply{
|
||||
margin-top:32px;
|
||||
|
||||
h3{
|
||||
font-size:16px;
|
||||
color:#212121;
|
||||
border-bottom:1px solid #dddee1;
|
||||
padding-bottom:10px;
|
||||
}
|
||||
ul{
|
||||
padding-left: 0px;
|
||||
li{
|
||||
list-style:none;
|
||||
padding: 30px 0;
|
||||
border-bottom: 1px solid #dddee1;
|
||||
display:flex;
|
||||
img{
|
||||
width:100px;
|
||||
height:100px;
|
||||
}
|
||||
div{
|
||||
margin-left:16px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
h2{
|
||||
margin-bottom:20px;
|
||||
font-size:20px;
|
||||
color:#000;
|
||||
display:flex;
|
||||
span{
|
||||
display:block;
|
||||
font-size:14px;
|
||||
color:#ffffff;
|
||||
margin-left:8px;
|
||||
background:rgba(0,184,230,0.8);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding: 0 5px;
|
||||
border-radius: 4px;
|
||||
}
|
||||
}
|
||||
p{
|
||||
margin-bottom:0;
|
||||
}
|
||||
}
|
||||
}
|
||||
.clearfix:after{
|
||||
display:block;
|
||||
content:"";
|
||||
clear:both;
|
||||
}
|
||||
.title{
|
||||
color:#0558e1;
|
||||
font-size:18px;
|
||||
padding-bottom:0;
|
||||
border-bottom: 0;
|
||||
|
||||
}
|
||||
.title:before {
|
||||
content: "";
|
||||
width: 6px;
|
||||
height: 6px;
|
||||
display: inline-block;
|
||||
border-radius: 50%;
|
||||
background: #0558e1;
|
||||
vertical-align: middle;
|
||||
margin-right: 10px;
|
||||
margin-top: 6px;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
::v-deep .agreeOr>div{
|
||||
display:flex;
|
||||
align-items: center;
|
||||
.el-input{
|
||||
margin-right: 10px;
|
||||
margin-left: 32px;
|
||||
}
|
||||
|
||||
}
|
||||
::v-deep .agreeOr>div:last-of-type{
|
||||
margin-top:15px;
|
||||
}
|
||||
.blueAll{
|
||||
::v-deep .el-radio-button__inner{
|
||||
width:80px;
|
||||
height:32px;
|
||||
line-height:32px;
|
||||
padding:0;
|
||||
border-radius:2px;
|
||||
background:#ffffff;
|
||||
color:#0558e1;
|
||||
border:1px solid #0558e1;
|
||||
}
|
||||
::v-deep .el-radio-button__orig-radio:checked+.el-radio-button__inner{
|
||||
box-shadow: unset !important;
|
||||
background:#0558e1;
|
||||
color:#ffffff;
|
||||
}
|
||||
}
|
||||
.inputBule{
|
||||
width:55px;
|
||||
height:32px;
|
||||
line-height:32px;
|
||||
padding:0;
|
||||
border-radius:2px;
|
||||
background:#0558e1;
|
||||
color:#ffffff;
|
||||
border:1px solid #0558e1;
|
||||
}
|
||||
.redAll{
|
||||
margin-left:10px;
|
||||
::v-deep .el-radio-button__inner{
|
||||
width:80px;
|
||||
height:32px;
|
||||
line-height:32px;
|
||||
padding:0;
|
||||
border-radius:2px;
|
||||
border:1px solid #e83a48;
|
||||
background:#ffffff;
|
||||
color:#e83a48;
|
||||
margin-left:10px;
|
||||
}
|
||||
::v-deep .el-radio-button__orig-radio:checked+.el-radio-button__inner{
|
||||
box-shadow: unset !important;
|
||||
color:#ffffff;
|
||||
background: #e83a48;
|
||||
}
|
||||
}
|
||||
.blueInput{
|
||||
width:55px;
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -1,78 +1,117 @@
|
|||
<template>
|
||||
<el-dialog :visible.sync="visible" :title="!dataForm.id ? $t('add') : $t('update')" :close-on-click-modal="false" :close-on-press-escape="false">
|
||||
<el-form :model="dataForm" :rules="dataRule" ref="dataForm" @keyup.enter.native="dataFormSubmitHandle()" label-width="120px">
|
||||
<el-dialog
|
||||
:visible.sync="visible"
|
||||
:title="!dataForm.id ? $t('add') : $t('update')"
|
||||
:close-on-click-modal="false"
|
||||
:close-on-press-escape="false"
|
||||
>
|
||||
<el-form
|
||||
:model="dataForm"
|
||||
:rules="dataRule"
|
||||
ref="dataForm"
|
||||
@keyup.enter.native="dataFormSubmitHandle()"
|
||||
label-width="120px"
|
||||
>
|
||||
<el-form-item prop="name" :label="$t('model.name')">
|
||||
<el-input v-model="dataForm.name" :placeholder="$t('model.name')"></el-input>
|
||||
<el-input
|
||||
v-model="dataForm.name"
|
||||
:placeholder="$t('model.name')"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="key" :label="$t('model.key')">
|
||||
<el-input v-model="dataForm.key" :placeholder="$t('model.key')"></el-input>
|
||||
<el-input
|
||||
v-model="dataForm.key"
|
||||
:placeholder="$t('model.key')"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="description" :label="$t('model.description')">
|
||||
<el-input v-model="dataForm.description" :placeholder="$t('model.description')"></el-input>
|
||||
<el-input
|
||||
v-model="dataForm.description"
|
||||
:placeholder="$t('model.description')"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template slot="footer">
|
||||
<el-button @click="visible = false">{{ $t('cancel') }}</el-button>
|
||||
<el-button type="primary" @click="dataFormSubmitHandle()">{{ $t('confirm') }}</el-button>
|
||||
<el-button @click="visible = false">{{ $t("cancel") }}</el-button>
|
||||
<el-button type="primary" @click="dataFormSubmitHandle()">{{
|
||||
$t("confirm")
|
||||
}}</el-button>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import debounce from 'lodash/debounce'
|
||||
import debounce from "lodash/debounce";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
visible: false,
|
||||
dataForm: {
|
||||
id: '',
|
||||
name: '',
|
||||
key: '',
|
||||
description: ''
|
||||
}
|
||||
}
|
||||
id: "",
|
||||
name: "",
|
||||
key: "",
|
||||
description: "",
|
||||
},
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
dataRule() {
|
||||
return {
|
||||
name: [
|
||||
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
|
||||
{
|
||||
required: true,
|
||||
message: this.$t("validate.required"),
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
key: [
|
||||
{ required: true, message: this.$t('validate.required'), trigger: 'blur' }
|
||||
]
|
||||
}
|
||||
}
|
||||
{
|
||||
required: true,
|
||||
message: this.$t("validate.required"),
|
||||
trigger: "blur",
|
||||
},
|
||||
],
|
||||
};
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
init() {
|
||||
this.visible = true
|
||||
this.visible = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs['dataForm'].resetFields()
|
||||
})
|
||||
this.$refs["dataForm"].resetFields();
|
||||
});
|
||||
},
|
||||
// 表单提交
|
||||
dataFormSubmitHandle: debounce(function () {
|
||||
this.$refs['dataForm'].validate((valid) => {
|
||||
dataFormSubmitHandle: debounce(
|
||||
function () {
|
||||
this.$refs["dataForm"].validate((valid) => {
|
||||
if (!valid) {
|
||||
return false
|
||||
return false;
|
||||
}
|
||||
this.$http[!this.dataForm.id ? 'post' : 'put']('/act/model', this.dataForm).then(({ data: res }) => {
|
||||
this.$http[!this.dataForm.id ? "post" : "put"](
|
||||
"/act/model",
|
||||
this.dataForm
|
||||
)
|
||||
.then(({ data: res }) => {
|
||||
if (res.code !== 0) {
|
||||
return this.$message.error(res.msg)
|
||||
return this.$message.error(res.msg);
|
||||
}
|
||||
this.$message({
|
||||
message: this.$t('prompt.success'),
|
||||
type: 'success',
|
||||
message: this.$t("prompt.success"),
|
||||
type: "success",
|
||||
duration: 500,
|
||||
onClose: () => {
|
||||
this.visible = false
|
||||
this.$emit('refreshDataList')
|
||||
}
|
||||
this.visible = false;
|
||||
this.$emit("refreshDataList");
|
||||
},
|
||||
});
|
||||
})
|
||||
}).catch(() => {})
|
||||
})
|
||||
}, 1000, { 'leading': true, 'trailing': false })
|
||||
}
|
||||
}
|
||||
.catch(() => {});
|
||||
});
|
||||
},
|
||||
1000,
|
||||
{ leading: true, trailing: false }
|
||||
),
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
|
|
@ -1,21 +1,39 @@
|
|||
<template>
|
||||
<el-card shadow="never" class="aui-card--fill">
|
||||
<div class="mod-activiti__model">
|
||||
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
|
||||
<el-form
|
||||
:inline="true"
|
||||
:model="dataForm"
|
||||
@keyup.enter.native="getDataList()"
|
||||
>
|
||||
<el-form-item>
|
||||
<el-input v-model="dataForm.name" :placeholder="$t('model.name')" clearable></el-input>
|
||||
<el-input
|
||||
v-model="dataForm.name"
|
||||
:placeholder="$t('model.name')"
|
||||
clearable
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-input v-model="dataForm.key" :placeholder="$t('model.key')" clearable></el-input>
|
||||
<el-input
|
||||
v-model="dataForm.key"
|
||||
:placeholder="$t('model.key')"
|
||||
clearable
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button @click="getDataList()">{{ $t('query') }}</el-button>
|
||||
<el-button type="primary" @click="getDataList()">{{
|
||||
$t("query")
|
||||
}}</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button>
|
||||
<el-button type="primary" @click="addOrUpdateHandle()">{{
|
||||
$t("add")
|
||||
}}</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="danger" @click="deleteHandle()">{{ $t('deleteBatch') }}</el-button>
|
||||
<el-button type="danger" @click="deleteHandle()">{{
|
||||
$t("deleteBatch")
|
||||
}}</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-table
|
||||
|
@ -24,19 +42,78 @@
|
|||
border
|
||||
@selection-change="dataListSelectionChangeHandle"
|
||||
@sort-change="dataListSortChangeHandle"
|
||||
style="width: 100%;">
|
||||
<el-table-column type="selection" header-align="center" align="center" width="50"></el-table-column>
|
||||
<el-table-column prop="name" :label="$t('model.name')" header-align="center" align="center"></el-table-column>
|
||||
<el-table-column prop="key" :label="$t('model.key')" header-align="center" align="center"></el-table-column>
|
||||
<el-table-column prop="version" :label="$t('model.version')" header-align="center" align="center"></el-table-column>
|
||||
<el-table-column prop="createTime" :label="$t('model.createTime')" header-align="center" align="center" width="180"></el-table-column>
|
||||
<el-table-column prop="lastUpdateTime" :label="$t('model.lastUpdateTime')" header-align="center" align="center" width="180"></el-table-column>
|
||||
<el-table-column :label="$t('handle')" fixed="right" header-align="center" align="center" width="150">
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-table-column
|
||||
type="selection"
|
||||
header-align="center"
|
||||
align="center"
|
||||
width="50"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
prop="name"
|
||||
:label="$t('model.name')"
|
||||
header-align="center"
|
||||
align="center"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
prop="key"
|
||||
:label="$t('model.key')"
|
||||
header-align="center"
|
||||
align="center"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
prop="version"
|
||||
:label="$t('model.version')"
|
||||
header-align="center"
|
||||
align="center"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
prop="createTime"
|
||||
:label="$t('model.createTime')"
|
||||
header-align="center"
|
||||
align="center"
|
||||
width="180"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
prop="lastUpdateTime"
|
||||
:label="$t('model.lastUpdateTime')"
|
||||
header-align="center"
|
||||
align="center"
|
||||
width="180"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
:label="$t('handle')"
|
||||
fixed="right"
|
||||
header-align="center"
|
||||
align="center"
|
||||
width="150"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<a :href="getModelerURL(scope.row.id)" target="_blank" class="el-button el-button--text el-button--small">{{ $t('model.design') }}</a>
|
||||
<el-button type="text" size="small" @click="deployHandle(scope.row.id)">{{ $t('model.deploy') }}</el-button>
|
||||
<a :href="getExportURL(scope.row.id)" target="_blank" class="el-button el-button--text el-button--small">{{ $t('export') }}</a>
|
||||
<el-button type="text" size="small" @click="deleteHandle(scope.row.id)">{{ $t('delete') }}</el-button>
|
||||
<a
|
||||
:href="getModelerURL(scope.row.id)"
|
||||
target="_blank"
|
||||
class="el-button el-button--text el-button--small"
|
||||
>{{ $t("model.design") }}</a
|
||||
>
|
||||
<el-button
|
||||
type="text"
|
||||
size="small"
|
||||
@click="deployHandle(scope.row.id)"
|
||||
>{{ $t("model.deploy") }}</el-button
|
||||
>
|
||||
<a
|
||||
:href="getExportURL(scope.row.id)"
|
||||
target="_blank"
|
||||
class="el-button el-button--text el-button--small"
|
||||
>{{ $t("export") }}</a
|
||||
>
|
||||
<el-button
|
||||
type="text"
|
||||
size="small"
|
||||
@click="deleteHandle(scope.row.id)"
|
||||
>{{ $t("delete") }}</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
@ -47,76 +124,90 @@
|
|||
:total="total"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="pageSizeChangeHandle"
|
||||
@current-change="pageCurrentChangeHandle">
|
||||
@current-change="pageCurrentChangeHandle"
|
||||
>
|
||||
</el-pagination>
|
||||
<!-- 弹窗, 新增 / 修改 -->
|
||||
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
|
||||
<add-or-update
|
||||
v-if="addOrUpdateVisible"
|
||||
ref="addOrUpdate"
|
||||
@refreshDataList="getDataList"
|
||||
></add-or-update>
|
||||
</div>
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import mixinViewModule from '@/mixins/view-module'
|
||||
import AddOrUpdate from './model-add-or-update'
|
||||
import Cookies from 'js-cookie'
|
||||
import qs from 'qs'
|
||||
import mixinViewModule from "@/mixins/view-module";
|
||||
import AddOrUpdate from "./model-add-or-update";
|
||||
import Cookies from "js-cookie";
|
||||
import qs from "qs";
|
||||
export default {
|
||||
mixins: [mixinViewModule],
|
||||
data() {
|
||||
return {
|
||||
mixinViewModuleOptions: {
|
||||
getDataListURL: '/act/model/page',
|
||||
getDataListURL: "/act/model/page",
|
||||
getDataListIsPage: true,
|
||||
deleteURL: '/act/model',
|
||||
deleteIsBatch: true
|
||||
deleteURL: "/act/model",
|
||||
deleteIsBatch: true,
|
||||
},
|
||||
dataForm: {
|
||||
name: '',
|
||||
key: ''
|
||||
}
|
||||
}
|
||||
name: "",
|
||||
key: "",
|
||||
},
|
||||
};
|
||||
},
|
||||
components: {
|
||||
AddOrUpdate
|
||||
AddOrUpdate,
|
||||
},
|
||||
methods: {
|
||||
// 获取在线设计url地址
|
||||
getModelerURL(id) {
|
||||
var params = qs.stringify({
|
||||
'token': Cookies.get('ucsToken'),
|
||||
'modelId': id
|
||||
})
|
||||
return `${window.SITE_CONFIG['apiURL']}/modeler.html?${params}`
|
||||
token: Cookies.get("ucsToken"),
|
||||
modelId: id,
|
||||
});
|
||||
return `${window.SITE_CONFIG["apiURL"]}/modeler.html?${params}`;
|
||||
},
|
||||
// 获取导出url地址
|
||||
getExportURL(id) {
|
||||
var params = qs.stringify({
|
||||
'token': Cookies.get('ucsToken')
|
||||
})
|
||||
return `${window.SITE_CONFIG['apiURL']}/act/model/export/${id}?${params}`
|
||||
token: Cookies.get("ucsToken"),
|
||||
});
|
||||
return `${window.SITE_CONFIG["apiURL"]}/act/model/export/${id}?${params}`;
|
||||
},
|
||||
// 部署
|
||||
deployHandle(id) {
|
||||
this.$confirm(this.$t('prompt.info', { 'handle': this.$t('model.deploy') }), this.$t('prompt.title'), {
|
||||
confirmButtonText: this.$t('confirm'),
|
||||
cancelButtonText: this.$t('cancel'),
|
||||
type: 'warning'
|
||||
}).then(() => {
|
||||
this.$http.post(`/act/model/deploy/${id}`).then(({ data: res }) => {
|
||||
this.$confirm(
|
||||
this.$t("prompt.info", { handle: this.$t("model.deploy") }),
|
||||
this.$t("prompt.title"),
|
||||
{
|
||||
confirmButtonText: this.$t("confirm"),
|
||||
cancelButtonText: this.$t("cancel"),
|
||||
type: "warning",
|
||||
}
|
||||
)
|
||||
.then(() => {
|
||||
this.$http
|
||||
.post(`/act/model/deploy/${id}`)
|
||||
.then(({ data: res }) => {
|
||||
if (res.code !== 0) {
|
||||
return this.$message.error(res.msg)
|
||||
return this.$message.error(res.msg);
|
||||
}
|
||||
this.$message({
|
||||
message: this.$t('prompt.success'),
|
||||
type: 'success',
|
||||
message: this.$t("prompt.success"),
|
||||
type: "success",
|
||||
duration: 500,
|
||||
onClose: () => {
|
||||
this.getDataList()
|
||||
}
|
||||
this.getDataList();
|
||||
},
|
||||
});
|
||||
})
|
||||
}).catch(() => {})
|
||||
}).catch(() => {})
|
||||
}
|
||||
}
|
||||
}
|
||||
.catch(() => {});
|
||||
})
|
||||
.catch(() => {});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
|
|
@ -1,12 +1,22 @@
|
|||
<template>
|
||||
<el-card shadow="never" class="aui-card--fill">
|
||||
<div class="mod-activiti__process">
|
||||
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
|
||||
<el-form
|
||||
:inline="true"
|
||||
:model="dataForm"
|
||||
@keyup.enter.native="getDataList()"
|
||||
>
|
||||
<el-form-item>
|
||||
<el-input v-model="dataForm.processDefinitionName" :placeholder="$t('process.name')" clearable></el-input>
|
||||
<el-input
|
||||
v-model="dataForm.processDefinitionName"
|
||||
:placeholder="$t('process.name')"
|
||||
clearable
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button @click="getDataList()">{{ $t('query') }}</el-button>
|
||||
<el-button type="primary" @click="getDataList()">{{
|
||||
$t("query")
|
||||
}}</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-table
|
||||
|
@ -15,25 +25,86 @@
|
|||
border
|
||||
@selection-change="dataListSelectionChangeHandle"
|
||||
@sort-change="dataListSortChangeHandle"
|
||||
style="width: 100%;">
|
||||
<el-table-column type="selection" header-align="center" align="center" width="50"></el-table-column>
|
||||
<el-table-column prop="businessKey" :label="$t('process.businessKey')" header-align="center" align="center"></el-table-column>
|
||||
<el-table-column prop="processInstanceId" :label="$t('running.id')" header-align="center" align="center"></el-table-column>
|
||||
<el-table-column prop="processDefinitionName" :label="$t('process.processDefinitionName')" header-align="center" align="center"></el-table-column>
|
||||
<el-table-column prop="startTime" :label="$t('process.startTime')" header-align="center" align="center"></el-table-column>
|
||||
<el-table-column prop="ended" :label="$t('process.ended')" header-align="center" align="center">
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-table-column
|
||||
type="selection"
|
||||
header-align="center"
|
||||
align="center"
|
||||
width="50"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
prop="businessKey"
|
||||
:label="$t('process.businessKey')"
|
||||
header-align="center"
|
||||
align="center"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
prop="processInstanceId"
|
||||
:label="$t('running.id')"
|
||||
header-align="center"
|
||||
align="center"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
prop="processDefinitionName"
|
||||
:label="$t('process.processDefinitionName')"
|
||||
header-align="center"
|
||||
align="center"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
prop="startTime"
|
||||
:label="$t('process.startTime')"
|
||||
header-align="center"
|
||||
align="center"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
prop="ended"
|
||||
:label="$t('process.ended')"
|
||||
header-align="center"
|
||||
align="center"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.ended" size="small" type="success">{{ $t('process.ended0') }}</el-tag>
|
||||
<el-tag v-else size="small" type="danger">{{ $t('process.ended1') }}</el-tag>
|
||||
<el-tag v-if="scope.row.ended" size="small" type="success">{{
|
||||
$t("process.ended0")
|
||||
}}</el-tag>
|
||||
<el-tag v-else size="small" type="danger">{{
|
||||
$t("process.ended1")
|
||||
}}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="currentTaskList[0].taskName" :label="$t('process.taskName')" header-align="center" align="center"></el-table-column>
|
||||
<el-table-column
|
||||
prop="currentTaskList[0].taskName"
|
||||
:label="$t('process.taskName')"
|
||||
header-align="center"
|
||||
align="center"
|
||||
></el-table-column>
|
||||
<!-- <el-table-column prop="currentTaskList[0].createTime" :label="$t('process.createTime')" header-align="center" align="center"></el-table-column> -->
|
||||
<el-table-column prop="startTime" :label="$t('process.createTime')" header-align="center" align="center"></el-table-column>
|
||||
<el-table-column prop="currentTaskList[0].assigneeName" :label="$t('process.assignee')" header-align="center" align="center"></el-table-column>
|
||||
<el-table-column :label="$t('handle')" fixed="right" header-align="center" align="center" width="150">
|
||||
<el-table-column
|
||||
prop="startTime"
|
||||
:label="$t('process.createTime')"
|
||||
header-align="center"
|
||||
align="center"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
prop="currentTaskList[0].assigneeName"
|
||||
:label="$t('process.assignee')"
|
||||
header-align="center"
|
||||
align="center"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
:label="$t('handle')"
|
||||
fixed="right"
|
||||
header-align="center"
|
||||
align="center"
|
||||
width="150"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" size="small" @click="showDetail(scope.row)">{{ $t('process.viewFlowImage') }}</el-button>
|
||||
<el-button
|
||||
type="text"
|
||||
size="small"
|
||||
@click="showDetail(scope.row)"
|
||||
>{{ $t("process.viewFlowImage") }}</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
@ -44,39 +115,39 @@
|
|||
:total="total"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="pageSizeChangeHandle"
|
||||
@current-change="pageCurrentChangeHandle">
|
||||
@current-change="pageCurrentChangeHandle"
|
||||
>
|
||||
</el-pagination>
|
||||
</div>
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import mixinViewModule from '@/mixins/view-module'
|
||||
import processModule from '@/mixins/process-module'
|
||||
import mixinViewModule from "@/mixins/view-module";
|
||||
import processModule from "@/mixins/process-module";
|
||||
export default {
|
||||
mixins: [mixinViewModule, processModule],
|
||||
data() {
|
||||
return {
|
||||
mixinViewModuleOptions: {
|
||||
getDataListURL: '/act/his/getMyProcessInstancePage',
|
||||
getDataListURL: "/act/his/getMyProcessInstancePage",
|
||||
getDataListIsPage: true,
|
||||
deleteIsBatch: true,
|
||||
deleteIsBatchKey: 'deploymentId'
|
||||
deleteIsBatchKey: "deploymentId",
|
||||
},
|
||||
dataForm: {
|
||||
processDefinitionName: ''
|
||||
}
|
||||
}
|
||||
processDefinitionName: "",
|
||||
},
|
||||
components: {
|
||||
};
|
||||
},
|
||||
components: {},
|
||||
methods: {
|
||||
showDetail(row) {
|
||||
if (!row.businessKey) {
|
||||
return this.$message.error(this.$t('task.detailError'))
|
||||
}
|
||||
this.getProcDefRouteSet(row, this.forwardDetail)
|
||||
}
|
||||
}
|
||||
return this.$message.error(this.$t("task.detailError"));
|
||||
}
|
||||
this.getProcDefRouteSet(row, this.forwardDetail);
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
|
|
@ -1,12 +1,22 @@
|
|||
<template>
|
||||
<el-card shadow="never" class="aui-card--fill">
|
||||
<div class="mod-activiti__process">
|
||||
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
|
||||
<el-form
|
||||
:inline="true"
|
||||
:model="dataForm"
|
||||
@keyup.enter.native="getDataList()"
|
||||
>
|
||||
<el-form-item>
|
||||
<el-input v-model="dataForm.processDefinitionId" :placeholder="$t('process.name')" clearable></el-input>
|
||||
<el-input
|
||||
v-model="dataForm.processDefinitionId"
|
||||
:placeholder="$t('process.name')"
|
||||
clearable
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button @click="getDataList()">{{ $t('query') }}</el-button>
|
||||
<el-button type="primary" @click="getDataList()">{{
|
||||
$t("query")
|
||||
}}</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-table
|
||||
|
@ -15,24 +25,72 @@
|
|||
border
|
||||
@selection-change="dataListSelectionChangeHandle"
|
||||
@sort-change="dataListSortChangeHandle"
|
||||
style="width: 100%;">
|
||||
style="width: 100%"
|
||||
>
|
||||
<!-- <el-table-column type="selection" header-align="center" align="center" width="50"></el-table-column>
|
||||
<el-table-column prop="businessKey" :label="$t('process.businessKey')" header-align="center" align="center"></el-table-column> -->
|
||||
<el-table-column prop="startUserName" :label="$t('process.user')" header-align="center" align="center"></el-table-column>
|
||||
<el-table-column
|
||||
prop="startUserName"
|
||||
:label="$t('process.user')"
|
||||
header-align="center"
|
||||
align="center"
|
||||
></el-table-column>
|
||||
<!-- <el-table-column :label="$t('process.system')" header-align="center" align="center">
|
||||
<template slot-scope="scope">
|
||||
<span>{{scope.row && scope.row.resourceName||scope.row.params && scope.row.params.undercarriageReason}}</span>
|
||||
</template>
|
||||
</el-table-column> -->
|
||||
<el-table-column prop="resourceName" :label="$t('process.system')" header-align="center" align="center"></el-table-column>
|
||||
<el-table-column prop="processInstanceId" :label="$t('running.id')" header-align="center" align="center"></el-table-column>
|
||||
<el-table-column prop="processDefinitionName" :label="$t('process.processDefinitionName')" header-align="center" align="center"></el-table-column>
|
||||
<el-table-column prop="processDefinitionVersion" :label="$t('process.processDefinitionVersion')" header-align="center" align="center" width="100"></el-table-column>
|
||||
<el-table-column prop="startTime" :label="$t('process.startTime')" header-align="center" align="center"></el-table-column>
|
||||
<el-table-column prop="endTime" :label="$t('process.endTime')" header-align="center" align="center"></el-table-column>
|
||||
<el-table-column :label="$t('handle')" fixed="right" header-align="center" align="center" width="150">
|
||||
<el-table-column
|
||||
prop="resourceName"
|
||||
:label="$t('process.system')"
|
||||
header-align="center"
|
||||
align="center"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
prop="processInstanceId"
|
||||
:label="$t('running.id')"
|
||||
header-align="center"
|
||||
align="center"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
prop="processDefinitionName"
|
||||
:label="$t('process.processDefinitionName')"
|
||||
header-align="center"
|
||||
align="center"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
prop="processDefinitionVersion"
|
||||
:label="$t('process.processDefinitionVersion')"
|
||||
header-align="center"
|
||||
align="center"
|
||||
width="100"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
prop="startTime"
|
||||
:label="$t('process.startTime')"
|
||||
header-align="center"
|
||||
align="center"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
prop="endTime"
|
||||
:label="$t('process.endTime')"
|
||||
header-align="center"
|
||||
align="center"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
:label="$t('handle')"
|
||||
fixed="right"
|
||||
header-align="center"
|
||||
align="center"
|
||||
width="150"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" size="small" @click="showDetail(scope.row)">{{ $t('process.viewFlowImage') }}</el-button>
|
||||
<el-button
|
||||
type="text"
|
||||
size="small"
|
||||
@click="showDetail(scope.row)"
|
||||
>{{ $t("process.viewFlowImage") }}</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
@ -43,39 +101,39 @@
|
|||
:total="total"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="pageSizeChangeHandle"
|
||||
@current-change="pageCurrentChangeHandle">
|
||||
@current-change="pageCurrentChangeHandle"
|
||||
>
|
||||
</el-pagination>
|
||||
</div>
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import mixinViewModule from '@/mixins/view-module'
|
||||
import processModule from '@/mixins/process-module'
|
||||
import mixinViewModule from "@/mixins/view-module";
|
||||
import processModule from "@/mixins/process-module";
|
||||
export default {
|
||||
mixins: [mixinViewModule, processModule],
|
||||
data() {
|
||||
return {
|
||||
mixinViewModuleOptions: {
|
||||
getDataListURL: '/act/his/getMyHandledInstancePage',
|
||||
getDataListURL: "/act/his/getMyHandledInstancePage",
|
||||
getDataListIsPage: true,
|
||||
deleteIsBatch: true,
|
||||
deleteIsBatchKey: 'deploymentId'
|
||||
deleteIsBatchKey: "deploymentId",
|
||||
},
|
||||
dataForm: {
|
||||
processDefinitionId: ''
|
||||
}
|
||||
}
|
||||
processDefinitionId: "",
|
||||
},
|
||||
components: {
|
||||
};
|
||||
},
|
||||
components: {},
|
||||
methods: {
|
||||
showDetail(row) {
|
||||
if (!row.businessKey) {
|
||||
return this.$message.error(this.$t('task.detailError'))
|
||||
}
|
||||
this.getProcDefRouteSet(row, this.forwardDetail)
|
||||
}
|
||||
}
|
||||
return this.$message.error(this.$t("task.detailError"));
|
||||
}
|
||||
this.getProcDefRouteSet(row, this.forwardDetail);
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
|
|
@ -1,12 +1,22 @@
|
|||
<template>
|
||||
<el-card shadow="never" class="aui-card--fill">
|
||||
<div class="mod-activiti__process">
|
||||
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
|
||||
<el-form
|
||||
:inline="true"
|
||||
:model="dataForm"
|
||||
@keyup.enter.native="getDataList()"
|
||||
>
|
||||
<el-form-item>
|
||||
<el-input v-model="dataForm.taskName" :placeholder="$t('process.name')" clearable></el-input>
|
||||
<el-input
|
||||
v-model="dataForm.taskName"
|
||||
:placeholder="$t('process.name')"
|
||||
clearable
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button @click="getDataList()">{{ $t('query') }}</el-button>
|
||||
<el-button type="primary" @click="getDataList()">{{
|
||||
$t("query")
|
||||
}}</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-table
|
||||
|
@ -15,18 +25,76 @@
|
|||
border
|
||||
@selection-change="dataListSelectionChangeHandle"
|
||||
@sort-change="dataListSortChangeHandle"
|
||||
style="width: 100%;">
|
||||
<el-table-column type="selection" header-align="center" align="center" width="50"></el-table-column>
|
||||
<el-table-column prop="businessKey" :label="$t('process.businessKey')" header-align="center" align="center"></el-table-column>
|
||||
<el-table-column prop="processInstanceId" :label="$t('running.id')" header-align="center" align="center"></el-table-column>
|
||||
<el-table-column prop="processDefinitionName" :label="$t('process.processDefinitionName')" header-align="center" align="center"></el-table-column>
|
||||
<el-table-column prop="startTime" :label="$t('process.startTime')" header-align="center" align="center"></el-table-column>
|
||||
<el-table-column prop="taskName" :label="$t('process.taskName')" header-align="center" align="center"></el-table-column>
|
||||
<el-table-column prop="createTime" :label="$t('process.createTime')" header-align="center" align="center"></el-table-column>
|
||||
<el-table-column :label="$t('handle')" fixed="right" header-align="center" align="center" width="150">
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-table-column
|
||||
type="selection"
|
||||
header-align="center"
|
||||
align="center"
|
||||
width="50"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
prop="businessKey"
|
||||
:label="$t('process.businessKey')"
|
||||
header-align="center"
|
||||
align="center"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
prop="processInstanceId"
|
||||
:label="$t('running.id')"
|
||||
header-align="center"
|
||||
align="center"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
prop="processDefinitionName"
|
||||
:label="$t('process.processDefinitionName')"
|
||||
header-align="center"
|
||||
align="center"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
prop="startTime"
|
||||
:label="$t('process.startTime')"
|
||||
header-align="center"
|
||||
align="center"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
prop="taskName"
|
||||
:label="$t('process.taskName')"
|
||||
header-align="center"
|
||||
align="center"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
prop="createTime"
|
||||
:label="$t('process.createTime')"
|
||||
header-align="center"
|
||||
align="center"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
:label="$t('handle')"
|
||||
fixed="right"
|
||||
header-align="center"
|
||||
align="center"
|
||||
width="150"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" size="small" @click="claimTask(scope.row.taskId, scope.row.processDefinitionKey, scope.row.businessKey)">{{ $t('process.claim') }}</el-button>
|
||||
<el-button type="text" size="small" @click="showDetail(scope.row)">{{ $t('process.viewFlowImage') }}</el-button>
|
||||
<el-button
|
||||
type="text"
|
||||
size="small"
|
||||
@click="
|
||||
claimTask(
|
||||
scope.row.taskId,
|
||||
scope.row.processDefinitionKey,
|
||||
scope.row.businessKey
|
||||
)
|
||||
"
|
||||
>{{ $t("process.claim") }}</el-button
|
||||
>
|
||||
<el-button
|
||||
type="text"
|
||||
size="small"
|
||||
@click="showDetail(scope.row)"
|
||||
>{{ $t("process.viewFlowImage") }}</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
@ -37,59 +105,62 @@
|
|||
:total="total"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="pageSizeChangeHandle"
|
||||
@current-change="pageCurrentChangeHandle">
|
||||
@current-change="pageCurrentChangeHandle"
|
||||
>
|
||||
</el-pagination>
|
||||
</div>
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import mixinViewModule from '@/mixins/view-module'
|
||||
import processModule from '@/mixins/process-module'
|
||||
import qs from 'qs'
|
||||
import mixinViewModule from "@/mixins/view-module";
|
||||
import processModule from "@/mixins/process-module";
|
||||
import qs from "qs";
|
||||
export default {
|
||||
mixins: [mixinViewModule, processModule],
|
||||
data() {
|
||||
return {
|
||||
mixinViewModuleOptions: {
|
||||
getDataListURL: '/act/task/page',
|
||||
getDataListURL: "/act/task/page",
|
||||
getDataListIsPage: true,
|
||||
deleteIsBatch: true,
|
||||
deleteIsBatchKey: 'deploymentId'
|
||||
deleteIsBatchKey: "deploymentId",
|
||||
},
|
||||
dataForm: {
|
||||
isRoleGroup: '1',
|
||||
taskName: ''
|
||||
}
|
||||
}
|
||||
isRoleGroup: "1",
|
||||
taskName: "",
|
||||
},
|
||||
components: {
|
||||
};
|
||||
},
|
||||
components: {},
|
||||
methods: {
|
||||
claimTask(taskId, processDefinitionKey, businessKey) {
|
||||
var params = qs.stringify({
|
||||
'taskId': taskId
|
||||
})
|
||||
this.$http.post(`/act/task/claim`, params).then(({ data: res }) => {
|
||||
taskId: taskId,
|
||||
});
|
||||
this.$http
|
||||
.post(`/act/task/claim`, params)
|
||||
.then(({ data: res }) => {
|
||||
if (res.code !== 0) {
|
||||
return this.$message.error(res.msg)
|
||||
return this.$message.error(res.msg);
|
||||
}
|
||||
this.$message({
|
||||
message: this.$t('prompt.success'),
|
||||
type: 'success',
|
||||
message: this.$t("prompt.success"),
|
||||
type: "success",
|
||||
duration: 500,
|
||||
onClose: () => {
|
||||
this.getDataList()
|
||||
}
|
||||
this.getDataList();
|
||||
},
|
||||
});
|
||||
})
|
||||
}).catch(() => {})
|
||||
.catch(() => {});
|
||||
},
|
||||
showDetail(row) {
|
||||
if (!row.businessKey) {
|
||||
return this.$message.error(this.$t('task.detailError'))
|
||||
}
|
||||
this.getProcDefRouteSet(row, this.forwardDetail)
|
||||
}
|
||||
}
|
||||
return this.$message.error(this.$t("task.detailError"));
|
||||
}
|
||||
this.getProcDefRouteSet(row, this.forwardDetail);
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
|
|
@ -2,18 +2,28 @@
|
|||
* @Author: hisense.wuhongjian
|
||||
* @Date: 2022-04-27 19:34:30
|
||||
* @LastEditors: hisense.wuhongjian
|
||||
* @LastEditTime: 2022-04-28 19:26:07
|
||||
* @LastEditTime: 2022-06-23 21:08:01
|
||||
* @Description: 告诉大家这是什么
|
||||
-->
|
||||
<template>
|
||||
<el-card shadow="never" class="aui-card--fill">
|
||||
<div class="mod-activiti__process">
|
||||
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
|
||||
<el-form
|
||||
:inline="true"
|
||||
:model="dataForm"
|
||||
@keyup.enter.native="getDataList()"
|
||||
>
|
||||
<el-form-item>
|
||||
<el-input v-model="dataForm.taskName" :placeholder="$t('process.name')" clearable></el-input>
|
||||
<el-input
|
||||
v-model="dataForm.taskName"
|
||||
:placeholder="$t('process.name')"
|
||||
clearable
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button @click="getDataList()">{{ $t('query') }}</el-button>
|
||||
<el-button type="primary" @click="getDataList()">{{
|
||||
$t("query")
|
||||
}}</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-table
|
||||
|
@ -22,28 +32,84 @@
|
|||
border
|
||||
@selection-change="dataListSelectionChangeHandle"
|
||||
@sort-change="dataListSortChangeHandle"
|
||||
style="width: 100%;">
|
||||
<el-table-column type="selection" header-align="center" align="center" width="50"></el-table-column>
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-table-column
|
||||
type="selection"
|
||||
header-align="center"
|
||||
align="center"
|
||||
width="50"
|
||||
></el-table-column>
|
||||
<el-table-column label="申请人" header-align="center" align="center">
|
||||
<template slot-scope="scope">
|
||||
<span>{{scope.row.params && scope.row.params.user||scope.row.params && scope.row.params.applyUserName||scope.row.params && scope.row.params.userName||scope.row.params && scope.row.params.undercarriageUserName}}</span>
|
||||
<span>{{
|
||||
(scope.row.params && scope.row.params.user) ||
|
||||
(scope.row.params && scope.row.params.applyUserName) ||
|
||||
(scope.row.params && scope.row.params.userName) ||
|
||||
(scope.row.params && scope.row.params.undercarriageUserName)||
|
||||
(scope.row.params && scope.row.params.name)
|
||||
}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column :label="$t('process.system')" header-align="center" align="center">
|
||||
<el-table-column
|
||||
:label="$t('process.system')"
|
||||
header-align="center"
|
||||
align="center"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<span>{{scope.row.params && scope.row.params.system||scope.row.params && scope.row.params.demandSubject||scope.row.params && scope.row.params.resourceDTO && scope.row.params.resourceDTO.name||scope.row.params && scope.row.params.undercarriageReason}}</span>
|
||||
<span>{{
|
||||
(scope.row.params && scope.row.params.system) ||
|
||||
(scope.row.params && scope.row.params.demandSubject) ||
|
||||
(scope.row.params &&
|
||||
scope.row.params.resourceDTO &&
|
||||
scope.row.params.resourceDTO.name) ||
|
||||
(scope.row.params && scope.row.params.undercarriageReason)||
|
||||
(scope.row.params && scope.row.params.comment)
|
||||
}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<!-- <el-table-column prop="businessKey" :label="$t('process.businessKey')" header-align="center" align="center"></el-table-column>
|
||||
<el-table-column prop="processInstanceId" :label="$t('running.id')" header-align="center" align="center"></el-table-column> -->
|
||||
<el-table-column prop="processDefinitionName" :label="$t('process.processDefinitionName')" header-align="center" align="center"></el-table-column>
|
||||
<el-table-column prop="taskName" :label="$t('process.taskName')" header-align="center" align="center"></el-table-column>
|
||||
<el-table-column
|
||||
prop="processDefinitionName"
|
||||
:label="$t('process.processDefinitionName')"
|
||||
header-align="center"
|
||||
align="center"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
prop="taskName"
|
||||
:label="$t('process.taskName')"
|
||||
header-align="center"
|
||||
align="center"
|
||||
></el-table-column>
|
||||
<!-- <el-table-column prop="startTime" :label="$t('process.startTime')" header-align="center" align="center"></el-table-column> -->
|
||||
<el-table-column prop="createTime" :label="$t('process.createTime')" header-align="center" align="center"></el-table-column>
|
||||
<el-table-column :label="$t('handle')" fixed="right" header-align="center" align="center" width="150">
|
||||
<el-table-column
|
||||
prop="createTime"
|
||||
:label="$t('process.createTime')"
|
||||
header-align="center"
|
||||
align="center"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
:label="$t('handle')"
|
||||
fixed="right"
|
||||
header-align="center"
|
||||
align="center"
|
||||
width="150"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-button type="text" size="small" :processInstanceId="processInstanceId" @click="taskHandle(scope.row ) ">{{ $t('manage') }}</el-button>
|
||||
<el-button type="text" size="small" @click="taskDetail(scope.row)">{{ $t('process.viewFlowImage') }}</el-button>
|
||||
<el-button
|
||||
type="text"
|
||||
size="small"
|
||||
:processInstanceId="processInstanceId"
|
||||
@click="taskHandle(scope.row)"
|
||||
>{{ $t("manage") }}</el-button
|
||||
>
|
||||
<el-button
|
||||
type="text"
|
||||
size="small"
|
||||
@click="taskDetail(scope.row)"
|
||||
>{{ $t("process.viewFlowImage") }}</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
@ -54,7 +120,8 @@
|
|||
:total="total"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="pageSizeChangeHandle"
|
||||
@current-change="pageCurrentChangeHandle">
|
||||
@current-change="pageCurrentChangeHandle"
|
||||
>
|
||||
</el-pagination>
|
||||
</div>
|
||||
</el-card>
|
||||
|
@ -81,11 +148,11 @@ export default {
|
|||
processInstanceId: ''
|
||||
}
|
||||
},
|
||||
components: {
|
||||
},
|
||||
components: {},
|
||||
methods: {
|
||||
// 处理
|
||||
taskHandle (row) {
|
||||
console.log('row======================>', row, this.forwardHandleUrl)
|
||||
if (!row.businessKey) {
|
||||
return this.$message.error(this.$t('task.businessKeyError'))
|
||||
}
|
||||
|
|
|
@ -8,27 +8,42 @@
|
|||
clearable
|
||||
/>
|
||||
</el-col>
|
||||
<el-button type="primary" @click="flashTableData">查询</el-button>
|
||||
<el-button type="primary" @click="restTableData">重置</el-button>
|
||||
<el-button type="primary" class="button-new" @click="flashTableData"
|
||||
>查询</el-button
|
||||
>
|
||||
<el-button @click="restTableData">重置</el-button>
|
||||
<div style="float: right">
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
class="button-text-new"
|
||||
@click="deleteData"
|
||||
>批量删除</el-button>
|
||||
>批量删除</el-button
|
||||
>
|
||||
<el-button
|
||||
type="primary"
|
||||
class="button-new"
|
||||
@click="addDataDialogVisabled = true"
|
||||
>动态发布</el-button>
|
||||
>动态发布</el-button
|
||||
>
|
||||
</div>
|
||||
|
||||
</el-row>
|
||||
|
||||
<el-row style="margin-top: 20px">
|
||||
<el-table :data="tableData" border @selection-change="tableChange">
|
||||
<el-table-column width="60" type="selection" align="center"></el-table-column> <!-- 全选 -->
|
||||
<el-table-column label="序号" width="60" type="index" align="center"></el-table-column>
|
||||
<el-table-column
|
||||
width="60"
|
||||
type="selection"
|
||||
align="center"
|
||||
></el-table-column>
|
||||
<!-- 全选 -->
|
||||
<el-table-column
|
||||
label="序号"
|
||||
width="60"
|
||||
type="index"
|
||||
align="center"
|
||||
></el-table-column>
|
||||
<el-table-column label="动态标题" prop="title">
|
||||
<template slot-scope="scope">
|
||||
<div class="boxtitle">
|
||||
|
@ -44,10 +59,19 @@
|
|||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="图片地址" prop="imageUrl"></el-table-column>
|
||||
<el-table-column label="创建时间" prop="createDate" sortable></el-table-column>
|
||||
<el-table-column
|
||||
label="创建时间"
|
||||
prop="createDate"
|
||||
sortable
|
||||
></el-table-column>
|
||||
<el-table-column width="200" label="操作" align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button size="mini" @click="openEditDialog(scope.row)" type="text" icon="el-icon-setting"
|
||||
<el-button
|
||||
size="mini"
|
||||
@click="openEditDialog(scope.row)"
|
||||
type="text"
|
||||
icon="el-icon-setting"
|
||||
class="button-text-new"
|
||||
>编辑</el-button
|
||||
>
|
||||
<!-- <el-button size="mini" type="success" icon="el-icon-plus"
|
||||
|
@ -57,14 +81,23 @@
|
|||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
class="button-text-new"
|
||||
@click="deleteData(scope.row)"
|
||||
>删除</el-button
|
||||
>
|
||||
<el-button
|
||||
size="mini"
|
||||
type="text"
|
||||
icon="el-icon-delete"
|
||||
class="button-text-new"
|
||||
@click="openPreviewData(scope.row)"
|
||||
>预览</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!-- 分页 -->
|
||||
</el-row><el-pagination
|
||||
<!-- 分页 --> </el-row
|
||||
><el-pagination
|
||||
style="margin-top: 20px; text-align: center"
|
||||
@size-change="handleSizeChange"
|
||||
@current-change="handleCurrentChange"
|
||||
|
@ -77,7 +110,8 @@
|
|||
</el-pagination>
|
||||
|
||||
<!-- 新增项目 -->
|
||||
<el-dialog :close-on-click-modal="false"
|
||||
<el-dialog
|
||||
:close-on-click-modal="false"
|
||||
title="新增项目"
|
||||
:visible.sync="addDataDialogVisabled"
|
||||
@close="addDataDialogClose"
|
||||
|
@ -98,6 +132,18 @@
|
|||
show-word-limit
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="title" label="摘要">
|
||||
<el-input
|
||||
v-model="addDataFrom.note1"
|
||||
autocomplete="off"
|
||||
placeholder="摘要"
|
||||
maxlength="1000"
|
||||
show-word-limit
|
||||
type="textarea"
|
||||
@input="noteExceed"
|
||||
:rows="3"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="content" label="内容">
|
||||
<el-input
|
||||
v-model="addDataFrom.content"
|
||||
|
@ -133,22 +179,31 @@
|
|||
:on-exceed="handleExceed"
|
||||
:on-preview="showView"
|
||||
:limit="1"
|
||||
list-type="picture">
|
||||
<el-button size="small" type="primary">点击上传</el-button>
|
||||
<div slot="tip" class="el-upload__tip">只能上传jpg/png文件,且不超过500kb</div>
|
||||
list-type="picture"
|
||||
>
|
||||
<el-button size="small" type="primary" class="button-new"
|
||||
>点击上传</el-button
|
||||
>
|
||||
<div slot="tip" class="el-upload__tip">
|
||||
只能上传jpg/png文件,且不超过500kb
|
||||
</div>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="addDataDialogVisabled = false">取 消</el-button>
|
||||
<el-button type="primary" @click="addDataDialogConfirm"
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="addDataDialogConfirm"
|
||||
class="button-new"
|
||||
>确 定</el-button
|
||||
>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 编辑项目 -->
|
||||
<el-dialog :close-on-click-modal="false"
|
||||
<el-dialog
|
||||
:close-on-click-modal="false"
|
||||
title="编辑项目"
|
||||
:visible.sync="editDataDialogVisabled"
|
||||
@close="editDataDialogClose"
|
||||
|
@ -169,6 +224,18 @@
|
|||
show-word-limit
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="title" label="摘要">
|
||||
<el-input
|
||||
v-model="eidtDataForm.note1"
|
||||
autocomplete="off"
|
||||
placeholder="摘要"
|
||||
maxlength="1000"
|
||||
show-word-limit
|
||||
type="textarea"
|
||||
@input="noteExceed"
|
||||
:rows="3"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="content" label="内容">
|
||||
<el-input
|
||||
v-model="eidtDataForm.content"
|
||||
|
@ -202,19 +269,70 @@
|
|||
:on-remove="editUploadRemoveFile"
|
||||
:on-exceed="handleExceed"
|
||||
:on-preview="showView"
|
||||
list-type="picture">
|
||||
<el-button size="small" type="primary">点击上传</el-button>
|
||||
list-type="picture"
|
||||
>
|
||||
<el-button size="small" type="primary" class="button-new"
|
||||
>点击上传</el-button
|
||||
>
|
||||
<div slot="tip" class="el-upload__tip">只能上传图片文件</div>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button @click="editDataDialogVisabled = false">取 消</el-button>
|
||||
<el-button type="primary" @click="eidtDataDialogConfirm">确 定</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="eidtDataDialogConfirm"
|
||||
class="button-new"
|
||||
>确 定</el-button
|
||||
>
|
||||
</div>
|
||||
</el-dialog>
|
||||
<!-- 预览项目 -->
|
||||
<el-dialog
|
||||
:close-on-click-modal="false"
|
||||
title="预览项目"
|
||||
:visible.sync="perviewDataDialogVisabled"
|
||||
@close="perviewDataDialogClose"
|
||||
width="1300px"
|
||||
top="10vh"
|
||||
>
|
||||
<div class="preview-dialog">
|
||||
<div class="preview-title">
|
||||
<div class="title-text">
|
||||
<span>{{ previewData.title }}</span>
|
||||
</div>
|
||||
<div class="title-time">
|
||||
<span>发布时间:</span>
|
||||
<span>{{ previewData.updateDate }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="preview-note">
|
||||
<span>摘要:</span>
|
||||
<span>{{ previewData.note1 }}</span>
|
||||
</div>
|
||||
<div class="preview-image">
|
||||
<img
|
||||
width="100%"
|
||||
v-if="previewData.imageUrl != ''"
|
||||
:src="previewData.imageUrl"
|
||||
alt=""
|
||||
/>
|
||||
<img
|
||||
width="100%"
|
||||
v-else
|
||||
src="~@/assets/img/activitiMyWorkDynamics/no-img.png"
|
||||
alt=""
|
||||
/>
|
||||
</div>
|
||||
<div class="preview-content">
|
||||
<span>{{ previewData.content }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</el-dialog>
|
||||
|
||||
<el-dialog :visible.sync="dialogVisibleImg">
|
||||
<img width="100%" :src="previewImg" alt="">
|
||||
<img width="100%" :src="previewImg" alt="" />
|
||||
</el-dialog>
|
||||
</el-card>
|
||||
</template>
|
||||
|
@ -224,13 +342,13 @@
|
|||
export default {
|
||||
data() {
|
||||
return {
|
||||
fileUploadUrl: window.SITE_CONFIG.apiURL + '/upload',
|
||||
fileUploadUrl: window.SITE_CONFIG.apiURL + "/upload",
|
||||
// 表格筛选条件对象
|
||||
queryData: {
|
||||
keyworld: '',
|
||||
keyworld: "",
|
||||
pageIndex: 1,
|
||||
pageSize: 10,
|
||||
total: 0
|
||||
total: 0,
|
||||
},
|
||||
// 表格数据数组对象
|
||||
tableData: [],
|
||||
|
@ -241,270 +359,314 @@ export default {
|
|||
// imageUrl: '',
|
||||
// 新增数据表单对象
|
||||
addDataFrom: {
|
||||
title: '',
|
||||
content: '',
|
||||
imageUrl: '',
|
||||
delFlag: 0
|
||||
title: "",
|
||||
note1: "",
|
||||
content: "",
|
||||
imageUrl: "",
|
||||
delFlag: 0,
|
||||
},
|
||||
// 新增数据表单验证对象
|
||||
addDataFromRules: {
|
||||
title: [{ required: true, message: '请输入标题', trigger: 'blur' }],
|
||||
content: [
|
||||
{ required: true, message: '请输入内容', trigger: 'blur' }
|
||||
],
|
||||
title: [{ required: true, message: "请输入标题", trigger: "blur" }],
|
||||
note1: [{ required: true, message: "请输入摘要", trigger: "blur" }],
|
||||
content: [{ required: true, message: "请输入内容", trigger: "blur" }],
|
||||
imageUrl: [
|
||||
{ required: true, message: '请输入图片地址', trigger: 'blur' }
|
||||
]
|
||||
{ required: true, message: "请输入图片地址", trigger: "blur" },
|
||||
],
|
||||
},
|
||||
editDataDialogVisabled: false,
|
||||
eidtDataForm: {
|
||||
title: '',
|
||||
content: '',
|
||||
imageUrl: ''
|
||||
title: "",
|
||||
note1: "",
|
||||
content: "",
|
||||
imageUrl: "",
|
||||
},
|
||||
eidtDataFromRules: {
|
||||
title: [{ required: true, message: '请输入标题', trigger: 'blur' }],
|
||||
content: [
|
||||
{ required: true, message: '请输入内容', trigger: 'blur' }
|
||||
],
|
||||
title: [{ required: true, message: "请输入标题", trigger: "blur" }],
|
||||
note1: [{ required: true, message: "请输入摘要", trigger: "blur" }],
|
||||
content: [{ required: true, message: "请输入内容", trigger: "blur" }],
|
||||
imageUrl: [
|
||||
{ required: true, message: '请输入图片地址', trigger: 'blur' }
|
||||
]
|
||||
{ required: true, message: "请输入图片地址", trigger: "blur" },
|
||||
],
|
||||
},
|
||||
previewImg: '', // 预览图片
|
||||
perviewDataDialogVisabled: false,
|
||||
previewData: {
|
||||
title: "",
|
||||
note1: "",
|
||||
content: "",
|
||||
imageUrl: "",
|
||||
delFlag: 0,
|
||||
},
|
||||
previewImg: "", // 预览图片
|
||||
deleteDataArr: [],
|
||||
dialogVisibleImg: false
|
||||
}
|
||||
dialogVisibleImg: false,
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getTableData()
|
||||
this.getTableData();
|
||||
},
|
||||
methods: {
|
||||
tableChange(val) {
|
||||
this.deleteDataArr = val.map(item => item.id)
|
||||
console.log(this.deleteDataArr)
|
||||
this.deleteDataArr = val.map((item) => item.id);
|
||||
console.log(this.deleteDataArr);
|
||||
},
|
||||
restTableData() {
|
||||
this.queryData.keyworld = ''
|
||||
this.getTableData()
|
||||
this.queryData.keyworld = "";
|
||||
this.getTableData();
|
||||
},
|
||||
showView(file) {
|
||||
this.previewImg = file.url
|
||||
this.dialogVisibleImg = true
|
||||
this.previewImg = file.url;
|
||||
this.dialogVisibleImg = true;
|
||||
},
|
||||
getTableData() {
|
||||
this.$http.get('/workdynamics/page', {
|
||||
this.$http
|
||||
.get("/workdynamics/page", {
|
||||
params: {
|
||||
limit: this.queryData.pageSize,
|
||||
page: this.queryData.pageIndex,
|
||||
name: this.queryData.keyworld
|
||||
}
|
||||
name: this.queryData.keyworld,
|
||||
},
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code !== 0) {
|
||||
return this.$message.error(res.msg)
|
||||
return this.$message.error(res.msg);
|
||||
}
|
||||
this.tableData = res.data.list
|
||||
this.queryData.total = res.data.total
|
||||
this.tableData = res.data.list;
|
||||
this.queryData.total = res.data.total;
|
||||
})
|
||||
.catch(() => {})
|
||||
.catch(() => {});
|
||||
},
|
||||
flashTableData() {
|
||||
this.queryData.pageIndex = 1
|
||||
this.getTableData()
|
||||
this.queryData.pageIndex = 1;
|
||||
this.getTableData();
|
||||
},
|
||||
// 分页大小更改
|
||||
handleSizeChange(value) {
|
||||
this.queryData.pageSize = value
|
||||
this.getTableData()
|
||||
this.queryData.pageSize = value;
|
||||
this.getTableData();
|
||||
},
|
||||
// 当前索引更改
|
||||
handleCurrentChange(val) {
|
||||
this.queryData.pageIndex = val
|
||||
this.getTableData()
|
||||
this.queryData.pageIndex = val;
|
||||
this.getTableData();
|
||||
},
|
||||
// 新增数据窗口关闭事件
|
||||
addDataDialogClose() {
|
||||
this.$refs.addDataFormRef.resetFields()
|
||||
this.addDataFrom.imageUrl = ''
|
||||
this.$refs.addUpload.clearFiles()
|
||||
this.$refs.addDataFormRef.resetFields();
|
||||
this.addDataFrom.imageUrl = "";
|
||||
this.$refs.addUpload.clearFiles();
|
||||
// this.addDataFrom.imagesFiles = []
|
||||
// this.$refs.addDataFromUploadRef.clearFiles()
|
||||
},
|
||||
editDataDialogClose() {
|
||||
this.$refs.editDataFormRef.resetFields()
|
||||
this.eidtDataForm.imageUrl = ''
|
||||
this.$refs.editUpload.clearFiles()
|
||||
this.$refs.editDataFormRef.resetFields();
|
||||
this.eidtDataForm.imageUrl = "";
|
||||
this.$refs.editUpload.clearFiles();
|
||||
},
|
||||
// 追加数据
|
||||
addDataDialogConfirm() {
|
||||
this.$refs.addDataFormRef.validate(async (valid) => {
|
||||
if (valid) {
|
||||
//console.log("新增新增", this.addDataFrom);
|
||||
this.$http
|
||||
.post('/workdynamics/insert', this.addDataFrom)
|
||||
.post("/workdynamics/insert", this.addDataFrom)
|
||||
.then(({ data: res }) => {
|
||||
if (res.code !== 0) {
|
||||
return this.$message.error(res.msg)
|
||||
return this.$message.error(res.msg);
|
||||
}
|
||||
this.$message.success('新增成功')
|
||||
this.addDataDialogVisabled = false
|
||||
this.getTableData()
|
||||
this.$message.success("新增成功");
|
||||
this.addDataDialogVisabled = false;
|
||||
this.getTableData();
|
||||
})
|
||||
.catch(() => {})
|
||||
.catch(() => {});
|
||||
} else {
|
||||
this.$message.success('表单数据填写不完整')
|
||||
this.$message.success("表单数据填写不完整");
|
||||
}
|
||||
})
|
||||
});
|
||||
},
|
||||
// 限定图片
|
||||
handleExceed() {
|
||||
this.$message({ type: 'error', message: '最多支持一张图片上传' })
|
||||
this.$message({ type: "error", message: "最多支持一张图片上传" });
|
||||
},
|
||||
// 限制标题
|
||||
titleExceed(str) {
|
||||
if (str.length >= 200) {
|
||||
this.$message.error('标题文字不能超过200字')
|
||||
this.$message.error("标题文字不能超过200字");
|
||||
}
|
||||
},
|
||||
// 限制内容
|
||||
contentExceed(str) {
|
||||
if (str.length >= 2000) {
|
||||
this.$message.error('内容文字不能超过2000字')
|
||||
this.$message.error("内容文字不能超过2000字");
|
||||
}
|
||||
},
|
||||
//限制摘要
|
||||
noteExceed(str) {
|
||||
if (str.length >= 1000) {
|
||||
this.$message.error("摘要文字不能超过1000字");
|
||||
}
|
||||
},
|
||||
// 删除数据
|
||||
deleteData(row) {
|
||||
console.log(row)
|
||||
this.$confirm('此操作将删除当前数据, 是否继续?', '提示', {
|
||||
confirmButtonText: '确定',
|
||||
cancelButtonText: '取消',
|
||||
type: 'warning'
|
||||
console.log(row);
|
||||
this.$confirm("此操作将删除当前数据, 是否继续?", "提示", {
|
||||
confirmButtonText: "确定",
|
||||
cancelButtonText: "取消",
|
||||
type: "warning",
|
||||
})
|
||||
.then(async () => {
|
||||
let ids = []
|
||||
let ids = [];
|
||||
if (this.deleteDataArr.length > 1) {
|
||||
ids = this.deleteDataArr
|
||||
ids = this.deleteDataArr;
|
||||
} else {
|
||||
ids = [row.id]
|
||||
ids = [row.id];
|
||||
}
|
||||
console.log(ids)
|
||||
this.$http.delete('/workdynamics/delete', {
|
||||
data: ids
|
||||
console.log(ids);
|
||||
this.$http
|
||||
.delete("/workdynamics/delete", {
|
||||
data: ids,
|
||||
})
|
||||
.then(({ data: res }) => {
|
||||
if (res.code !== 0) {
|
||||
return this.$message.error(res.msg)
|
||||
return this.$message.error(res.msg);
|
||||
}
|
||||
this.$message({
|
||||
type: 'success',
|
||||
message: '删除成功!'
|
||||
})
|
||||
this.getTableData()
|
||||
})
|
||||
type: "success",
|
||||
message: "删除成功!",
|
||||
});
|
||||
this.getTableData();
|
||||
});
|
||||
})
|
||||
.catch(() => {
|
||||
this.$message({
|
||||
type: 'info',
|
||||
message: '已取消删除'
|
||||
})
|
||||
})
|
||||
type: "info",
|
||||
message: "已取消删除",
|
||||
});
|
||||
});
|
||||
},
|
||||
//预览工作动态信息
|
||||
async openPreviewData(row) {
|
||||
console.log("预览预览", row);
|
||||
const { data: res } = await this.$http.get(
|
||||
`workdynamics/select/${row.id}`
|
||||
);
|
||||
|
||||
if (res.code !== 0) {
|
||||
return this.$message.error(res.msg);
|
||||
}
|
||||
|
||||
this.previewData = res.data;
|
||||
|
||||
this.perviewDataDialogVisabled = true;
|
||||
},
|
||||
perviewDataDialogClose() {
|
||||
this.perviewDataDialogVisabled = false;
|
||||
},
|
||||
handleAvatarSuccess(res, file) {
|
||||
if (res.code !== 0) {
|
||||
return this.$message.error(res.msg)
|
||||
return this.$message.error(res.msg);
|
||||
}
|
||||
|
||||
this.addDataFrom.imageUrl = res.data
|
||||
this.addDataFrom.imageUrl = res.data;
|
||||
// this.imageUrl = URL.createObjectURL(file.raw);
|
||||
},
|
||||
beforeAvatarUpload(file) {
|
||||
const isImage =
|
||||
file.type === 'image/jpeg' ||
|
||||
file.type === 'image/jpg' ||
|
||||
file.type === 'image/png'
|
||||
const isLt2M = file.size / 1024 / 1024 < 2
|
||||
file.type === "image/jpeg" ||
|
||||
file.type === "image/jpg" ||
|
||||
file.type === "image/png";
|
||||
const isLt2M = file.size / 1024 / 1024 < 2;
|
||||
|
||||
if (!isImage) {
|
||||
this.$message.error('上传头像图片只能是 JPG 格式!')
|
||||
this.$message.error("上传头像图片只能是 JPG 格式!");
|
||||
}
|
||||
if (!isLt2M) {
|
||||
this.$message.error('上传头像图片大小不能超过 2MB!')
|
||||
this.$message.error("上传头像图片大小不能超过 2MB!");
|
||||
}
|
||||
return isImage && isLt2M
|
||||
return isImage && isLt2M;
|
||||
},
|
||||
eidtHandleAvatarSuccess(res, file) {
|
||||
if (res.code !== 0) {
|
||||
return this.$message.error(res.msg)
|
||||
return this.$message.error(res.msg);
|
||||
}
|
||||
|
||||
this.eidtDataForm.imageUrl = res.data
|
||||
this.eidtDataForm.imageUrl = res.data;
|
||||
// this.imageUrl = URL.createObjectURL(file.raw);
|
||||
},
|
||||
editBeforeAvatarUpload(file) {
|
||||
const isImage =
|
||||
file.type === 'image/jpeg' ||
|
||||
file.type === 'image/jpg' ||
|
||||
file.type === 'image/png'
|
||||
const isLt2M = file.size / 1024 / 1024 < 2
|
||||
file.type === "image/jpeg" ||
|
||||
file.type === "image/jpg" ||
|
||||
file.type === "image/png";
|
||||
const isLt2M = file.size / 1024 / 1024 < 2;
|
||||
|
||||
if (!isImage) {
|
||||
this.$message.error('上传头像图片只能是 JPG 格式!')
|
||||
this.$message.error("上传头像图片只能是 JPG 格式!");
|
||||
}
|
||||
if (!isLt2M) {
|
||||
this.$message.error('上传头像图片大小不能超过 2MB!')
|
||||
this.$message.error("上传头像图片大小不能超过 2MB!");
|
||||
}
|
||||
return isImage && isLt2M
|
||||
return isImage && isLt2M;
|
||||
},
|
||||
async openEditDialog(row) {
|
||||
const { data: res } = await this.$http.get(`workdynamics/select/${row.id}`)
|
||||
const { data: res } = await this.$http.get(
|
||||
`workdynamics/select/${row.id}`
|
||||
);
|
||||
|
||||
if (res.code !== 0) {
|
||||
return this.$message.error(res.msg)
|
||||
return this.$message.error(res.msg);
|
||||
}
|
||||
|
||||
this.eidtDataForm = res.data
|
||||
this.eidtDataForm = res.data;
|
||||
|
||||
this.editDataDialogVisabled = true
|
||||
this.editDataDialogVisabled = true;
|
||||
},
|
||||
eidtDataDialogConfirm() {
|
||||
this.$refs.editDataFormRef.validate(async (valid) => {
|
||||
if (valid) {
|
||||
console.log(this.eidtDataForm)
|
||||
console.log(this.eidtDataForm);
|
||||
this.$http
|
||||
.put('/workdynamics/update', this.eidtDataForm)
|
||||
.put("/workdynamics/update", this.eidtDataForm)
|
||||
.then(({ data: res }) => {
|
||||
if (res.code !== 0) {
|
||||
return this.$message.error(res.msg)
|
||||
return this.$message.error(res.msg);
|
||||
}
|
||||
this.$message.success('编辑成功')
|
||||
this.editDataDialogVisabled = false
|
||||
this.getTableData()
|
||||
this.$message.success("编辑成功");
|
||||
this.editDataDialogVisabled = false;
|
||||
this.getTableData();
|
||||
})
|
||||
.catch(() => {})
|
||||
.catch(() => {});
|
||||
} else {
|
||||
this.$message.success('表单数据填写不完整')
|
||||
this.$message.success("表单数据填写不完整");
|
||||
}
|
||||
})
|
||||
});
|
||||
},
|
||||
addUploadRemoveFile(file, fileList) {
|
||||
this.$refs.addUpload.clearFiles()
|
||||
this.addDataFrom.imageUrl = ''
|
||||
this.$refs.addUpload.clearFiles();
|
||||
this.addDataFrom.imageUrl = "";
|
||||
},
|
||||
editUploadRemoveFile(file, fileList) {
|
||||
this.$refs.editUpload.clearFiles()
|
||||
this.eidtDataForm.imageUrl = ''
|
||||
}
|
||||
this.$refs.editUpload.clearFiles();
|
||||
this.eidtDataForm.imageUrl = "";
|
||||
},
|
||||
},
|
||||
computed: {
|
||||
editDialogShowFileList() {
|
||||
if (this.eidtDataForm.imageUrl) {
|
||||
return [{ name: this.eidtDataForm.imageUrl, url: this.eidtDataForm.imageUrl }]
|
||||
}
|
||||
}
|
||||
}
|
||||
return [
|
||||
{ name: this.eidtDataForm.imageUrl, url: this.eidtDataForm.imageUrl },
|
||||
];
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
<style scoped lang="scss">
|
||||
::v-deep .el-checkbox__input.is-checked .el-checkbox__inner,
|
||||
.el-checkbox__input.is-indeterminate .el-checkbox__inner {
|
||||
background-color: #0058e1; //#3E8EF7
|
||||
border-color: #0058e1;
|
||||
}
|
||||
.avatar-uploader .el-upload {
|
||||
border: 1px dashed #d9d9d9;
|
||||
border-radius: 6px;
|
||||
|
@ -513,7 +675,7 @@ export default {
|
|||
overflow: hidden;
|
||||
}
|
||||
.avatar-uploader .el-upload:hover {
|
||||
border-color: #409EFF;
|
||||
border-color: #409eff;
|
||||
}
|
||||
.avatar-uploader-icon {
|
||||
font-size: 28px;
|
||||
|
@ -546,5 +708,90 @@ export default {
|
|||
display: -webkit-box;
|
||||
-webkit-box-orient: vertical;
|
||||
}
|
||||
.preview-dialog {
|
||||
width: 100%;
|
||||
height: 700px;
|
||||
overflow: auto;
|
||||
padding: 10px 10px;
|
||||
/*滚动条样式*/
|
||||
&::-webkit-scrollbar {
|
||||
width: 6px;
|
||||
}
|
||||
&::-webkit-scrollbar-thumb {
|
||||
border-radius: 5;
|
||||
background: rgba(0, 0, 0, 0.25);
|
||||
}
|
||||
&::-webkit-scrollbar-track {
|
||||
border-radius: 0;
|
||||
background: #f2f2f2;
|
||||
}
|
||||
|
||||
.preview-title {
|
||||
width: 100%;
|
||||
height: 90px;
|
||||
//margin-top: -40px;
|
||||
border-bottom: solid #c6c6c6 1px;
|
||||
.title-text {
|
||||
text-align: center;
|
||||
span {
|
||||
font-size: 24px;
|
||||
color: #0558e1;
|
||||
}
|
||||
}
|
||||
.title-time {
|
||||
width: 100%;
|
||||
height: 30px;
|
||||
margin-top: 14px;
|
||||
text-align: center;
|
||||
line-height: 30px;
|
||||
span {
|
||||
font-size: 16px;
|
||||
color: #606266;
|
||||
}
|
||||
}
|
||||
}
|
||||
.preview-note {
|
||||
width: 100%;
|
||||
height: 100px;
|
||||
text-align: left;
|
||||
margin-top: 24px;
|
||||
text-indent: 2em;
|
||||
span:first-child {
|
||||
font-size: 16px;
|
||||
color: #606266;
|
||||
}
|
||||
span:last-child {
|
||||
font-size: 16px;
|
||||
color: #212121;
|
||||
line-height: 30px;
|
||||
}
|
||||
}
|
||||
.preview-image {
|
||||
width: 900px;
|
||||
//height: 100%;
|
||||
//margin-top: 16px;
|
||||
padding-top: 5px;
|
||||
text-align: center;
|
||||
padding-left: 300px;
|
||||
}
|
||||
.preview-content {
|
||||
line-height: 30px;
|
||||
text-indent: 2em;
|
||||
margin-top: 16px;
|
||||
span {
|
||||
font-size: 16px;
|
||||
color: #212121;
|
||||
}
|
||||
}
|
||||
}
|
||||
.button-new {
|
||||
background-color: #0558e1;
|
||||
border: none;
|
||||
}
|
||||
.button-text-new {
|
||||
color: #0558e1;
|
||||
}
|
||||
.el-icon-delete {
|
||||
color: #0558e1;
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* @Author: hisense.liangjunhua
|
||||
* @Date: 2022-05-06 11:17:55
|
||||
* @LastEditors: hisense.liangjunhua
|
||||
* @LastEditTime: 2022-06-08 17:19:11
|
||||
* @LastEditTime: 2022-06-20 17:40:52
|
||||
* @Description: 编目弹窗
|
||||
-->
|
||||
<template>
|
||||
|
@ -441,17 +441,7 @@ export default {
|
|||
const newData = [...this.data]
|
||||
this.editData = {}
|
||||
newData.forEach(val => {
|
||||
if (val.key === key) {
|
||||
this.editData = val
|
||||
} else {
|
||||
if (val.children) {
|
||||
val.children.forEach(item => {
|
||||
if (item.key === key) {
|
||||
this.editData = item
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
this.handleChangeFor(val, key)
|
||||
})
|
||||
if (this.editData) {
|
||||
this.editData[column] = value
|
||||
|
@ -459,6 +449,17 @@ export default {
|
|||
}
|
||||
console.log(this.data)
|
||||
},
|
||||
handleChangeFor (val, key) {
|
||||
if (val.key === key) {
|
||||
this.editData = val
|
||||
} else {
|
||||
if (val.children) {
|
||||
val.children.forEach(item => {
|
||||
this.handleChangeFor(item, key)
|
||||
})
|
||||
}
|
||||
}
|
||||
},
|
||||
edit (key) {
|
||||
if (this.flag) {
|
||||
const newData = [...this.data]
|
||||
|
|
|
@ -0,0 +1,515 @@
|
|||
<template>
|
||||
<div>
|
||||
<el-dialog
|
||||
:visible.sync="visible"
|
||||
:title="disabled ? '能力展示' : '挂接'"
|
||||
@close="guanbi"
|
||||
:close-on-click-modal="false"
|
||||
:close-on-press-escape="false"
|
||||
>
|
||||
<!-- 挂载和修改-->
|
||||
<div key="1" v-if="!disabled">
|
||||
<!-- 挂接 -->
|
||||
<el-form v-if="!UpdateState" ref="dataForm" :model="dataForm">
|
||||
<el-form-item
|
||||
v-for="(item, index) in dataList"
|
||||
:key="index"
|
||||
:label="item.attrType"
|
||||
>
|
||||
<el-input
|
||||
v-model="dataForm.name"
|
||||
v-if="item.type == 'name'"
|
||||
></el-input>
|
||||
<el-input
|
||||
v-model="dataForm.apiUrl"
|
||||
v-if="item.type == 'link'"
|
||||
></el-input>
|
||||
<el-input
|
||||
type="textarea"
|
||||
v-model="item.attrValue"
|
||||
v-if="item.type == 'textarea'"
|
||||
></el-input>
|
||||
<el-select
|
||||
v-if="item.type == 'select'"
|
||||
v-model="item.attrValue"
|
||||
placeholder="请选择活动区域"
|
||||
>
|
||||
<el-option
|
||||
:label="itemSelect"
|
||||
v-for="(itemSelect, indexSelect) in item.children"
|
||||
:key="indexSelect"
|
||||
:value="itemSelect"
|
||||
></el-option>
|
||||
</el-select>
|
||||
|
||||
<upload
|
||||
:child="dataForm"
|
||||
limit="1"
|
||||
accept=".jpg,.png"
|
||||
v-if="item.type == 'photo'"
|
||||
></upload>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<!-- 修改 -->
|
||||
<el-form
|
||||
v-else
|
||||
:model="dataFormUpdate"
|
||||
ref="dataForm"
|
||||
@keyup.enter.native="dataFormSubmitHandle()"
|
||||
>
|
||||
<el-form-item label="场景名称">
|
||||
<el-input
|
||||
v-model="dataFormUpdate.name"
|
||||
placeholder="场景名称"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="场景url">
|
||||
<el-input
|
||||
v-model="dataFormUpdate.apiUrl"
|
||||
placeholder="场景url"
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
v-for="item in dataFormUpdate.infoList"
|
||||
:key="item.index"
|
||||
:label="item.attrType"
|
||||
>
|
||||
<el-input
|
||||
v-model="item.attrValue"
|
||||
:placeholder="item.attrType"
|
||||
v-if="item.attrType != '应用领域'"
|
||||
></el-input>
|
||||
<el-select
|
||||
v-else
|
||||
v-model="item.attrValue"
|
||||
:placeholder="item.attrType"
|
||||
>
|
||||
<el-option
|
||||
:value="item2"
|
||||
v-for="(item2, index2) in dataList[2].children"
|
||||
:key="index2"
|
||||
:label="item2"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
<!-- 展示 -->
|
||||
<el-form key="2" class="detial-form" v-else>
|
||||
<el-form-item label="场景名称" prop="name">
|
||||
{{ dataFormShowDetails.name || "--" }}
|
||||
</el-form-item>
|
||||
<el-form-item label="场景url" prop="name">
|
||||
{{ dataFormShowDetails.apiUrl || "--" }}
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
v-for="item in dataFormShowDetails.infoList"
|
||||
:key="item.index"
|
||||
:label="item.attrType"
|
||||
:prop="item.attrValue"
|
||||
>
|
||||
{{ item.attrValue || "--" }}
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template slot="footer" v-if="true">
|
||||
<el-button @click="visible = false">{{ $t("cancel") }}</el-button>
|
||||
<el-button type="primary" @click="dataFormSubmitHandle()">{{
|
||||
$t("confirm")
|
||||
}}</el-button>
|
||||
</template>
|
||||
</el-dialog>
|
||||
<div>
|
||||
<el-dialog :visible.sync="dialogVisibleImg">
|
||||
<img width="100%" :src="previewImg" />
|
||||
</el-dialog>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import debounce from "lodash/debounce";
|
||||
import dictionaries from "@/utils/dictionaries";
|
||||
import { mapState } from "vuex";
|
||||
import { getIconList } from "@/utils";
|
||||
import Cookies from "js-cookie";
|
||||
import upload from "./upload.vue";
|
||||
import qs from "qs";
|
||||
export default {
|
||||
components: {
|
||||
upload,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
checkList: [],
|
||||
dialogVisibleImg: false,
|
||||
previewImg: "", // 预览图片
|
||||
dialogVisible: false,
|
||||
fileUploadUrl: window.SITE_CONFIG.apiURL + "/upload",
|
||||
uploadUrl:
|
||||
window.SITE_CONFIG.apiURL +
|
||||
"/sys/oss/upload?token=" +
|
||||
Cookies.get("ucsToken"),
|
||||
companyArr: dictionaries.companyArr,
|
||||
visible: false,
|
||||
sceneArr: dictionaries.sceneArr,
|
||||
fieldArr: dictionaries.fieldArr,
|
||||
shareFormArr: dictionaries.shareFormArr,
|
||||
shareTypeArr: dictionaries.shareTypeArr,
|
||||
iconList: [],
|
||||
iconListVisible: false,
|
||||
UpdateState: false,
|
||||
dataForm: {
|
||||
id: "",
|
||||
deptId: "",
|
||||
deptContacts: "",
|
||||
deptPhone: "",
|
||||
dataVolume: "",
|
||||
shareCondition: "",
|
||||
shareType: "",
|
||||
shareMode: "",
|
||||
delFlag: 0,
|
||||
description: "",
|
||||
downloads: 0,
|
||||
image: "",
|
||||
infoList: [],
|
||||
link: "",
|
||||
name: "",
|
||||
note1: "",
|
||||
note2: "",
|
||||
note3: "",
|
||||
note4: "",
|
||||
note5: "",
|
||||
score: "",
|
||||
type: "赋能案例",
|
||||
apiMethodType: "",
|
||||
apiUrl: "",
|
||||
visits: 0,
|
||||
},
|
||||
deptId: "",
|
||||
fangwendizhi: "",
|
||||
mingzi: "",
|
||||
dataFormUpdate: {},
|
||||
dataFormShowDetails: {},
|
||||
infoList2: [],
|
||||
infoList3: [],
|
||||
dataList: [
|
||||
{ attrType: "场景名称", attrValue: "", type: "name" },
|
||||
{
|
||||
attrType: "图片",
|
||||
attrValue: "",
|
||||
type: "photo",
|
||||
child: { node1: "" },
|
||||
},
|
||||
{
|
||||
attrType: "应用领域",
|
||||
attrValue: "",
|
||||
type: "select",
|
||||
children: [],
|
||||
},
|
||||
{ attrType: "场景url", attrValue: "", type: "link" },
|
||||
{ attrType: "案例背景", attrValue: "", type: "textarea" },
|
||||
{ attrType: "业务挑战", attrValue: "", type: "textarea" },
|
||||
{ attrType: "解决方案", attrValue: "", type: "textarea" },
|
||||
{ attrType: "案例成效", attrValue: "", type: "textarea" },
|
||||
],
|
||||
};
|
||||
},
|
||||
props: {
|
||||
disabled: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
// 获取当前管理员信息
|
||||
getUserInfo() {
|
||||
this.$http.get("/sys/user/info").then(({ data: res }) => {
|
||||
this.dataForm.deptId = res.data.deptId;
|
||||
this.deptId = res.data.deptId;
|
||||
console.log("depid", this.dataForm);
|
||||
});
|
||||
},
|
||||
handleRemove(file, fileList) {
|
||||
console.log(file, fileList);
|
||||
},
|
||||
handlePictureCardPreview(file) {
|
||||
this.dialogImageUrl = file.url;
|
||||
this.dialogVisible = true;
|
||||
},
|
||||
// 上传图片之前
|
||||
uploadBeforeUploadHandle(file) {
|
||||
if (
|
||||
file.type !== "image/jpg" &&
|
||||
file.type !== "image/jpeg" &&
|
||||
file.type !== "image/png" &&
|
||||
file.type !== "image/gif"
|
||||
) {
|
||||
this.$message.error("只支持jpg、png、gif格式的图片!");
|
||||
return false;
|
||||
}
|
||||
},
|
||||
imgUploadSuccess(res, file, fileList) {
|
||||
console.log("zzzzzzz", res, file, fileList);
|
||||
|
||||
if (res.code !== 0) {
|
||||
return this.$message.error(res.msg);
|
||||
}
|
||||
},
|
||||
init() {
|
||||
this.visible = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.dataForm && this.$refs.dataForm.resetFields();
|
||||
this.iconList = getIconList();
|
||||
if (this.dataForm.id) {
|
||||
this.getInfo();
|
||||
}
|
||||
});
|
||||
},
|
||||
// 图标, 选中
|
||||
iconListCurrentChangeHandle(icon) {
|
||||
this.dataForm.imgurl = icon;
|
||||
this.iconListVisible = false;
|
||||
},
|
||||
// 获取信息
|
||||
getInfo() {
|
||||
const params = {
|
||||
page: 1,
|
||||
limit: 99,
|
||||
dictTypeId: "1513712507692818433",
|
||||
};
|
||||
debugger;
|
||||
this.$http
|
||||
.get("/sys/dict/data/page" + "?" + qs.stringify(params))
|
||||
.then(({ data: res }) => {
|
||||
res.data.list.map((item) => {
|
||||
this.dataList[2].children.push(item.dictLabel);
|
||||
});
|
||||
});
|
||||
},
|
||||
// 表单提交
|
||||
dataFormSubmitHandle: debounce(
|
||||
function () {
|
||||
this.$refs.dataForm.validate((valid) => {
|
||||
this.getUserInfo();
|
||||
this.dataForm.deptId = this.deptId;
|
||||
console.log("表单数据=======================》", this.dataForm);
|
||||
if (!this.UpdateState) {
|
||||
this.dataList.map((item) => {
|
||||
if (item.attrType != "场景名称" && item.attrType != "场景url") {
|
||||
if (item.attrType == "图片" && this.dataForm.note1) {
|
||||
const params = {
|
||||
attrType: item.attrType,
|
||||
attrValue: this.dataForm.note1,
|
||||
delFlag: 0,
|
||||
};
|
||||
this.dataForm.infoList.push(params);
|
||||
} else if (item.attrType != "图片" && item.attrValue) {
|
||||
const params = {
|
||||
attrType: item.attrType,
|
||||
attrValue: item.attrValue,
|
||||
delFlag: 0,
|
||||
};
|
||||
this.dataForm.infoList.push(params);
|
||||
}
|
||||
}
|
||||
});
|
||||
this.$http
|
||||
.post("/resource/insert?source= b", this.dataForm)
|
||||
.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: () => {
|
||||
this.visible = false;
|
||||
this.$emit("refreshDataList");
|
||||
},
|
||||
});
|
||||
})
|
||||
.catch(() => {});
|
||||
} else {
|
||||
this.$http
|
||||
.put("/resource/update", this.dataFormUpdate)
|
||||
.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: () => {
|
||||
this.visible = false;
|
||||
this.$emit("refreshDataList");
|
||||
},
|
||||
});
|
||||
})
|
||||
.catch(() => {});
|
||||
}
|
||||
});
|
||||
},
|
||||
1000,
|
||||
{ leading: true, trailing: false }
|
||||
),
|
||||
},
|
||||
watch: {
|
||||
visible: {
|
||||
immediate: true,
|
||||
deep: true,
|
||||
handler() {
|
||||
this.dataForm = {
|
||||
id: "",
|
||||
deptId: "",
|
||||
deptContacts: "",
|
||||
deptPhone: "",
|
||||
dataVolume: "",
|
||||
shareCondition: "",
|
||||
shareType: "",
|
||||
shareMode: "",
|
||||
delFlag: 0,
|
||||
description: "",
|
||||
downloads: 0,
|
||||
image: "",
|
||||
infoList: [],
|
||||
link: "",
|
||||
name: "",
|
||||
note1: "",
|
||||
note2: "",
|
||||
note3: "",
|
||||
note4: "",
|
||||
note5: "",
|
||||
score: "",
|
||||
type: "赋能案例",
|
||||
apiMethodType: "",
|
||||
apiUrl: "",
|
||||
visits: 0,
|
||||
};
|
||||
this.dataList = [
|
||||
{ attrType: "场景名称", attrValue: "", type: "name" },
|
||||
{
|
||||
attrType: "图片",
|
||||
attrValue: "",
|
||||
type: "photo",
|
||||
child: { node1: "" },
|
||||
},
|
||||
{
|
||||
attrType: "应用领域",
|
||||
attrValue: "",
|
||||
type: "select",
|
||||
children: [],
|
||||
},
|
||||
{ attrType: "场景url", attrValue: "", type: "link" },
|
||||
{ attrType: "案例背景", attrValue: "", type: "textarea" },
|
||||
{ attrType: "业务挑战", attrValue: "", type: "textarea" },
|
||||
{ attrType: "解决方案", attrValue: "", type: "textarea" },
|
||||
{ attrType: "案例成效", attrValue: "", type: "textarea" },
|
||||
];
|
||||
this.getInfo();
|
||||
this.getUserInfo();
|
||||
},
|
||||
},
|
||||
},
|
||||
mounted() {
|
||||
this.getInfo();
|
||||
this.getUserInfo();
|
||||
},
|
||||
beforeDestroy() {
|
||||
console.log("销毁~~~~~~~~~~~~~~~~~~~~");
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
::v-deep .el-form-item__content {
|
||||
width: 90%;
|
||||
}
|
||||
::v-deep .el-dialog__body {
|
||||
height: 580px;
|
||||
overflow: auto;
|
||||
}
|
||||
.icon-input ::v-deep .el-input__inner {
|
||||
cursor: pointer;
|
||||
}
|
||||
::v-deep .upload-demo {
|
||||
width: 800px;
|
||||
}
|
||||
::v-deep .el-form-item {
|
||||
margin-bottom: 30px;
|
||||
width: 100%;
|
||||
line-height: 32px;
|
||||
display: flex;
|
||||
}
|
||||
::v-deep .el-form-item__label {
|
||||
line-height: 32px;
|
||||
width: 120px;
|
||||
margin-right: 20px;
|
||||
text-align: center;
|
||||
}
|
||||
::v-deep textarea {
|
||||
width: 800px;
|
||||
}
|
||||
::v-deep .el-form-item__content {
|
||||
line-height: 32px;
|
||||
}
|
||||
::v-deep .el-input {
|
||||
width: 800px;
|
||||
}
|
||||
::v-deep .el-checkbox-button__inner {
|
||||
width: 130px;
|
||||
margin: 0 10px 5px;
|
||||
border-left: unset !important;
|
||||
border-radius: unset !important;
|
||||
border: 1px solid #dcdfe6 !important;
|
||||
}
|
||||
</style>
|
||||
|
||||
<style lang="scss">
|
||||
.canassigncase-add-or-update {
|
||||
position: relative;
|
||||
}
|
||||
.mod-sys__menu {
|
||||
.menu-list,
|
||||
.icon-list {
|
||||
.el-input__inner,
|
||||
.el-input__suffix {
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
&-icon-popover {
|
||||
width: 458px;
|
||||
overflow: hidden;
|
||||
}
|
||||
&-icon-inner {
|
||||
width: 478px;
|
||||
max-height: 258px;
|
||||
overflow-x: hidden;
|
||||
overflow-y: auto;
|
||||
}
|
||||
&-icon-list {
|
||||
width: 458px;
|
||||
padding: 0;
|
||||
margin: -8px 0 0 -8px;
|
||||
> .el-button {
|
||||
padding: 8px;
|
||||
margin: 8px 0 0 8px;
|
||||
> span {
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
font-size: 18px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.submit-father {
|
||||
position: absolute;
|
||||
}
|
||||
.previewImg {
|
||||
position: fixed;
|
||||
z-index: 9999;
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,327 @@
|
|||
<template>
|
||||
<el-card shadow="never" class="aui-card--fill">
|
||||
<div class="mod-ability__bsabilityai">
|
||||
<el-form :inline="true" :model="dataForm">
|
||||
<el-form-item>
|
||||
<el-input
|
||||
v-model="dataForm.name"
|
||||
placeholder="名称"
|
||||
clearable
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button @click="getDataList2(dataForm.name)">{{
|
||||
$t("query")
|
||||
}}</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="info" @click="exportHandle()">{{
|
||||
$t("export")
|
||||
}}</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button
|
||||
v-if="$hasPermission('ability:bsabilityai:save')"
|
||||
type="primary"
|
||||
@click="addOrUpdateHandleServe()"
|
||||
>挂接</el-button
|
||||
>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button
|
||||
v-if="$hasPermission('ability:bsabilityai:delete')"
|
||||
type="danger"
|
||||
@click="deleteHandle2()"
|
||||
>{{ $t("deleteBatch") }}</el-button
|
||||
>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button @click="reset">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-table
|
||||
v-loading="dataListLoading"
|
||||
:data="dataList"
|
||||
border
|
||||
@selection-change="dataListSelectionChangeHandle"
|
||||
style="width: 100%"
|
||||
:height="qp ? '810px' : '650px'"
|
||||
>
|
||||
<el-table-column
|
||||
type="selection"
|
||||
header-align="center"
|
||||
align="center"
|
||||
width="50"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
prop="name"
|
||||
label="场景名称"
|
||||
header-align="center"
|
||||
align="center"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
prop="apiUrl"
|
||||
label="场景url"
|
||||
header-align="center"
|
||||
align="center"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
v-for="(item, index) in dataList[0].infoList"
|
||||
:key="index"
|
||||
:label="item.attrType"
|
||||
header-align="center"
|
||||
align="center"
|
||||
show-overflow-tooltip="true"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
{{ findValue(scope.row.infoList, item.attrType) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
:label="$t('handle')"
|
||||
fixed="right"
|
||||
header-align="center"
|
||||
align="center"
|
||||
width="94"
|
||||
right="0"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-button
|
||||
v-if="$hasPermission('ability:bsabilityai:update')"
|
||||
type="text"
|
||||
size="small"
|
||||
@click="UpdateHandle(scope.row)"
|
||||
>{{ $t("update") }}</el-button
|
||||
>
|
||||
<el-button
|
||||
v-if="$hasPermission('ability:bsabilityai:delete')"
|
||||
type="text"
|
||||
size="small"
|
||||
@click="deleteHandle2(scope.row.id)"
|
||||
>{{ $t("delete") }}</el-button
|
||||
>
|
||||
<el-button type="text" size="small" @click="showDetail(scope.row)"
|
||||
>展示</el-button
|
||||
>
|
||||
<el-button type="text" size="small" @click="showDocument(scope.row)"
|
||||
>开发文档</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-pagination
|
||||
:current-page="page"
|
||||
:page-sizes="[10, 20, 50, 100]"
|
||||
:page-size="limit"
|
||||
:total="Number(total)"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="pageSizeChangeHandle"
|
||||
@current-change="pageCurrentChangeHandle"
|
||||
>
|
||||
</el-pagination>
|
||||
<!-- 弹窗, 新增 / 修改 -->
|
||||
<add-or-update
|
||||
:disabled="disabled"
|
||||
v-if="addOrUpdateVisible"
|
||||
ref="addOrUpdate"
|
||||
@refreshDataList="getDataList"
|
||||
></add-or-update>
|
||||
</div>
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import mixinViewModule from "@/mixins/view-module";
|
||||
import AddOrUpdate from "./canassigncase-add-or-update";
|
||||
import dictionaries from "@/utils/dictionaries";
|
||||
import qs from "qs";
|
||||
import { type } from "os";
|
||||
export default {
|
||||
mixins: [mixinViewModule],
|
||||
data() {
|
||||
return {
|
||||
mixinViewModuleOptions: {
|
||||
getDataListURL: "/resource/page",
|
||||
getDataListIsPage: true,
|
||||
exportURL: "/ability/bsabilityai/export",
|
||||
deleteURL: "/resource/delete",
|
||||
deleteIsBatch: true,
|
||||
},
|
||||
disabled: false,
|
||||
sceneArr: dictionaries.sceneArr,
|
||||
fieldArr: dictionaries.fieldArr,
|
||||
shareFormArr: dictionaries.shareFormArr,
|
||||
dataForm: {
|
||||
name: "",
|
||||
creator: "",
|
||||
selectType: 0,
|
||||
delFlag: 0,
|
||||
type: "赋能案例",
|
||||
},
|
||||
qp: false,
|
||||
};
|
||||
},
|
||||
watch: {},
|
||||
components: {
|
||||
AddOrUpdate,
|
||||
},
|
||||
created() {
|
||||
this.dataForm.name = "";
|
||||
this.dataForm.type = "赋能案例";
|
||||
},
|
||||
mounted() {
|
||||
window.addEventListener("resize", this.a);
|
||||
this.fullScreen();
|
||||
},
|
||||
methods: {
|
||||
reset() {
|
||||
this.$http
|
||||
.get(
|
||||
this.mixinViewModuleOptions.getDataListURL +
|
||||
"?" +
|
||||
qs.stringify({
|
||||
// order: this.order,
|
||||
// orderField: this.orderField,
|
||||
// type: '组件服务',
|
||||
page: 1,
|
||||
selectType: 0,
|
||||
limit: 10,
|
||||
delFlag: 0,
|
||||
creator: "",
|
||||
type: "赋能案例",
|
||||
name: "",
|
||||
})
|
||||
)
|
||||
.then(({ data: res }) => {
|
||||
this.dataForm.name = "";
|
||||
if (res.code !== 0) {
|
||||
this.dataList = [];
|
||||
this.total = 0;
|
||||
return this.$message.error(res.msg);
|
||||
}
|
||||
this.dataList = this.mixinViewModuleOptions.getDataListIsPage
|
||||
? res.data.list
|
||||
: res.data;
|
||||
this.total = this.mixinViewModuleOptions.getDataListIsPage
|
||||
? res.data.total
|
||||
: 0;
|
||||
if (this.mixinViewModuleOptions.requestCallback) {
|
||||
this.mixinViewModuleOptions.requestCallback(res.data);
|
||||
}
|
||||
this.dataListLoading = false;
|
||||
})
|
||||
.catch(() => {
|
||||
this.dataListLoading = false;
|
||||
});
|
||||
},
|
||||
showDetail(val) {
|
||||
this.addOrUpdateVisible = true;
|
||||
this.disabled = false;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.addOrUpdate.UpdateState = false;
|
||||
this.$refs.addOrUpdate.dataFormShowDetails = val;
|
||||
this.$refs.addOrUpdate.init();
|
||||
});
|
||||
this.disabled = true;
|
||||
},
|
||||
showDocument(val) {
|
||||
console.log(val);
|
||||
window.open(
|
||||
window.SITE_CONFIG.frontUrl + "?id=" + val.id + "&&type=" + val.type,
|
||||
"_blank"
|
||||
);
|
||||
},
|
||||
findValue(list, type) {
|
||||
const found = list.find((item) => item.attrType === type);
|
||||
if (found) {
|
||||
return found.attrValue;
|
||||
} else {
|
||||
return "暂无数据";
|
||||
}
|
||||
},
|
||||
getDataList2(names) {
|
||||
if (names != null) {
|
||||
this.$http
|
||||
.get(
|
||||
this.mixinViewModuleOptions.getDataListURL +
|
||||
"?" +
|
||||
qs.stringify({
|
||||
// order: this.order,
|
||||
// orderField: this.orderField,
|
||||
// type: '组件服务',
|
||||
pageNum: 1,
|
||||
pageSize: this.limit,
|
||||
type: "赋能案例",
|
||||
creator: "",
|
||||
selectType: 0,
|
||||
delFlag: 0,
|
||||
name: names,
|
||||
})
|
||||
)
|
||||
.then(({ data: res }) => {
|
||||
if (res.code !== 0) {
|
||||
this.dataList = [];
|
||||
this.total = 0;
|
||||
return this.$message.error(res.msg);
|
||||
}
|
||||
if (res.data.list.length !== 0) {
|
||||
this.dataList = res.data.list;
|
||||
this.total = this.mixinViewModuleOptions.getDataListIsPage
|
||||
? res.data.total
|
||||
: 0;
|
||||
if (this.mixinViewModuleOptions.requestCallback) {
|
||||
this.mixinViewModuleOptions.requestCallback(res.data);
|
||||
}
|
||||
this.dataListLoading = false;
|
||||
} else {
|
||||
this.$message.error("未查询到相关信息");
|
||||
this.reset();
|
||||
}
|
||||
})
|
||||
.catch(() => {
|
||||
this.dataListLoading = false;
|
||||
});
|
||||
} else {
|
||||
this.$message.error("查询不能输入为空");
|
||||
}
|
||||
},
|
||||
fullScreen() {
|
||||
if (window.outerHeight === screen.availHeight) {
|
||||
if (window.outerWidth === screen.availWidth) {
|
||||
console.log(
|
||||
"全屏1",
|
||||
window.outerHeight,
|
||||
screen.availHeight,
|
||||
window.outerWidth,
|
||||
screen.availWidth
|
||||
);
|
||||
this.qp = false;
|
||||
} else {
|
||||
console.log(
|
||||
"不是全屏2",
|
||||
window.outerHeight,
|
||||
screen.availHeight,
|
||||
window.outerWidth,
|
||||
screen.availWidth
|
||||
);
|
||||
this.qp = true;
|
||||
}
|
||||
} else {
|
||||
console.log(
|
||||
"不是全屏3",
|
||||
window.outerHeight,
|
||||
screen.availHeight,
|
||||
window.outerWidth,
|
||||
screen.availWidth
|
||||
);
|
||||
this.qp = true;
|
||||
}
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.el-tooltip__popper {
|
||||
max-width: 50%;
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,101 @@
|
|||
<template>
|
||||
<div>
|
||||
<el-upload
|
||||
ref="addUpload"
|
||||
class="upload-demo"
|
||||
:accept="accept"
|
||||
:action="fileUploadUrl"
|
||||
:on-success="onSuccess"
|
||||
:on-remove="onRemove"
|
||||
:on-exceed="onExceed"
|
||||
:limit="limit"
|
||||
:on-preview="onPreview"
|
||||
list-type="text"
|
||||
>
|
||||
<el-button size="small" type="primary">点击上传</el-button>
|
||||
<div slot="tip" class="el-upload__tip">
|
||||
只能上传{{ accept }}文件,最多上传{{ limit }}个附件!
|
||||
</div>
|
||||
</el-upload>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
name: "",
|
||||
components: {},
|
||||
props: {
|
||||
child: {
|
||||
type: Object,
|
||||
default: () => {
|
||||
return {};
|
||||
},
|
||||
},
|
||||
limit: {
|
||||
type: Number,
|
||||
default: 1,
|
||||
},
|
||||
accept: {
|
||||
type: String,
|
||||
default: ".jpg,.png",
|
||||
},
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
fileUploadUrl: window.SITE_CONFIG.apiURL + "/upload",
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
onSuccess(res, file) {
|
||||
console.log("limit", this.limit);
|
||||
console.log(res, file, this.child);
|
||||
if (res.code !== 0) {
|
||||
return this.$message.error("上传图片失败");
|
||||
}
|
||||
if (this.child.note1 == "") {
|
||||
this.child.note1 = res.data;
|
||||
} else {
|
||||
this.child.note1 += ";" + res.data;
|
||||
}
|
||||
// this.dataForm.infoList.map((item, index) => {
|
||||
// if (item.attrType == '组件图片') {
|
||||
// if (!this.dataForm.infoList[index].attrValue) {
|
||||
// this.dataForm.infoList[index].attrValue = res.data
|
||||
// } else {
|
||||
// this.dataForm.infoList[index].attrValue += ';' + res.data
|
||||
// }
|
||||
// console.log('上传图片', this.dataForm.infoList[index])
|
||||
// }
|
||||
// })
|
||||
},
|
||||
onRemove(file, fileList) {
|
||||
// this.$refs.addUpload.clearFiles()
|
||||
// 通过;分割字符串
|
||||
const arr = this.child.note1.split(";");
|
||||
fileList.forEach((item, index) => {
|
||||
if (item === file.response.data) {
|
||||
fileList.splice(index, 1);
|
||||
}
|
||||
});
|
||||
arr.forEach((item, index) => {
|
||||
if (item === file.response.data) {
|
||||
arr.splice(index, 1);
|
||||
}
|
||||
});
|
||||
if (arr.length == 0) {
|
||||
this.child.note1 = "";
|
||||
} else {
|
||||
this.child.note1 = arr.join(";");
|
||||
}
|
||||
console.log(this.child.note1);
|
||||
},
|
||||
onPreview(file) {
|
||||
console.log("点击预览===============>", file);
|
||||
window.open(file.response.data);
|
||||
},
|
||||
onExceed(files, fileList) {
|
||||
this.$message.warning("当前附件数量已达上限,请先删除部分附件!");
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped></style>
|
|
@ -0,0 +1,72 @@
|
|||
<template>
|
||||
<el-card shadow="never" class="aui-card--fill">
|
||||
<div class="mod-pay__order">
|
||||
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
|
||||
<el-form-item>
|
||||
<el-input v-model="dataForm.projectName" placeholder="项目名称" clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-input v-model="dataForm.resourceName" placeholder="应用名称" clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button @click="getDataList()">{{ $t('query') }}</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="reset">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-table v-loading="dataListLoading" :data="dataList" border style="width: 100%;">
|
||||
<el-table-column prop="projectName" label="项目名称" header-align="center" align="center"></el-table-column>
|
||||
<el-table-column prop="resourceName" label="应用名称" header-align="center" align="center"></el-table-column>
|
||||
<el-table-column prop="abilityName" label="贡献能力名称" header-align="center" align="center"></el-table-column>
|
||||
<el-table-column prop="abilityType" label="能力类型" header-align="center" align="center"></el-table-column>
|
||||
<el-table-column prop="applyTime" label="上架时间" header-align="center" align="center"></el-table-column>
|
||||
<el-table-column prop="browseNum" label="浏览次数" header-align="center" align="center"></el-table-column>
|
||||
<el-table-column prop="applyNum" label="申请次数" header-align="center" align="center"></el-table-column>
|
||||
|
||||
</el-table>
|
||||
<el-pagination
|
||||
:current-page="page"
|
||||
:page-sizes="[10, 20, 50, 100]"
|
||||
:page-size="limit"
|
||||
:total="total"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="pageSizeChangeHandle"
|
||||
@current-change="pageCurrentChangeHandle">
|
||||
</el-pagination>
|
||||
</div>
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import mixinViewModule from '@/mixins/view-module'
|
||||
import {addDynamicRoute} from "@/router";
|
||||
export default {
|
||||
mixins: [mixinViewModule],
|
||||
data () {
|
||||
return {
|
||||
mixinViewModuleOptions: {
|
||||
getDataListURL: '/projectcontrib/page',
|
||||
getDataListIsPage: true,
|
||||
deleteURL: '',
|
||||
deleteIsBatch: false
|
||||
},
|
||||
dataForm: {
|
||||
projectName: '',
|
||||
resourceName: '',
|
||||
}
|
||||
}
|
||||
},
|
||||
components: { },
|
||||
methods: {
|
||||
reset () {
|
||||
this.dataForm = {
|
||||
projectName: '',
|
||||
resourceName: '',
|
||||
};
|
||||
this.page = 1; // 当前页码
|
||||
this.query();
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
|
@ -0,0 +1,90 @@
|
|||
<template>
|
||||
<el-card shadow="never" class="aui-card--fill">
|
||||
<div class="mod-pay__order">
|
||||
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
|
||||
<el-form-item>
|
||||
<el-input v-model="dataForm.projectName" :placeholder="$t('projectList.projectName')" clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-input v-model="dataForm.applyDep" :placeholder="$t('projectList.projectUnit')" clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-input v-model="dataForm.respDep" :placeholder="$t('projectList.department')" clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-date-picker v-model="dataForm.applyTime" value-format="yyyy-MM-dd" type="date" :placeholder="$t('projectList.applydate')" clearable></el-date-picker>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button @click="getDataList()">{{ $t('query') }}</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="resetDataList()">{{ $t('reset') }}</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-table v-loading="dataListLoading" :data="dataList" border @selection-change="dataListSelectionChangeHandle" style="width: 100%;">
|
||||
<el-table-column prop="projectName" :label="$t('projectList.projectName')" header-align="center" align="center"></el-table-column>
|
||||
<el-table-column prop="applyDep" :label="$t('projectList.projectUnit')" header-align="center" align="center"></el-table-column>
|
||||
<el-table-column prop="regionName" :label="$t('projectList.district')" header-align="center" align="center"></el-table-column>
|
||||
<el-table-column prop="respDep" :label="$t('projectList.department')" header-align="center" align="center"></el-table-column>
|
||||
<el-table-column prop="businessUser" :label="$t('projectList.contacts')" header-align="center" align="center"></el-table-column>
|
||||
<el-table-column prop="businessPhone" :label="$t('projectList.contactstel')" header-align="center" align="center"></el-table-column>
|
||||
<el-table-column prop="techUser" :label="$t('projectList.technology')" header-align="center" align="center"></el-table-column>
|
||||
<el-table-column prop="techPhone" :label="$t('projectList.technologytel')" header-align="center" align="center"></el-table-column>
|
||||
<el-table-column prop="applyTime" :label="$t('projectList.applydate')" header-align="center" align="center"></el-table-column>
|
||||
</el-table>
|
||||
<el-pagination
|
||||
:current-page="page"
|
||||
:page-sizes="[10, 20, 50, 100]"
|
||||
:page-size="limit"
|
||||
:total="total"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="pageSizeChangeHandle"
|
||||
@current-change="pageCurrentChangeHandle">
|
||||
</el-pagination>
|
||||
<!-- 弹窗, 新增 / 修改 -->
|
||||
<!-- <add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update> -->
|
||||
</div>
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import mixinViewModule from '@/mixins/view-module'
|
||||
// import AddOrUpdate from './order-add-or-update'
|
||||
import {addDynamicRoute} from "@/router";
|
||||
export default {
|
||||
mixins: [mixinViewModule],
|
||||
data () {
|
||||
return {
|
||||
mixinViewModuleOptions: {
|
||||
getDataListURL: '/project/page',
|
||||
getDataListIsPage: true,
|
||||
deleteURL: '',
|
||||
deleteIsBatch: true
|
||||
},
|
||||
dataForm: {
|
||||
projectName: '',
|
||||
applyDep: '',
|
||||
respDep: '',
|
||||
applyTime:'',
|
||||
},
|
||||
}
|
||||
},
|
||||
components: {
|
||||
// AddOrUpdate
|
||||
},
|
||||
methods: {
|
||||
//重置
|
||||
resetDataList(){
|
||||
this.dataForm={
|
||||
projectName: '',
|
||||
applyDep: '',
|
||||
respDep: '',
|
||||
applyTime:'',
|
||||
};
|
||||
this.page=1; // 当前页码
|
||||
this.query();
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
|
@ -0,0 +1,119 @@
|
|||
<template>
|
||||
<el-card shadow="never" class="aui-card--fill">
|
||||
<div class="mod-bscatalogue__bscatalogue">
|
||||
<el-form
|
||||
:inline="true"
|
||||
:model="dataForm"
|
||||
@keyup.enter.native="getDataList()"
|
||||
>
|
||||
<el-form-item label="项目名称:">
|
||||
<el-input
|
||||
v-model="dataForm.projectName"
|
||||
placeholder="请输入项目名称"
|
||||
clearable
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="应用名称:">
|
||||
<el-input
|
||||
v-model="dataForm.resourceName"
|
||||
placeholder="请输入应用名称"
|
||||
clearable
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="getDataList()">查询</el-button>
|
||||
<el-button @click="reset">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-table row-key="id" :data="dataList" border style="width: 100%">
|
||||
<el-table-column
|
||||
prop="projectName"
|
||||
label="项目名称"
|
||||
header-align="center"
|
||||
align="center"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
prop="resourceName"
|
||||
label="应用名称"
|
||||
header-align="center"
|
||||
align="center"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="abilityName"
|
||||
label="使用能力名称"
|
||||
header-align="center"
|
||||
align="center"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
prop="abilityType"
|
||||
label="能力类型"
|
||||
header-align="center"
|
||||
align="center"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
prop="browseNum"
|
||||
label="浏览次数"
|
||||
header-align="center"
|
||||
align="center"
|
||||
></el-table-column>
|
||||
<!-- <el-table-column label="操作" header-align="center" align="center">
|
||||
</el-table-column> -->
|
||||
</el-table>
|
||||
<!-- 分页组件 -->
|
||||
<el-pagination
|
||||
:current-page="page"
|
||||
:page-sizes="[10, 20, 50, 100]"
|
||||
:page-size="limit"
|
||||
:total="total"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="pageSizeChangeHandle"
|
||||
@current-change="pageCurrentChangeHandle"
|
||||
>
|
||||
</el-pagination>
|
||||
</div>
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import mixinViewModule from "@/mixins/view-module";
|
||||
// import AddOrUpdate from './order-add-or-update'
|
||||
import { addDynamicRoute } from "@/router";
|
||||
export default {
|
||||
mixins: [mixinViewModule],
|
||||
data() {
|
||||
return {
|
||||
mixinViewModuleOptions: {
|
||||
getDataListURL: "/projectuse/page",
|
||||
getDataListIsPage: true,
|
||||
deleteURL: "",
|
||||
deleteIsBatch: false,
|
||||
},
|
||||
dataForm: {
|
||||
projectName: "",
|
||||
resourceName: "",
|
||||
},
|
||||
};
|
||||
},
|
||||
components: {
|
||||
// AddOrUpdate
|
||||
},
|
||||
mounted() {},
|
||||
methods: {
|
||||
// 重置
|
||||
reset() {
|
||||
this.dataForm = {
|
||||
projectName: "",
|
||||
resourceName: "",
|
||||
};
|
||||
this.page = 1; // 当前页码
|
||||
this.query();
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.monitoring-top {
|
||||
margin: 10px 0;
|
||||
}
|
||||
</style>
|
|
@ -7,10 +7,10 @@
|
|||
<el-form-item prop="deptName" :label="$t('user.deptName')">
|
||||
<ren-dept-tree v-model="dataForm.deptId" :placeholder="$t('dept.title')" :dept-name.sync="dataForm.deptName"></ren-dept-tree>
|
||||
</el-form-item>
|
||||
<el-form-item prop="password" :label="$t('user.password')" :class="{ 'is-required': !dataForm.id }" auto-complete="new-password">
|
||||
<el-input v-model="dataForm.password" type="password" :placeholder="$t('user.password')" auto-complete="new-password"></el-input>
|
||||
<el-form-item prop="password" :label="$t('user.password')" :class="{ 'is-required': !dataForm.id }" auto-complete="new-password" v-if="!dataForm.id">
|
||||
<el-input v-model="dataForm.password" type="password" :placeholder="$t('user.password')" auto-complete="new-password" @input="changeInput"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="confirmPassword" :label="$t('user.confirmPassword')" :class="{ 'is-required': !dataForm.id }">
|
||||
<el-form-item prop="confirmPassword" :label="$t('user.confirmPassword')" :class="{ 'is-required': !dataForm.id }" v-if="!dataForm.id">
|
||||
<el-input v-model="dataForm.confirmPassword" type="password" :placeholder="$t('user.confirmPassword')"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="realName" :label="$t('user.realName')">
|
||||
|
@ -51,6 +51,7 @@
|
|||
|
||||
<script>
|
||||
import debounce from 'lodash/debounce'
|
||||
import { Encrypt } from '@/utils/crypto'
|
||||
import { isEmail, isMobile } from '@/utils/validate'
|
||||
export default {
|
||||
data () {
|
||||
|
@ -79,9 +80,25 @@ export default {
|
|||
computed: {
|
||||
dataRule () {
|
||||
var validatePassword = (rule, value, callback) => {
|
||||
if (!this.dataForm.id && !/\S/.test(value)) {
|
||||
return callback(new Error(this.$t('validate.required')))
|
||||
if (!value) {
|
||||
this.showLevel = false
|
||||
return callback(new Error(this.$t('validate.pwdStrength')))
|
||||
}
|
||||
if (value.length < 8) {
|
||||
this.showLevel = false
|
||||
return callback(new Error(this.$t('validate.pwdStrength')))
|
||||
}
|
||||
const num = /^.*[0-9]+.*/
|
||||
const low = /^.*[a-z]+.*/
|
||||
const up = /^.*[A-Z]+.*/
|
||||
const spe = /^.*[^a-zA-Z0-9]+.*/
|
||||
console.log('包含数字', num.test(value), '包含字母', low.test(value), up.test(value), '包含特殊符号', spe.test(value))
|
||||
if (!(num.test(value) && (low.test(value) || up.test(value)) && spe.test(value))) {
|
||||
return callback(new Error(this.$t('validate.pwdStrength')))
|
||||
}
|
||||
// if (!this.dataForm.id && !/\S/.test(value)) {
|
||||
// return callback(new Error(this.$t('validate.required')))
|
||||
// }
|
||||
callback()
|
||||
}
|
||||
var validateConfirmPassword = (rule, value, callback) => {
|
||||
|
@ -131,6 +148,16 @@ export default {
|
|||
}
|
||||
},
|
||||
methods: {
|
||||
changeInput (value) {
|
||||
if (value !== value.replace(/ /g, '')) {
|
||||
this.$message({
|
||||
message: '密码中不允许存在空格!',
|
||||
type: 'warning'
|
||||
})
|
||||
this.dataForm.password = value.replace(/ /g, '')
|
||||
// console.log('密码发生变化=============>', value)
|
||||
}
|
||||
},
|
||||
init () {
|
||||
this.visible = true
|
||||
this.dataForm.deptId = ''
|
||||
|
@ -192,6 +219,10 @@ export default {
|
|||
if (!valid) {
|
||||
return false
|
||||
}
|
||||
this.dataForm.password = Encrypt(this.dataForm.password)
|
||||
if (this.dataForm.id) {
|
||||
delete this.dataForm.password
|
||||
}
|
||||
this.$http[!this.dataForm.id ? 'post' : 'put']('/sys/user', {
|
||||
...this.dataForm,
|
||||
roleIdList: [
|
||||
|
|
|
@ -1,32 +1,75 @@
|
|||
<template>
|
||||
<el-card shadow="never" class="aui-card--fill">
|
||||
<div class="mod-sys__user">
|
||||
<el-form :inline="true" :model="dataForm" @keyup.enter.native="getDataList()">
|
||||
<el-form
|
||||
:inline="true"
|
||||
:model="dataForm"
|
||||
@keyup.enter.native="getDataList()"
|
||||
>
|
||||
<el-form-item>
|
||||
<el-input v-model="dataForm.username" :placeholder="$t('user.username')" clearable></el-input>
|
||||
<el-input
|
||||
v-model="dataForm.username"
|
||||
:placeholder="$t('user.username')"
|
||||
clearable
|
||||
></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<ren-select v-model="dataForm.gender" dict-type="gender" :placeholder="$t('user.gender')"></ren-select>
|
||||
<ren-select
|
||||
v-model="dataForm.gender"
|
||||
dict-type="gender"
|
||||
:placeholder="$t('user.gender')"
|
||||
></ren-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-select v-model="dataForm.postId" :placeholder="$t('user.postIdList')" clearable>
|
||||
<el-option :label="data.postName" v-for="data in postList" :key="data.id" :value ="data.id">{{data.postName}}</el-option>
|
||||
<el-select
|
||||
v-model="dataForm.postId"
|
||||
:placeholder="$t('user.postIdList')"
|
||||
clearable
|
||||
>
|
||||
<el-option
|
||||
:label="data.postName"
|
||||
v-for="data in postList"
|
||||
:key="data.id"
|
||||
:value="data.id"
|
||||
>{{ data.postName }}</el-option
|
||||
>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<ren-dept-tree v-model="dataForm.deptId" :placeholder="$t('dept.title')" :query="true"></ren-dept-tree>
|
||||
<ren-dept-tree
|
||||
v-model="dataForm.deptId"
|
||||
:placeholder="$t('dept.title')"
|
||||
:query="true"
|
||||
></ren-dept-tree>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button @click="getDataList()">{{ $t('query') }}</el-button>
|
||||
<el-button type="primary" @click="getDataList()">{{
|
||||
$t("query")
|
||||
}}</el-button>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button v-if="$hasPermission('sys:user:save')" type="primary" @click="addOrUpdateHandle()">{{ $t('add') }}</el-button>
|
||||
<el-button
|
||||
v-if="$hasPermission('sys:user:save')"
|
||||
type="primary"
|
||||
@click="addOrUpdateHandle()"
|
||||
>{{ $t("add") }}</el-button
|
||||
>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button v-if="$hasPermission('sys:user:delete')" type="danger" @click="deleteHandle()">{{ $t('deleteBatch') }}</el-button>
|
||||
<el-button
|
||||
v-if="$hasPermission('sys:user:delete')"
|
||||
type="danger"
|
||||
@click="deleteHandle()"
|
||||
>{{ $t("deleteBatch") }}</el-button
|
||||
>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button v-if="$hasPermission('sys:user:export')" type="info" @click="exportHandle()">{{ $t('export') }}</el-button>
|
||||
<el-button
|
||||
v-if="$hasPermission('sys:user:export')"
|
||||
type="info"
|
||||
@click="exportHandle()"
|
||||
>{{ $t("export") }}</el-button
|
||||
>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button @click="reset()">重置</el-button>
|
||||
|
@ -38,28 +81,97 @@
|
|||
border
|
||||
@selection-change="dataListSelectionChangeHandle"
|
||||
@sort-change="dataListSortChangeHandle"
|
||||
style="width: 100%;">
|
||||
<el-table-column type="selection" header-align="center" align="center" width="50"></el-table-column>
|
||||
<el-table-column prop="username" :label="$t('user.username')" sortable="custom" header-align="center" align="center"></el-table-column>
|
||||
<el-table-column prop="deptName" :label="$t('user.deptName')" header-align="center" align="center"></el-table-column>
|
||||
<el-table-column prop="email" :label="$t('user.email')" header-align="center" align="center"></el-table-column>
|
||||
<el-table-column prop="mobile" :label="$t('user.mobile')" sortable="custom" header-align="center" align="center"></el-table-column>
|
||||
<el-table-column prop="gender" :label="$t('user.gender')" sortable="custom" header-align="center" align="center">
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-table-column
|
||||
type="selection"
|
||||
header-align="center"
|
||||
align="center"
|
||||
width="50"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
prop="username"
|
||||
:label="$t('user.username')"
|
||||
sortable="custom"
|
||||
header-align="center"
|
||||
align="center"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
prop="deptName"
|
||||
:label="$t('user.deptName')"
|
||||
header-align="center"
|
||||
align="center"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
prop="email"
|
||||
:label="$t('user.email')"
|
||||
header-align="center"
|
||||
align="center"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
prop="mobile"
|
||||
:label="$t('user.mobile')"
|
||||
sortable="custom"
|
||||
header-align="center"
|
||||
align="center"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
prop="gender"
|
||||
:label="$t('user.gender')"
|
||||
sortable="custom"
|
||||
header-align="center"
|
||||
align="center"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
{{ $getDictLabel("gender", scope.row.gender) }}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="status" :label="$t('user.status')" sortable="custom" header-align="center" align="center">
|
||||
<el-table-column
|
||||
prop="status"
|
||||
:label="$t('user.status')"
|
||||
sortable="custom"
|
||||
header-align="center"
|
||||
align="center"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-tag v-if="scope.row.status === 0" size="small" type="danger">{{ $t('user.status0') }}</el-tag>
|
||||
<el-tag v-else size="small" type="success">{{ $t('user.status1') }}</el-tag>
|
||||
<el-tag v-if="scope.row.status === 0" size="small" type="danger">{{
|
||||
$t("user.status0")
|
||||
}}</el-tag>
|
||||
<el-tag v-else size="small" type="success">{{
|
||||
$t("user.status1")
|
||||
}}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="createDate" :label="$t('user.createDate')" sortable="custom" header-align="center" align="center" width="180"></el-table-column>
|
||||
<el-table-column :label="$t('handle')" fixed="right" header-align="center" align="center" width="150">
|
||||
<el-table-column
|
||||
prop="createDate"
|
||||
:label="$t('user.createDate')"
|
||||
sortable="custom"
|
||||
header-align="center"
|
||||
align="center"
|
||||
width="180"
|
||||
></el-table-column>
|
||||
<el-table-column
|
||||
:label="$t('handle')"
|
||||
fixed="right"
|
||||
header-align="center"
|
||||
align="center"
|
||||
width="150"
|
||||
>
|
||||
<template slot-scope="scope">
|
||||
<el-button v-if="$hasPermission('sys:user:update')" type="text" size="small" @click="addOrUpdateHandle(scope.row.id)">{{ $t('update') }}</el-button>
|
||||
<el-button v-if="$hasPermission('sys:user:delete')" type="text" size="small" @click="deleteHandle(scope.row.id)">{{ $t('delete') }}</el-button>
|
||||
<el-button
|
||||
v-if="$hasPermission('sys:user:update')"
|
||||
type="text"
|
||||
size="small"
|
||||
@click="addOrUpdateHandle(scope.row.id)"
|
||||
>{{ $t("update") }}</el-button
|
||||
>
|
||||
<el-button
|
||||
v-if="$hasPermission('sys:user:delete')"
|
||||
type="text"
|
||||
size="small"
|
||||
@click="deleteHandle(scope.row.id)"
|
||||
>{{ $t("delete") }}</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
@ -70,84 +182,100 @@
|
|||
:total="total"
|
||||
layout="total, sizes, prev, pager, next, jumper"
|
||||
@size-change="pageSizeChangeHandle"
|
||||
@current-change="pageCurrentChangeHandle">
|
||||
@current-change="pageCurrentChangeHandle"
|
||||
>
|
||||
</el-pagination>
|
||||
<!-- 弹窗, 新增 / 修改 -->
|
||||
<add-or-update v-if="addOrUpdateVisible" ref="addOrUpdate" @refreshDataList="getDataList"></add-or-update>
|
||||
<add-or-update
|
||||
v-if="addOrUpdateVisible"
|
||||
ref="addOrUpdate"
|
||||
@refreshDataList="getDataList"
|
||||
></add-or-update>
|
||||
</div>
|
||||
</el-card>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import mixinViewModule from '@/mixins/view-module'
|
||||
import AddOrUpdate from './user-add-or-update'
|
||||
import qs from 'qs'
|
||||
import mixinViewModule from "@/mixins/view-module";
|
||||
import AddOrUpdate from "./user-add-or-update";
|
||||
import qs from "qs";
|
||||
export default {
|
||||
mixins: [mixinViewModule],
|
||||
data() {
|
||||
return {
|
||||
mixinViewModuleOptions: {
|
||||
getDataListURL: '/sys/user/page',
|
||||
getDataListURL: "/sys/user/page",
|
||||
getDataListIsPage: true,
|
||||
deleteURL: '/sys/user',
|
||||
deleteURL: "/sys/user",
|
||||
deleteIsBatch: true,
|
||||
exportURL: '/sys/user/export'
|
||||
exportURL: "/sys/user/export",
|
||||
},
|
||||
postList: [],
|
||||
dataForm: {
|
||||
username: '',
|
||||
deptId: '',
|
||||
postId: '',
|
||||
gender: ''
|
||||
}
|
||||
}
|
||||
username: "",
|
||||
deptId: "",
|
||||
postId: "",
|
||||
gender: "",
|
||||
},
|
||||
};
|
||||
},
|
||||
components: {
|
||||
AddOrUpdate
|
||||
AddOrUpdate,
|
||||
},
|
||||
created() {
|
||||
this.getPostList()
|
||||
this.getPostList();
|
||||
},
|
||||
methods: {
|
||||
reset() {
|
||||
this.$http.get(
|
||||
this.mixinViewModuleOptions.getDataListURL + '?' + qs.stringify({
|
||||
this.$http
|
||||
.get(
|
||||
this.mixinViewModuleOptions.getDataListURL +
|
||||
"?" +
|
||||
qs.stringify({
|
||||
page: 1,
|
||||
limit: 10,
|
||||
username: '',
|
||||
deptId: '',
|
||||
postId: '',
|
||||
gender: ''
|
||||
username: "",
|
||||
deptId: "",
|
||||
postId: "",
|
||||
gender: "",
|
||||
})
|
||||
|
||||
).then(({ data: res }) => {
|
||||
this.dataForm.username = ''
|
||||
this.dataForm.deptId = ''
|
||||
this.dataForm.postId = ''
|
||||
this.dataForm.gender = ''
|
||||
)
|
||||
.then(({ data: res }) => {
|
||||
this.dataForm.username = "";
|
||||
this.dataForm.deptId = "";
|
||||
this.dataForm.postId = "";
|
||||
this.dataForm.gender = "";
|
||||
if (res.code !== 0) {
|
||||
this.dataList = []
|
||||
this.total = 0
|
||||
return this.$message.error(res.msg)
|
||||
this.dataList = [];
|
||||
this.total = 0;
|
||||
return this.$message.error(res.msg);
|
||||
}
|
||||
this.dataList = this.mixinViewModuleOptions.getDataListIsPage ? res.data.list : res.data
|
||||
this.total = this.mixinViewModuleOptions.getDataListIsPage ? res.data.total : 0
|
||||
this.dataList = this.mixinViewModuleOptions.getDataListIsPage
|
||||
? res.data.list
|
||||
: res.data;
|
||||
this.total = this.mixinViewModuleOptions.getDataListIsPage
|
||||
? res.data.total
|
||||
: 0;
|
||||
if (this.mixinViewModuleOptions.requestCallback) {
|
||||
this.mixinViewModuleOptions.requestCallback(res.data)
|
||||
this.mixinViewModuleOptions.requestCallback(res.data);
|
||||
}
|
||||
this.dataListLoading = false
|
||||
}).catch(() => {
|
||||
this.dataListLoading = false
|
||||
this.dataListLoading = false;
|
||||
})
|
||||
.catch(() => {
|
||||
this.dataListLoading = false;
|
||||
});
|
||||
},
|
||||
getPostList() {
|
||||
this.$http.get('/sys/post/list').then(({ data: res }) => {
|
||||
this.$http
|
||||
.get("/sys/post/list")
|
||||
.then(({ data: res }) => {
|
||||
if (res.code !== 0) {
|
||||
return this.$message.error(res.msg)
|
||||
}
|
||||
this.postList = res.data
|
||||
}).catch(() => {})
|
||||
}
|
||||
}
|
||||
return this.$message.error(res.msg);
|
||||
}
|
||||
this.postList = res.data;
|
||||
})
|
||||
.catch(() => {});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
|
|
@ -59,6 +59,7 @@
|
|||
|
||||
<script>
|
||||
import Cookies from 'js-cookie'
|
||||
import { Encrypt } from '@/utils/crypto'
|
||||
import debounce from 'lodash/debounce'
|
||||
import { messages } from '@/i18n'
|
||||
import { getUUID } from '@/utils'
|
||||
|
@ -105,7 +106,11 @@ export default {
|
|||
if (!valid) {
|
||||
return false
|
||||
}
|
||||
this.$http.get('/login', { params: this.dataForm }).then(({ data: res }) => {
|
||||
if (this.dataForm.password !== this.dataForm.password.trim()) {
|
||||
this.$message.error('登陆失败,用户名或密码错误!')
|
||||
return
|
||||
}
|
||||
this.$http.get('/login', { params: { username: this.dataForm.username, password: Encrypt(this.dataForm.password) } }).then(({ data: res }) => {
|
||||
if (res.code !== 0) {
|
||||
this.getCaptcha()
|
||||
return this.$message.error(res.msg)
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
"image-webpack-loader": "^8.1.0",
|
||||
"imagemin-gifsicle": "^7.0.0",
|
||||
"imagemin-mozjpeg": "^10.0.0",
|
||||
"jquery": "^3.6.0",
|
||||
"js-cookie": "^3.0.0-rc.3",
|
||||
"md-editor-v3": "^1.11.10",
|
||||
"mitt": "^3.0.0",
|
||||
|
@ -55,6 +56,7 @@
|
|||
"body-parser": "^1.19.0",
|
||||
"chalk": "^4.1.1",
|
||||
"chokidar": "^3.5.2",
|
||||
"crypto-js": "^4.1.1",
|
||||
"eslint": "^7.30.0",
|
||||
"eslint-plugin-prettier": "^3.4.0",
|
||||
"eslint-plugin-vue": "^7.13.0",
|
||||
|
@ -65,11 +67,11 @@
|
|||
"stylelint": "^13.13.1",
|
||||
"stylelint-config-prettier": "^8.0.2",
|
||||
"stylelint-config-recess-order": "^2.4.0",
|
||||
"stylus": "^0.54.5",
|
||||
"stylus-loader": "^3.0.2",
|
||||
"svg-sprite-loader": "^6.0.9",
|
||||
"vab-config": "0.0.8",
|
||||
"webpackbar": "^5.0.0-3",
|
||||
"stylus": "^0.54.5",
|
||||
"stylus-loader": "^3.0.2"
|
||||
"webpackbar": "^5.0.0-3"
|
||||
},
|
||||
"gitHooks": {
|
||||
"pre-commit": "lint-staged"
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
<!--
|
||||
* @Author: hisense.wuhongjian
|
||||
* @Date: 2022-03-29 16:45:25
|
||||
* @LastEditors: hisense.wuhongjian
|
||||
* @LastEditTime: 2022-06-15 09:28:40
|
||||
* @LastEditors: hisense.liangjunhua
|
||||
* @LastEditTime: 2022-06-24 19:49:15
|
||||
* @Description: 告诉大家这是什么
|
||||
-->
|
||||
<!DOCTYPE html>
|
||||
|
@ -32,22 +32,27 @@
|
|||
// window.SITE_CONFIG['previewUrl'] = 'http://15.72.183.90:7008/';
|
||||
// window.SITE_CONFIG['frontUrl'] = 'http://15.72.183.90:7008/document/#/devModelFile/';
|
||||
// window.SITE_CONFIG['apiURL'] = 'http://15.72.183.90:8000/renren-admin';
|
||||
// 包头
|
||||
// window.SITE_CONFIG['backUrl'] = 'http://10.110.205.1:8001';
|
||||
// window.SITE_CONFIG['previewUrl'] = 'http://10.110.205.1:8002/';
|
||||
// window.SITE_CONFIG['frontUrl'] = 'http://10.110.205.1:8002/document/#/devModelFile/';
|
||||
// window.SITE_CONFIG['apiURL'] = 'http://10.110.205.1:8000/renren-admin';
|
||||
|
||||
// window.SITE_CONFIG['backUrl'] = 'http://localhost:8001';
|
||||
// window.SITE_CONFIG['previewUrl'] = 'http://15.72.183.90:7008/';
|
||||
// window.SITE_CONFIG['frontUrl'] = 'http://15.72.183.90:7008/document/#/devModelFile/';
|
||||
// window.SITE_CONFIG['apiURL'] = 'http://15.72.183.90:8000/renren-admin';
|
||||
|
||||
|
||||
// window.SITE_CONFIG['backUrl'] = 'http://15.2.21.238:9797';
|
||||
// window.SITE_CONFIG['previewUrl'] = 'http://localhost:8080/';
|
||||
// window.SITE_CONFIG['frontUrl'] = 'http://15.2.21.238:9796/document/#/devModelFile/';
|
||||
// window.SITE_CONFIG['apiURL'] = 'http://15.2.21.238:8888/renren-admin';
|
||||
// 西海岸版本
|
||||
// window.SITE_CONFIG['backUrl'] = 'http://10.134.135.9:9797';
|
||||
// window.SITE_CONFIG['previewUrl'] = 'http://10.134.135.9:9796/';
|
||||
// window.SITE_CONFIG['frontUrl'] = 'http://10.134.135.9:9796/document/#/devModelFile/';
|
||||
// window.SITE_CONFIG['apiURL'] = 'http://10.134.135.9:8888/renren-admin';
|
||||
// 开发
|
||||
window.SITE_CONFIG['backUrl'] = 'http://15.2.21.238:9797';
|
||||
window.SITE_CONFIG['previewUrl'] = 'http://15.2.21.238:9796';
|
||||
window.SITE_CONFIG['frontUrl'] = 'http://15.2.21.238:9796/document/#/devModelFile/';
|
||||
window.SITE_CONFIG['apiURL'] = 'http://15.2.21.238:8888/renren-admin';
|
||||
// 穿透版本
|
||||
window.SITE_CONFIG['backUrl'] = 'http://124.222.94.39:9797';
|
||||
window.SITE_CONFIG['previewUrl'] = 'http://124.222.94.39:9796/';
|
||||
window.SITE_CONFIG['frontUrl'] = 'http://124.222.94.39:9796/document/#/devModelFile/';
|
||||
window.SITE_CONFIG['apiURL'] = 'http://124.222.94.39:8888/renren-admin';
|
||||
// window.SITE_CONFIG['backUrl'] = 'http://124.222.94.39:9797';
|
||||
// window.SITE_CONFIG['previewUrl'] = 'http://124.222.94.39:9796/';
|
||||
// window.SITE_CONFIG['frontUrl'] = 'http://124.222.94.39:9796/document/#/devModelFile/';
|
||||
// window.SITE_CONFIG['apiURL'] = 'http://124.222.94.39:8888/renren-admin';
|
||||
</script>
|
||||
|
||||
<link href="./leaflet/libs/leaflet/1.3.1/leaflet.css" rel="stylesheet">
|
||||
|
@ -60,6 +65,8 @@
|
|||
|
||||
<script type="text/javascript" src="./static/config/basicConfig.js"></script>
|
||||
<script type="text/javascript" src="./static/config/mapConfig.js"></script>
|
||||
<script type="text/javascript" src="./static/config/footerData.js"></script>
|
||||
<script type="text/javascript" src="./static/config/location.js"></script>
|
||||
<!-- ==========地图相关配置========== -->
|
||||
<script type="text/javascript" src="./leaflet/libs/leaflet/1.3.1/leaflet.js"></script>
|
||||
<script type="text/javascript" src="./static/js/jquery-3.6.0.min.js"></script>
|
||||
|
|
|
@ -0,0 +1,48 @@
|
|||
/*
|
||||
* @Author: zhangfeihu
|
||||
* @Date: 2022-06-16 16:37:31
|
||||
* @LastEditors: hisense.wuhongjian
|
||||
* @LastEditTime: 2022-06-20 16:18:04
|
||||
* @FilePath: \qiantai\front\public\static\config\footerData.js
|
||||
* @Description: 底部菜单数据配置配置
|
||||
*/
|
||||
// const footerDataList = {
|
||||
// 市局
|
||||
// company: {
|
||||
// left: '青岛市大数据发展管理局建设',
|
||||
// right: '海信网络科技股份有限公司'
|
||||
// },
|
||||
// address: [
|
||||
// {
|
||||
// name: '鲁IC备00000000号',
|
||||
// value: '政府标识码3702000106',
|
||||
// },
|
||||
// {
|
||||
// name: '版权所有:青岛市大数据发展管理局',
|
||||
// value: '地址:山东省青岛市香港中路17号市级机关办公楼',
|
||||
// },
|
||||
// {
|
||||
// name: '电话:0532-8561234',
|
||||
// value: '传真:0532-2145122',
|
||||
// },
|
||||
// ]
|
||||
// 西海岸
|
||||
// company: {
|
||||
// left: '青岛西海岸新区大数据发展促进局建设',
|
||||
// right: 'v0.81'
|
||||
// },
|
||||
// address: [
|
||||
// {
|
||||
// name: '鲁IC备00000000号',
|
||||
// value: '政府标识码3702000106',
|
||||
// },
|
||||
// {
|
||||
// name: '版权所有:青岛西海岸新区大数据发展促进局',
|
||||
// value: '地址:青岛市西海岸新区长江中路369号',
|
||||
// },
|
||||
// {
|
||||
// name: '电话:0532-86986596',
|
||||
// value: '传真:0532-86986596',
|
||||
// },
|
||||
// ]
|
||||
// }
|
|
@ -0,0 +1,178 @@
|
|||
/*
|
||||
* @Author: hisense.wuhongjian
|
||||
* @Date: 2020-07-07 16:03:23
|
||||
* @LastEditors: hisense.wuhongjian
|
||||
* @LastEditTime: 2022-06-24 18:16:44
|
||||
* @Description: 数据资源参数配置
|
||||
*/
|
||||
// const newLocation = 'qingdao'
|
||||
// const newLocation = 'baotou'
|
||||
const newLocation = 'qingdao'
|
||||
|
||||
// 数据资源数据
|
||||
const whoShow = {}
|
||||
const launchedDataNumObject = {}
|
||||
// 导航数据
|
||||
const navListManagement = {}
|
||||
// 区市站点数据
|
||||
const mapTestNum = {}
|
||||
// 底部数据
|
||||
const footerDataList = {}
|
||||
// qingdao
|
||||
if (newLocation === 'qingdao') {
|
||||
whoShow.itShowQingDao = true
|
||||
navListManagement.navList = [
|
||||
{ name: '共享门户', key: 'home' },
|
||||
{ name: '能力集市', key: 'DetailsPageconetent' },
|
||||
{ name: '能力云图', key: 'capabilityCloud' },
|
||||
{ name: '能力统计', key: 'abilityStatistics' },
|
||||
{ name: '开发指南', key: 'developmentGuide' },
|
||||
{ name: '需求中心', key: 'demandCenter' },
|
||||
// { name: '个人中心', key: 'personalCenter' },
|
||||
{ name: '区市站点', key: 'mapTest' },
|
||||
// { name: '后台管理', key: 'houtaiguanli' },
|
||||
{ name: '赋能案例', key: 'assignCase' },
|
||||
]
|
||||
footerDataList.footerList = {
|
||||
company: {
|
||||
left: '青岛市大数据发展管理局建设',
|
||||
right: '海信网络科技股份有限公司',
|
||||
},
|
||||
address: [
|
||||
{
|
||||
name: '鲁IC备00000000号',
|
||||
value: '政府标识码3702000106',
|
||||
},
|
||||
{
|
||||
name: '版权所有:青岛市大数据发展管理局',
|
||||
value: '地址:山东省青岛市香港中路17号市级机关办公楼',
|
||||
},
|
||||
{
|
||||
name: '电话:0532-8561234',
|
||||
value: '传真:0532-2145122',
|
||||
},
|
||||
],
|
||||
}
|
||||
mapTestNum.lsNum = [
|
||||
{
|
||||
name: '基础设施',
|
||||
key: 'lsjcss',
|
||||
num: '20135路',
|
||||
},
|
||||
{
|
||||
name: '数据资源',
|
||||
key: 'lsjcss',
|
||||
num: '857条',
|
||||
},
|
||||
{
|
||||
name: '应用资源',
|
||||
key: 'lsjcss',
|
||||
num: '28个',
|
||||
},
|
||||
]
|
||||
mapTestNum.xhaNum = [
|
||||
{
|
||||
name: '基础设施',
|
||||
key: 'xhajcss',
|
||||
num: '35282路',
|
||||
},
|
||||
{
|
||||
name: '数据资源',
|
||||
key: 'xhajcss',
|
||||
num: '11条',
|
||||
},
|
||||
{
|
||||
name: '应用资源',
|
||||
key: 'xhajcss',
|
||||
num: '23个',
|
||||
},
|
||||
{
|
||||
name: '组件服务',
|
||||
key: 'xhazjfw',
|
||||
num: '8个',
|
||||
},
|
||||
]
|
||||
}
|
||||
// baotou
|
||||
else if (newLocation === 'baotou') {
|
||||
whoShow.itShowBaoTou = true
|
||||
launchedDataNumObject.launchedDataNum = [
|
||||
{
|
||||
num: 10372,
|
||||
},
|
||||
{
|
||||
num: 1080,
|
||||
},
|
||||
{
|
||||
num: 976,
|
||||
},
|
||||
]
|
||||
navListManagement.navList = [
|
||||
{ name: '共享门户', key: 'home' },
|
||||
{ name: '能力集市', key: 'DetailsPageconetent' },
|
||||
{ name: '能力云图', key: 'capabilityCloud' },
|
||||
{ name: '能力统计', key: 'abilityStatistics' },
|
||||
{ name: '开发指南', key: 'developmentGuide' },
|
||||
{ name: '需求中心', key: 'demandCenter' },
|
||||
// { name: '个人中心', key: 'personalCenter' },
|
||||
// { name: '区市站点', key: 'mapTest' },
|
||||
// { name: '后台管理', key: 'houtaiguanli' },
|
||||
{ name: '赋能案例', key: 'assignCase' },
|
||||
]
|
||||
footerDataList.footerList = {
|
||||
company: {
|
||||
left: '包头市工业和信息化局大数据中心建设',
|
||||
right: '海信网络科技股份有限公司',
|
||||
},
|
||||
address: [
|
||||
{
|
||||
name: '蒙ICP备05003330-1号',
|
||||
value: '政府标识码1502000040',
|
||||
},
|
||||
{
|
||||
name: '版权所有:包头市工业和信息化局大数据中心',
|
||||
value: '地址:内蒙古自治区包头市九原区开元大街1号',
|
||||
},
|
||||
{
|
||||
name: '电话:0472-5618235',
|
||||
value: '传真:0472-5618235',
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
||||
// xihaian
|
||||
else if (newLocation === 'xihaian') {
|
||||
whoShow.itShowXiHaiAn = true
|
||||
navListManagement.navList = [
|
||||
{ name: '共享门户', key: 'home' },
|
||||
{ name: '能力集市', key: 'DetailsPageconetent' },
|
||||
{ name: '能力云图', key: 'capabilityCloud' },
|
||||
{ name: '能力统计', key: 'abilityStatistics' },
|
||||
{ name: '开发指南', key: 'developmentGuide' },
|
||||
{ name: '需求中心', key: 'demandCenter' },
|
||||
// { name: '个人中心', key: 'personalCenter' },
|
||||
// { name: '区市站点', key: 'mapTest' },
|
||||
// { name: '后台管理', key: 'houtaiguanli' },
|
||||
{ name: '赋能案例', key: 'assignCase' },
|
||||
]
|
||||
footerDataList.footerList = {
|
||||
company: {
|
||||
left: '青岛西海岸新区大数据发展促进局建设',
|
||||
right: 'v0.81',
|
||||
},
|
||||
address: [
|
||||
{
|
||||
name: '鲁IC备00000000号',
|
||||
value: '政府标识码3702000106',
|
||||
},
|
||||
{
|
||||
name: '版权所有:青岛西海岸新区大数据发展促进局',
|
||||
value: '地址:青岛市西海岸新区长江中路369号',
|
||||
},
|
||||
{
|
||||
name: '电话:0532-86986596',
|
||||
value: '传真:0532-86986596',
|
||||
},
|
||||
],
|
||||
}
|
||||
}
|
|
@ -0,0 +1,32 @@
|
|||
{
|
||||
"type": "FeatureCollection",
|
||||
"features": [{
|
||||
"type": "Feature",
|
||||
"properties": {
|
||||
"adcode": 110000,
|
||||
"name": "中国",
|
||||
"center": [116.405285, 39.904989],
|
||||
"centroid": [116.41995, 40.18994],
|
||||
"childrenNum": 16,
|
||||
"level": "province",
|
||||
"parent": {
|
||||
"adcode": 100000
|
||||
},
|
||||
"subFeatureIndex": 0,
|
||||
"acroutes": [100000]
|
||||
},
|
||||
"geometry": {
|
||||
"type": "MultiPolygon",
|
||||
"coordinates": [
|
||||
[
|
||||
[
|
||||
[135.08,53.56],
|
||||
[135.08,3.86],
|
||||
[73.51,3.86],
|
||||
[73.51,53.56]
|
||||
]
|
||||
]
|
||||
]
|
||||
}
|
||||
}]
|
||||
}
|
After Width: | Height: | Size: 1.6 MiB |
|
@ -1,8 +1,8 @@
|
|||
<!--
|
||||
* @Author: hisense.wuhongjian
|
||||
* @Date: 2022-05-06 11:12:00
|
||||
* @LastEditors: hisense.liangjunhua
|
||||
* @LastEditTime: 2022-06-13 17:45:49
|
||||
* @LastEditors: hisense.wuhongjian
|
||||
* @LastEditTime: 2022-06-21 16:59:46
|
||||
* @Description: 告诉大家这是什么
|
||||
-->
|
||||
<template>
|
||||
|
@ -26,4 +26,11 @@
|
|||
</script>
|
||||
<style lang="less">
|
||||
@import '~@/vab/styles/vab.less';
|
||||
#vue-admin-beautiful{
|
||||
max-width: 1920px;
|
||||
max-height: 1080px;
|
||||
margin: auto;
|
||||
height: 100%;
|
||||
position: relative;
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -0,0 +1,82 @@
|
|||
/*
|
||||
* @Author: hisense.liangjunhua
|
||||
* @Date: 2022-06-20 09:20:28
|
||||
* @LastEditors: hisense.liangjunhua
|
||||
* @LastEditTime: 2022-06-22 16:06:08
|
||||
* @Description: 告诉大家这是什么
|
||||
*/
|
||||
import request from '@/utils/request'
|
||||
//能力云图-知识库
|
||||
export function KnowledgeBaseStatic() {
|
||||
return request({
|
||||
url: '/census/center/v2/knowledgeInfo',
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
//能力云图-概览总数
|
||||
export function wholeAmount() {
|
||||
return request({
|
||||
url: '/census/center/v2/whole_amount',
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
//能力云图-概览ehcarts
|
||||
export function trafficStatistics(data) {
|
||||
return request({
|
||||
url: '/census/center/v2/trafficStatistics',
|
||||
method: 'post',
|
||||
data,
|
||||
})
|
||||
}
|
||||
//能力云图-应用资源总数
|
||||
export function applicationNum() {
|
||||
return request({
|
||||
url: '/census/center/v2/applicationNum',
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
//能力云图-区市应用资源排名
|
||||
export function districtResourceRank() {
|
||||
return request({
|
||||
url: '/census/center/v2/districtResourceRank',
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
//能力云图-委办局应用资源分布
|
||||
export function cityResourceRank() {
|
||||
return request({
|
||||
url: '/census/center/v2/cityResourceRank',
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
//能力云图-组件服务
|
||||
export function assemblerBaseStatic() {
|
||||
return request({
|
||||
url: '/census/center/v2/assemblerInfo',
|
||||
method: 'get',
|
||||
})
|
||||
}
|
||||
//能力云图-组件服务排行
|
||||
export function componentServiceRank(params) {
|
||||
return request({
|
||||
url: '/census/center/v2/componentServiceRank',
|
||||
method: 'get',
|
||||
params,
|
||||
})
|
||||
}
|
||||
//能力云图-基础设施
|
||||
export function infrastructureInfo(params) {
|
||||
return request({
|
||||
url: '/census/center/v2/infrastructureInfo',
|
||||
method: 'get',
|
||||
params,
|
||||
})
|
||||
}
|
||||
//能力云图-数据资源
|
||||
export function dataResourceInfo(params) {
|
||||
return request({
|
||||
url: '/census/center/v2/dataResourceInfo',
|
||||
method: 'get',
|
||||
params,
|
||||
})
|
||||
}
|
|
@ -1,3 +1,10 @@
|
|||
/*
|
||||
* @Author: hisense.wuhongjian
|
||||
* @Date: 2022-06-14 09:43:30
|
||||
* @LastEditors: hisense.wuhongjian
|
||||
* @LastEditTime: 2022-06-23 20:04:39
|
||||
* @Description: 告诉大家这是什么
|
||||
*/
|
||||
import request from '@/utils/request'
|
||||
|
||||
export function demandComment(data) {
|
||||
|
@ -7,6 +14,13 @@ export function demandComment(data) {
|
|||
data,
|
||||
})
|
||||
}
|
||||
export function demandCommentApply(data) {
|
||||
return request({
|
||||
url: '/comment/center/apply',
|
||||
method: 'post',
|
||||
data,
|
||||
})
|
||||
}
|
||||
|
||||
export function demandCommentPage(params) {
|
||||
return request({
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
/*
|
||||
* @Author: hisense.wuhongjian
|
||||
* @Date: 2022-04-20 17:16:35
|
||||
* @LastEditors: hisense.wuhongjian
|
||||
* @LastEditTime: 2022-05-26 22:40:46
|
||||
* @LastEditors: hisense.liangjunhua
|
||||
* @LastEditTime: 2022-06-22 14:57:16
|
||||
* @Description: 告诉大家这是什么
|
||||
*/
|
||||
import request from '@/utils/request'
|
||||
|
@ -46,3 +46,50 @@ export function correct(params) {
|
|||
export function paddleocr(params) {
|
||||
return axios.post('http://15.72.183.90:7008/paddleocr', params, config2)
|
||||
}
|
||||
|
||||
// 能力云图-数据资源
|
||||
export function count() {
|
||||
return axios.post(
|
||||
'http://10.134.135.24:30058/share-portal/platform/index/abilityMarket/count',
|
||||
config2
|
||||
)
|
||||
}
|
||||
export function getVideoList(params) {
|
||||
return axios.get(
|
||||
'http://10.134.135.9:8001/hx-weather-warning/camera/getCameraListByName?name=' +
|
||||
params.name +
|
||||
'&pageNo=' +
|
||||
params.pageNo +
|
||||
'&pageSize=' +
|
||||
params.pageSize,
|
||||
config2
|
||||
)
|
||||
}
|
||||
// 能力云图-数据资源-总数据数
|
||||
export function getRecord(params) {
|
||||
return axios.get(
|
||||
'http://10.134.135.24:30090/api/share-portal/platform/catalogue/query?serviceName=' +
|
||||
params.serviceName +
|
||||
'&orderField=' +
|
||||
params.orderField +
|
||||
'&orderType=' +
|
||||
params.orderType +
|
||||
'&pageNum=' +
|
||||
params.pageNum +
|
||||
'&pageSize=' +
|
||||
params.pageSize +
|
||||
'&serviceType=' +
|
||||
params.serviceType,
|
||||
config2
|
||||
)
|
||||
}
|
||||
|
||||
export function getHls(params) {
|
||||
return axios.get(
|
||||
'http://10.134.135.9:8001/hx-weather-warning/camera/getCameraLiveStreamByCode?cameraCode=' +
|
||||
params.cameraId +
|
||||
'&protocol=' +
|
||||
params.protocol,
|
||||
config2
|
||||
)
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* @Author: hisense.wuhongjian
|
||||
* @Date: 2022-04-01 19:19:40
|
||||
* @LastEditors: hisense.wuhongjian
|
||||
* @LastEditTime: 2022-05-24 19:58:09
|
||||
* @LastEditTime: 2022-06-22 18:59:03
|
||||
* @Description: 告诉大家这是什么
|
||||
*/
|
||||
import request from '@/utils/request'
|
||||
|
@ -62,7 +62,14 @@ export function pageWithAttrs(data) {
|
|||
data,
|
||||
})
|
||||
}
|
||||
|
||||
// 获取hls视频流
|
||||
export function getHls(params) {
|
||||
return request({
|
||||
url: '/resource/hls/getHls',
|
||||
method: 'get',
|
||||
params,
|
||||
})
|
||||
}
|
||||
// 加入申购车
|
||||
export function sgcInsert(data) {
|
||||
return request({
|
||||
|
@ -282,3 +289,11 @@ export function mynoticeRead(params) {
|
|||
params,
|
||||
})
|
||||
}
|
||||
// 消息提醒已读
|
||||
export function getDataResource(data) {
|
||||
return request({
|
||||
url: '/resource/getDataResource',
|
||||
method: 'post',
|
||||
data,
|
||||
})
|
||||
}
|
||||
|
|
|
@ -78,6 +78,14 @@ export function scInsert(data) {
|
|||
})
|
||||
}
|
||||
|
||||
// 查询浏览列表
|
||||
export function getBsList(params) {
|
||||
return request({
|
||||
url: '/resourceBrowse/page',
|
||||
method: 'get',
|
||||
params,
|
||||
})
|
||||
}
|
||||
// 查询收藏列表
|
||||
export function getScList(params) {
|
||||
return request({
|
||||
|
@ -86,7 +94,6 @@ export function getScList(params) {
|
|||
params,
|
||||
})
|
||||
}
|
||||
|
||||
// 批量取消收藏
|
||||
export function scDel(data) {
|
||||
return request({
|
||||
|
@ -95,6 +102,14 @@ export function scDel(data) {
|
|||
data,
|
||||
})
|
||||
}
|
||||
// 批量取消浏览
|
||||
export function BsDel(data) {
|
||||
return request({
|
||||
url: '/resourceBrowse/delete',
|
||||
method: 'delete',
|
||||
data,
|
||||
})
|
||||
}
|
||||
// 查询我的发布列表
|
||||
export function wodepage(params) {
|
||||
return request({
|
||||
|
|
After Width: | Height: | Size: 1.1 KiB |
After Width: | Height: | Size: 1.0 KiB |
After Width: | Height: | Size: 323 KiB |
After Width: | Height: | Size: 825 KiB |
After Width: | Height: | Size: 305 KiB |
After Width: | Height: | Size: 8.1 KiB |
After Width: | Height: | Size: 273 KiB |
After Width: | Height: | Size: 1.0 KiB |
After Width: | Height: | Size: 1.0 KiB |
After Width: | Height: | Size: 323 KiB |
After Width: | Height: | Size: 11 KiB |
After Width: | Height: | Size: 14 KiB |
After Width: | Height: | Size: 4.9 KiB |
After Width: | Height: | Size: 18 KiB |
After Width: | Height: | Size: 310 B |
After Width: | Height: | Size: 2.5 KiB |
After Width: | Height: | Size: 5.4 KiB |
After Width: | Height: | Size: 1.8 KiB |
After Width: | Height: | Size: 757 KiB |
After Width: | Height: | Size: 310 B |
After Width: | Height: | Size: 200 KiB |
After Width: | Height: | Size: 5.2 KiB |
After Width: | Height: | Size: 4.5 KiB |