fix
This commit is contained in:
@@ -44,14 +44,17 @@ export default {
|
|||||||
methods: {
|
methods: {
|
||||||
...mapMutations(['setToken']),
|
...mapMutations(['setToken']),
|
||||||
getToken(params) {
|
getToken(params) {
|
||||||
this.setToken([params.token_type, params.access_token].join(' '))
|
if (params.access_token) {
|
||||||
this.dialog = false
|
this.setToken([params.token_type, params.access_token].join(' '))
|
||||||
this.$message.success("登录成功,正在刷新页面...")
|
this.dialog = false
|
||||||
location.reload()
|
this.$message.success("登录成功,正在刷新页面...")
|
||||||
|
location.reload()
|
||||||
|
} else this.$message.error(params.msg || "登录失败!")
|
||||||
|
|
||||||
},
|
},
|
||||||
getUserInfo() {
|
getUserInfo() {
|
||||||
this.$axios.post("/admin/user/detail-phone").then(res => {
|
this.$axios.post("/admin/user/detail-phone").then(res => {
|
||||||
if (res && res.data) {
|
if (res?.data) {
|
||||||
this.$store.commit("setUserInfo", res.data)
|
this.$store.commit("setUserInfo", res.data)
|
||||||
if (/^\/project\/xiushan/.test(location.pathname)) {
|
if (/^\/project\/xiushan/.test(location.pathname)) {
|
||||||
this.$store.commit("setFinanceUser")
|
this.$store.commit("setFinanceUser")
|
||||||
@@ -60,7 +63,7 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
handleLogin() {
|
handleLogin() {
|
||||||
this.$axios.delete("/auth/token/logout").then(() => {
|
this.$axios.delete("/auth/token/logout").finally(() => {
|
||||||
this.dialog = true
|
this.dialog = true
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -9,10 +9,12 @@ import 'dvcp-ui/lib/styles/common.scss';
|
|||||||
import 'dvcp-ui/lib/dvcp-ui.css';
|
import 'dvcp-ui/lib/dvcp-ui.css';
|
||||||
import store from './store';
|
import store from './store';
|
||||||
import dataV from '@jiaminghi/data-view';
|
import dataV from '@jiaminghi/data-view';
|
||||||
|
import dvui from '../project/dvui/entries'
|
||||||
|
|
||||||
Vue.use(dataV);
|
Vue.use(dataV);
|
||||||
Vue.use(ui);
|
Vue.use(ui);
|
||||||
Vue.use(vcUI);
|
Vue.use(vcUI);
|
||||||
|
Vue.use(dvui)
|
||||||
//富文本编辑器配置
|
//富文本编辑器配置
|
||||||
Vue.config.productionTip = false;
|
Vue.config.productionTip = false;
|
||||||
Vue.prototype.$axios = axios;
|
Vue.prototype.$axios = axios;
|
||||||
|
|||||||
93
package.json
93
package.json
@@ -1,93 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "cw-webapps",
|
|
||||||
"version": "2.0.0",
|
|
||||||
"private": false,
|
|
||||||
"author": "kubbo",
|
|
||||||
"main": "lib/cw-webapps.common.js",
|
|
||||||
"scripts": {
|
|
||||||
"dev": "vue-cli-service serve",
|
|
||||||
"lib": "vue-cli-service build --no-clean --target lib --dest lib packages/index.js&&npm unpublish --force&&npm publish",
|
|
||||||
"lib:core": "vue-cli-service build --target lib --dest core/dist core/index.js --name dvcp-core&&npm unpublish dvcp-core --force&&npm publish core/",
|
|
||||||
"lib:project": "node project/build.js",
|
|
||||||
"lib:all": "node project/allProject.js&&npm unpublish --workspaces --force&&npm publish --workspaces",
|
|
||||||
"ui": "npm i dvcp-ui@latest dvcp-dv-ui@latest"
|
|
||||||
},
|
|
||||||
"workspaces": [
|
|
||||||
"project/*"
|
|
||||||
],
|
|
||||||
"dependencies": {
|
|
||||||
"@amap/amap-jsapi-loader": "^1.0.1",
|
|
||||||
"@jiaminghi/data-view": "^2.10.0",
|
|
||||||
"bin-code-editor": "^0.9.0",
|
|
||||||
"dayjs": "^1.8.35",
|
|
||||||
"dvcp-dv": "^1.0.0",
|
|
||||||
"dvcp-dv-ui": "file:project/dvui",
|
|
||||||
"dvcp-ui": "^1.42.2",
|
|
||||||
"echarts": "^5.1.2",
|
|
||||||
"mp4box": "^0.4.1",
|
|
||||||
"print-js": "^1.0.63",
|
|
||||||
"serialize-javascript": "^6.0.0",
|
|
||||||
"sortablejs": "^1.12.0",
|
|
||||||
"vue-draggable-resizable": "^2.3.0",
|
|
||||||
"vue-json-editor": "^1.4.3",
|
|
||||||
"vue-okr-tree": "^1.0.10",
|
|
||||||
"vue-ruler-tool": "^1.2.4",
|
|
||||||
"vuedraggable": "^2.24.3"
|
|
||||||
},
|
|
||||||
"publishConfig": {
|
|
||||||
"registry": "http://192.168.1.87:4873/"
|
|
||||||
},
|
|
||||||
"devDependencies": {
|
|
||||||
"@babel/plugin-proposal-logical-assignment-operators": "^7.10.4",
|
|
||||||
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.10.4",
|
|
||||||
"@babel/plugin-proposal-optional-chaining": "^7.10.4",
|
|
||||||
"@vue/cli-plugin-babel": "^3.6.0",
|
|
||||||
"@vue/cli-plugin-eslint": "^3.6.0",
|
|
||||||
"@vue/cli-service": "^3.6.0",
|
|
||||||
"axios": "^0.19.2",
|
|
||||||
"babel-eslint": "^10.1.0",
|
|
||||||
"core-js": "^2.6.11",
|
|
||||||
"element-ui": "^2.13.2",
|
|
||||||
"eslint": "^5.16.0",
|
|
||||||
"eslint-plugin-vue": "^5.0.0",
|
|
||||||
"image-webpack-loader": "^6.0.0",
|
|
||||||
"inquirer": "^6.5.2",
|
|
||||||
"node-sass": "npm:sass@^1.43.4",
|
|
||||||
"readline": "^1.3.0",
|
|
||||||
"sass-loader": "^7.1.0",
|
|
||||||
"uglifyjs-webpack-plugin": "^2.2.0",
|
|
||||||
"v-viewer": "^1.6.4",
|
|
||||||
"vue": "^2.6.11",
|
|
||||||
"vue-router": "^3.3.4",
|
|
||||||
"vue-template-compiler": "^2.6.11",
|
|
||||||
"vuex": "^3.5.1",
|
|
||||||
"vuex-persistedstate": "^2.7.1"
|
|
||||||
},
|
|
||||||
"vetur": {
|
|
||||||
"attributes": "./attributes.json"
|
|
||||||
},
|
|
||||||
"eslintConfig": {
|
|
||||||
"root": true,
|
|
||||||
"env": {
|
|
||||||
"node": true
|
|
||||||
},
|
|
||||||
"extends": [
|
|
||||||
"plugin:vue/essential",
|
|
||||||
"eslint:recommended"
|
|
||||||
],
|
|
||||||
"rules": {},
|
|
||||||
"parserOptions": {
|
|
||||||
"parser": "babel-eslint"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"postcss": {
|
|
||||||
"plugins": {
|
|
||||||
"autoprefixer": {}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"browserslist": [
|
|
||||||
"> 1%",
|
|
||||||
"last 2 versions",
|
|
||||||
"not ie <= 8"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
@@ -1,38 +1,19 @@
|
|||||||
<template>
|
<template>
|
||||||
<ai-list v-if="!isShowDetail">
|
<section class="AppDesigner">
|
||||||
<template slot="title">
|
<component :is="currentPage" v-bind="$props"/>
|
||||||
<ai-title title="大屏列表" :isShowBottomBorder="false" :instance="instance"></ai-title>
|
</section>
|
||||||
</template>
|
|
||||||
<template slot="tabs">
|
|
||||||
<el-tabs v-model="currIndex">
|
|
||||||
<el-tab-pane v-for="(tab,i) in tabs" :key="i" :label="tab.label">
|
|
||||||
<component :urlPrefix="urlPrefix" :areaId="areaId" :ref="tab.name" v-if="currIndex == i" :is="tab.comp" @change="onChange" lazy :instance="instance" :dict="dict" :permissions="permissions" />
|
|
||||||
</el-tab-pane>
|
|
||||||
</el-tabs>
|
|
||||||
</template>
|
|
||||||
</ai-list>
|
|
||||||
<Add v-else-if="componentName === 'Add'" :urlPrefix="urlPrefix" :areaId="areaId" :params="params" :instance="instance" :dict="dict" :permissions="permissions" @change="onChange"></Add>
|
|
||||||
<SourceData v-else-if="componentName === 'SourceData'" :urlPrefix="urlPrefix" :params="params" :instance="instance" :dict="dict" :permissions="permissions" @change="onChange"></SourceData>
|
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import List from './components/List.vue'
|
import List from './components/List.vue'
|
||||||
import Add from './components/Add'
|
import Add from './components/Add'
|
||||||
import SourceData from './components/SourceData'
|
import SourceData from './components/SourceData'
|
||||||
import dvui from '../../../project/dvui/entries'
|
import Preview from "./components/preview";
|
||||||
import Vue from "vue";
|
|
||||||
|
|
||||||
Vue.use(dvui)
|
|
||||||
export default {
|
export default {
|
||||||
name: 'AppDesigner' ,
|
name: 'AppDesigner',
|
||||||
label: '大屏设计',
|
label: '大屏设计',
|
||||||
|
components: {Preview, List, Add, SourceData},
|
||||||
components: {
|
|
||||||
List,
|
|
||||||
Add,
|
|
||||||
SourceData
|
|
||||||
},
|
|
||||||
|
|
||||||
props: {
|
props: {
|
||||||
instance: Function,
|
instance: Function,
|
||||||
dict: Object,
|
dict: Object,
|
||||||
@@ -44,6 +25,12 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
computed: {
|
computed: {
|
||||||
|
currentPage() {
|
||||||
|
const {hash} = this.$route
|
||||||
|
return hash == "#sourceData" ? SourceData :
|
||||||
|
hash == "#add" ? Add :
|
||||||
|
hash == "#preview" ? Preview : List
|
||||||
|
},
|
||||||
tabs() {
|
tabs() {
|
||||||
return [
|
return [
|
||||||
{label: '大屏列表', name: 'FormList', comp: List, permission: ''}
|
{label: '大屏列表', name: 'FormList', comp: List, permission: ''}
|
||||||
@@ -84,8 +71,6 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<ai-detail>
|
<ai-detail>
|
||||||
<template slot="title">
|
<template slot="title">
|
||||||
<ai-title :title="id ? '编辑项目' : '添加项目'" isShowBack isShowBottomBorder @onBackClick="cancel(false)">
|
<ai-title :title="id ? '编辑项目' : '添加项目'" isShowBack isShowBottomBorder @onBackClick="cancel"/>
|
||||||
</ai-title>
|
|
||||||
</template>
|
</template>
|
||||||
<template slot="content">
|
<template slot="content">
|
||||||
<el-form ref="form" :model="form" label-width="110px" label-position="right">
|
<el-form ref="form" :model="form" label-width="110px" label-position="right">
|
||||||
@@ -33,14 +32,14 @@
|
|||||||
</template>
|
</template>
|
||||||
<template #content>
|
<template #content>
|
||||||
<ai-table
|
<ai-table
|
||||||
:tableData="tableData"
|
:tableData="tableData"
|
||||||
:col-configs="colConfigs"
|
:col-configs="colConfigs"
|
||||||
:total="total"
|
:total="total"
|
||||||
style="margin-top: 6px;"
|
style="margin-top: 6px;"
|
||||||
:border="true"
|
:border="true"
|
||||||
row-key="id"
|
row-key="id"
|
||||||
:isShowPagination="false"
|
:isShowPagination="false"
|
||||||
@getList="() => {}">
|
@getList="() => {}">
|
||||||
<el-table-column slot="options" width="160px" fixed="right" label="操作" align="center">
|
<el-table-column slot="options" width="160px" fixed="right" label="操作" align="center">
|
||||||
<template slot-scope="{ row, column, $index }">
|
<template slot-scope="{ row, column, $index }">
|
||||||
<div class="table-options">
|
<div class="table-options">
|
||||||
@@ -55,23 +54,15 @@
|
|||||||
</ai-card>
|
</ai-card>
|
||||||
</el-form>
|
</el-form>
|
||||||
<Layout
|
<Layout
|
||||||
v-if="isShowLayout"
|
v-if="isShowLayout"
|
||||||
:instance="instance"
|
:instance="instance"
|
||||||
:dict="dict"
|
:dict="dict"
|
||||||
:params="query"
|
:params="query"
|
||||||
@change="onChange"
|
@change="onChange"
|
||||||
:urlPrefix="urlPrefix"
|
:urlPrefix="urlPrefix"
|
||||||
:theme="config.theme"
|
|
||||||
@close="isShowLayout = false">
|
|
||||||
</Layout>
|
|
||||||
<ai-dv-wrapper :views="[{label: '返回'}]" :theme="config.theme" @change="screenId = false" v-if="screenId" :title="form.name">
|
|
||||||
<AiDvBackground
|
|
||||||
:theme="config.theme"
|
:theme="config.theme"
|
||||||
v-if="config.length || config.theme === '1'"
|
@close="isShowLayout = false">
|
||||||
:src="config.theme === '1' ? 'https://cdn.cunwuyun.cn/dvcp/dv/img/dj-bg.png' : config.backgroundImage[0].url">
|
</Layout>
|
||||||
</AiDvBackground>
|
|
||||||
<AppGigscreenViewer :urlPrefix="urlPrefix" :instance="instance" :dict="dict" :id="screenId"></AppGigscreenViewer>
|
|
||||||
</ai-dv-wrapper>
|
|
||||||
<ai-dialog :visible.sync="dialog" title="定制大屏" @closed="custom={}" @onConfirm="handleCustomizedDV">
|
<ai-dialog :visible.sync="dialog" title="定制大屏" @closed="custom={}" @onConfirm="handleCustomizedDV">
|
||||||
<el-form ref="CustomDVFrom" size="small" :model="custom" :rules="rules" label-width="80px">
|
<el-form ref="CustomDVFrom" size="small" :model="custom" :rules="rules" label-width="80px">
|
||||||
<el-form-item label="大屏标题" prop="title">
|
<el-form-item label="大屏标题" prop="title">
|
||||||
@@ -94,29 +85,21 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import AppGigscreenViewer from '../../viewer/AppGigscreenViewer'
|
|
||||||
import Layout from './Layout.vue'
|
import Layout from './Layout.vue'
|
||||||
import Sortable from 'sortablejs'
|
import Sortable from 'sortablejs'
|
||||||
|
import AppGigscreenViewer from "../../viewer/AppGigscreenViewer";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'Add',
|
name: 'Add',
|
||||||
|
|
||||||
props: {
|
props: {
|
||||||
instance: Function,
|
instance: Function,
|
||||||
dict: Object,
|
dict: Object,
|
||||||
params: Object,
|
|
||||||
urlPrefix: String
|
urlPrefix: String
|
||||||
},
|
},
|
||||||
|
|
||||||
inject: {
|
inject: {
|
||||||
home:{default: ''}
|
home: {default: ''}
|
||||||
},
|
},
|
||||||
|
components: {AppGigscreenViewer, Layout},
|
||||||
components: {
|
|
||||||
Layout,
|
|
||||||
AppGigscreenViewer
|
|
||||||
},
|
|
||||||
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
info: {},
|
info: {},
|
||||||
@@ -152,24 +135,18 @@ export default {
|
|||||||
|
|
||||||
created() {
|
created() {
|
||||||
this.dict.load('customizedDVs')
|
this.dict.load('customizedDVs')
|
||||||
if (this.params && this.params.id) {
|
this.getInfo()
|
||||||
this.id = this.params.id
|
|
||||||
this.getInfo(this.params.id)
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
|
||||||
mounted () {
|
|
||||||
|
|
||||||
},
|
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
getInfo(id) {
|
getInfo() {
|
||||||
|
let {id} = this.$route.query
|
||||||
this.instance.post(`${this.urlPrefix}/appdiylargescreen/queryLargeScreenProjectDetailById?id=${id}`).then(res => {
|
this.instance.post(`${this.urlPrefix}/appdiylargescreen/queryLargeScreenProjectDetailById?id=${id}`).then(res => {
|
||||||
if (res.code === 0) {
|
if (res?.data) {
|
||||||
this.form = {
|
this.form = {
|
||||||
...res.data
|
...res.data
|
||||||
}
|
}
|
||||||
|
|
||||||
if (res.data.relationLsIds) {
|
if (res.data.relationLsIds) {
|
||||||
this.tableData = res.data.lsList.map(v => {
|
this.tableData = res.data.lsList.map(v => {
|
||||||
let conf = JSON.parse(v.config || '') || {}
|
let conf = JSON.parse(v.config || '') || {}
|
||||||
@@ -194,7 +171,7 @@ export default {
|
|||||||
const tbody = document.querySelector('.el-table__body-wrapper tbody')
|
const tbody = document.querySelector('.el-table__body-wrapper tbody')
|
||||||
const _this = this
|
const _this = this
|
||||||
Sortable.create(tbody, {
|
Sortable.create(tbody, {
|
||||||
onEnd({ newIndex, oldIndex }) {
|
onEnd({newIndex, oldIndex}) {
|
||||||
const currRow = _this.tableData.splice(oldIndex, 1)[0]
|
const currRow = _this.tableData.splice(oldIndex, 1)[0]
|
||||||
_this.tableData.splice(newIndex, 0, currRow)
|
_this.tableData.splice(newIndex, 0, currRow)
|
||||||
}
|
}
|
||||||
@@ -202,14 +179,8 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
toViewer(id) {
|
toViewer(id) {
|
||||||
this.instance.post(`${this.urlPrefix}/appdiylargescreen/queryLargeScreenDetailById?id=${id}`).then(res => {
|
this.$router.push({query: {id}, hash: "#preview"})
|
||||||
if (res.data) {
|
|
||||||
this.config = JSON.parse(res.data.config).dashboard
|
|
||||||
}
|
|
||||||
})
|
|
||||||
this.screenId = id
|
|
||||||
},
|
},
|
||||||
|
|
||||||
onChange(e) {
|
onChange(e) {
|
||||||
const ids = this.tableData.map(v => v.id)
|
const ids = this.tableData.map(v => v.id)
|
||||||
if (ids.indexOf(e.id) < 0) {
|
if (ids.indexOf(e.id) < 0) {
|
||||||
@@ -267,7 +238,7 @@ export default {
|
|||||||
|
|
||||||
this.home && this.home.refreshDvOptions && this.home.refreshDvOptions()
|
this.home && this.home.refreshDvOptions && this.home.refreshDvOptions()
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.cancel(true)
|
this.cancel()
|
||||||
}, 600)
|
}, 600)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@@ -275,11 +246,8 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
cancel(isRefresh) {
|
cancel() {
|
||||||
this.$emit('change', {
|
this.$router.push({})
|
||||||
type: 'list',
|
|
||||||
isRefresh: !!isRefresh
|
|
||||||
})
|
|
||||||
},
|
},
|
||||||
|
|
||||||
handleCustomizedDV() {
|
handleCustomizedDV() {
|
||||||
|
|||||||
@@ -91,7 +91,7 @@
|
|||||||
<div class="coordinate-top"></div>
|
<div class="coordinate-top"></div>
|
||||||
<div class="coordinate-label">{{ item.left }}, {{ item.top }}</div>
|
<div class="coordinate-label">{{ item.left }}, {{ item.top }}</div>
|
||||||
</div>
|
</div>
|
||||||
<RenderElement :data="item" :theme="dashboard.theme" :index="index"></RenderElement>
|
<ai-dv-render :data="item" :theme="dashboard.theme" :index="index" :instance="instance" />
|
||||||
</vue-draggable-resizable>
|
</vue-draggable-resizable>
|
||||||
</div>
|
</div>
|
||||||
</ai-dv-wrapper>
|
</ai-dv-wrapper>
|
||||||
@@ -335,12 +335,12 @@
|
|||||||
</ai-dialog>
|
</ai-dialog>
|
||||||
<ai-dialog :visible.sync="isShowAddImg" width="580px" append-to-body title="添加素材" @closed="form.images = []" @onConfirm="onImageConfirm">
|
<ai-dialog :visible.sync="isShowAddImg" width="580px" append-to-body title="添加素材" @closed="form.images = []" @onConfirm="onImageConfirm">
|
||||||
<ai-uploader
|
<ai-uploader
|
||||||
:instance="instance"
|
:instance="instance"
|
||||||
v-model="form.images"
|
v-model="form.images"
|
||||||
fileType="file"
|
fileType="file"
|
||||||
:maxSize="100"
|
:maxSize="100"
|
||||||
url="/admin/file/add-unlimited"
|
url="/admin/file/add-unlimited"
|
||||||
:limit="9">
|
:limit="9">
|
||||||
</ai-uploader>
|
</ai-uploader>
|
||||||
</ai-dialog>
|
</ai-dialog>
|
||||||
</div>
|
</div>
|
||||||
@@ -353,7 +353,6 @@ import VueRulerTool from 'vue-ruler-tool'
|
|||||||
import VueDraggableResizable from 'vue-draggable-resizable'
|
import VueDraggableResizable from 'vue-draggable-resizable'
|
||||||
import 'vue-draggable-resizable/dist/VueDraggableResizable.css'
|
import 'vue-draggable-resizable/dist/VueDraggableResizable.css'
|
||||||
import DataConfig from './form/DataConfig.vue'
|
import DataConfig from './form/DataConfig.vue'
|
||||||
import RenderElement from './RenderElement'
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
props: {
|
props: {
|
||||||
@@ -366,7 +365,7 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
colConfigs: [
|
colConfigs: [
|
||||||
{ prop: 'url', label: '图片链接', showOverflowTooltip: false },
|
{prop: 'url', label: '图片链接', showOverflowTooltip: false},
|
||||||
// {slot: 'img', label: '图片'}
|
// {slot: 'img', label: '图片'}
|
||||||
],
|
],
|
||||||
form: {
|
form: {
|
||||||
@@ -416,7 +415,6 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
components: {
|
components: {
|
||||||
RenderElement,
|
|
||||||
DataConfig,
|
DataConfig,
|
||||||
VueRulerTool,
|
VueRulerTool,
|
||||||
VueDraggableResizable,
|
VueDraggableResizable,
|
||||||
|
|||||||
@@ -1,38 +1,39 @@
|
|||||||
<template>
|
<template>
|
||||||
<ai-list class="form-list" isTabs style="width: 100%">
|
<ai-list>
|
||||||
|
<ai-title slot="title" title="大屏列表" isShowBottomBorder/>
|
||||||
<template slot="content">
|
<template slot="content">
|
||||||
<ai-search-bar>
|
<ai-search-bar>
|
||||||
<template #left>
|
<template #left>
|
||||||
<ai-select
|
<ai-select
|
||||||
v-model="search.status"
|
v-model="search.status"
|
||||||
@change="search.current = 1, getList()"
|
@change="search.current = 1, getList()"
|
||||||
placeholder="发布状态"
|
placeholder="发布状态"
|
||||||
:selectList="dict.getDict('cwpStatus')">
|
:selectList="dict.getDict('cwpStatus')">
|
||||||
</ai-select>
|
</ai-select>
|
||||||
<el-button type="primary" @click="toEdit('')">添加大屏</el-button>
|
<el-button type="primary" @click="toEdit('')">添加大屏</el-button>
|
||||||
<el-button type="primary" @click="toAddData">数据源管理</el-button>
|
<el-button type="primary" @click="toAddData">数据源管理</el-button>
|
||||||
</template>
|
</template>
|
||||||
<template #right>
|
<template #right>
|
||||||
<el-input
|
<el-input
|
||||||
v-model="search.name"
|
v-model="search.name"
|
||||||
size="small"
|
size="small"
|
||||||
placeholder="请输入模板名称或创建人"
|
placeholder="请输入模板名称或创建人"
|
||||||
clearable
|
clearable
|
||||||
v-throttle="() => {search.current = 1, getList()}"
|
v-throttle="() => {search.current = 1, getList()}"
|
||||||
@clear="search.current = 1, search.title = '', getList()"
|
@clear="search.current = 1, search.title = '', getList()"
|
||||||
suffix-icon="iconfont iconSearch">
|
suffix-icon="iconfont iconSearch">
|
||||||
</el-input>
|
</el-input>
|
||||||
</template>
|
</template>
|
||||||
</ai-search-bar>
|
</ai-search-bar>
|
||||||
<ai-table
|
<ai-table
|
||||||
:tableData="tableData"
|
:tableData="tableData"
|
||||||
:col-configs="colConfigs"
|
:col-configs="colConfigs"
|
||||||
:total="total"
|
:total="total"
|
||||||
v-loading="loading"
|
v-loading="loading"
|
||||||
style="margin-top: 6px;"
|
style="margin-top: 6px;"
|
||||||
:current.sync="search.current"
|
:current.sync="search.current"
|
||||||
:size.sync="search.size"
|
:size.sync="search.size"
|
||||||
@getList="getList">
|
@getList="getList">
|
||||||
<el-table-column slot="options" width="160px" fixed="right" label="操作" align="center">
|
<el-table-column slot="options" width="160px" fixed="right" label="操作" align="center">
|
||||||
<template slot-scope="{ row }">
|
<template slot-scope="{ row }">
|
||||||
<div class="table-options">
|
<div class="table-options">
|
||||||
@@ -43,11 +44,11 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
</ai-table>
|
</ai-table>
|
||||||
<ai-dialog
|
<ai-dialog
|
||||||
:visible.sync="isShowAdd"
|
:visible.sync="isShowAdd"
|
||||||
width="780px"
|
width="780px"
|
||||||
title="复制大屏"
|
title="复制大屏"
|
||||||
@close="onClose"
|
@close="onClose"
|
||||||
@onConfirm="onConfirm">
|
@onConfirm="onConfirm">
|
||||||
<el-form ref="form" :model="form" label-width="110px" label-position="right">
|
<el-form ref="form" :model="form" label-width="110px" label-position="right">
|
||||||
<div class="ai-form" :model="form" label-width="110px" label-position="right">
|
<div class="ai-form" :model="form" label-width="110px" label-position="right">
|
||||||
<el-form-item label="名称" prop="name" style="width: 100%;" :rules="[{ required: true, message: '请输入名称', trigger: 'blur' }]">
|
<el-form-item label="名称" prop="name" style="width: 100%;" :rules="[{ required: true, message: '请输入名称', trigger: 'blur' }]">
|
||||||
@@ -61,118 +62,106 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
name: 'FormList',
|
name: 'FormList',
|
||||||
props: {
|
props: {
|
||||||
instance: Function,
|
instance: Function,
|
||||||
dict: Object,
|
dict: Object,
|
||||||
areaId: String,
|
areaId: String,
|
||||||
urlPrefix: String
|
urlPrefix: String
|
||||||
|
},
|
||||||
|
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
search: {
|
||||||
|
current: 1,
|
||||||
|
status: '',
|
||||||
|
size: 10,
|
||||||
|
name: ''
|
||||||
|
},
|
||||||
|
form: {
|
||||||
|
name: ''
|
||||||
|
},
|
||||||
|
id: '',
|
||||||
|
isShowAdd: false,
|
||||||
|
colConfigs: [
|
||||||
|
{prop: 'name', label: '模板名称'},
|
||||||
|
{prop: 'createUserName', align: 'center', label: '创建人'},
|
||||||
|
{prop: 'description', align: 'center', label: '描述'},
|
||||||
|
{prop: 'status', align: 'center', label: '状态', formart: v => this.dict.getLabel('cwpStatus', v)},
|
||||||
|
{prop: 'createTime', align: 'center', label: '创建时间'}
|
||||||
|
],
|
||||||
|
tableData: [],
|
||||||
|
total: 0,
|
||||||
|
loading: false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
|
created() {
|
||||||
|
|
||||||
|
this.dict.load('cwpStatus').then(() => {
|
||||||
|
this.getList()
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
mounted() {
|
||||||
|
this.loading = true
|
||||||
|
},
|
||||||
|
|
||||||
|
methods: {
|
||||||
|
copy(id) {
|
||||||
|
this.id = id
|
||||||
|
this.isShowAdd = true
|
||||||
},
|
},
|
||||||
|
|
||||||
data () {
|
onClose() {
|
||||||
return {
|
this.id = ''
|
||||||
search: {
|
this.form.name = ''
|
||||||
current: 1,
|
|
||||||
status: '',
|
|
||||||
size: 10,
|
|
||||||
name: ''
|
|
||||||
},
|
|
||||||
form: {
|
|
||||||
name: ''
|
|
||||||
},
|
|
||||||
id: '',
|
|
||||||
isShowAdd: false,
|
|
||||||
colConfigs: [
|
|
||||||
{ prop: 'name', label: '模板名称' },
|
|
||||||
{ prop: 'createUserName', align: 'center', label: '创建人' },
|
|
||||||
{ prop: 'description', align: 'center', label: '描述' },
|
|
||||||
{ prop: 'status', align: 'center', label: '状态', formart: v => this.dict.getLabel('cwpStatus', v) },
|
|
||||||
{ prop: 'createTime', align: 'center', label: '创建时间' }
|
|
||||||
],
|
|
||||||
tableData: [],
|
|
||||||
total: 0,
|
|
||||||
loading: false
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
|
||||||
created () {
|
onConfirm() {
|
||||||
|
this.$refs.form.validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
|
this.instance.post(`${this.urlPrefix}/appdiylargescreen/copyLargeScreenProject`, null, {
|
||||||
|
params: {
|
||||||
|
...this.form,
|
||||||
|
id: this.id
|
||||||
|
}
|
||||||
|
}).then(res => {
|
||||||
|
if (res.code === 0) {
|
||||||
|
this.$message.success('复制成功')
|
||||||
|
this.isShowAdd = false
|
||||||
|
|
||||||
this.dict.load('cwpStatus').then(() => {
|
this.getList()
|
||||||
this.getList()
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
mounted () {
|
getList() {
|
||||||
this.loading = true
|
this.instance.post(`${this.urlPrefix}/appdiylargescreen/allLargeScreenProjectByPage`, null, {
|
||||||
},
|
params: {
|
||||||
|
...this.search
|
||||||
methods: {
|
}
|
||||||
copy (id) {
|
}).then(res => {
|
||||||
this.id = id
|
if (res.code == 0) {
|
||||||
this.isShowAdd = true
|
this.tableData = res.data.records
|
||||||
},
|
this.total = res.data.total
|
||||||
|
|
||||||
onClose () {
|
|
||||||
this.id = ''
|
|
||||||
this.form.name = ''
|
|
||||||
},
|
|
||||||
|
|
||||||
onConfirm () {
|
|
||||||
this.$refs.form.validate((valid) => {
|
|
||||||
if (valid) {
|
|
||||||
this.instance.post(`${this.urlPrefix}/appdiylargescreen/copyLargeScreenProject`, null, {
|
|
||||||
params: {
|
|
||||||
...this.form,
|
|
||||||
id: this.id
|
|
||||||
}
|
|
||||||
}).then(res => {
|
|
||||||
if (res.code === 0) {
|
|
||||||
this.$message.success('复制成功')
|
|
||||||
this.isShowAdd = false
|
|
||||||
|
|
||||||
this.getList()
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
|
|
||||||
getList () {
|
|
||||||
this.instance.post(`${this.urlPrefix}/appdiylargescreen/allLargeScreenProjectByPage`, null, {
|
|
||||||
params: {
|
|
||||||
...this.search
|
|
||||||
}
|
|
||||||
}).then(res => {
|
|
||||||
if (res.code == 0) {
|
|
||||||
this.tableData = res.data.records
|
|
||||||
this.total = res.data.total
|
|
||||||
this.loading = false
|
|
||||||
} else {
|
|
||||||
this.loading = false
|
|
||||||
}
|
|
||||||
}).catch(() => {
|
|
||||||
this.loading = false
|
this.loading = false
|
||||||
})
|
} else {
|
||||||
},
|
this.loading = false
|
||||||
|
}
|
||||||
toEdit (id) {
|
}).catch(() => {
|
||||||
this.$emit('change', {
|
this.loading = false
|
||||||
type: 'add',
|
})
|
||||||
params: {
|
},
|
||||||
id: id || ''
|
toEdit(id) {
|
||||||
}
|
this.$router.push({hash: "#add", query: {id}})
|
||||||
})
|
},
|
||||||
},
|
toAddData() {
|
||||||
|
this.$router.push({hash: "#sourceData"})
|
||||||
toAddData () {
|
|
||||||
this.$emit('change', {
|
|
||||||
type: 'SourceData'
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
|
||||||
</style>
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<ai-detail>
|
<ai-detail>
|
||||||
<template slot="title">
|
<template slot="title">
|
||||||
<ai-title title="数据源" isShowBack isShowBottomBorder @onBackClick="cancel(false)">
|
<ai-title title="数据源" isShowBack isShowBottomBorder @onBackClick="cancel">
|
||||||
</ai-title>
|
</ai-title>
|
||||||
</template>
|
</template>
|
||||||
<template slot="content">
|
<template slot="content">
|
||||||
@@ -13,25 +13,25 @@
|
|||||||
<ai-search-bar class="search-bar">
|
<ai-search-bar class="search-bar">
|
||||||
<template slot="right">
|
<template slot="right">
|
||||||
<el-input
|
<el-input
|
||||||
v-model="search.name"
|
v-model="search.name"
|
||||||
size="small"
|
size="small"
|
||||||
v-throttle="() => {search.current = 1, getList()}"
|
v-throttle="() => {search.current = 1, getList()}"
|
||||||
placeholder="请输入名字"
|
placeholder="请输入名字"
|
||||||
clearable
|
clearable
|
||||||
@clear="search.current = 1, search.name = '', getList()"
|
@clear="search.current = 1, search.name = '', getList()"
|
||||||
suffix-icon="iconfont iconSearch">
|
suffix-icon="iconfont iconSearch">
|
||||||
</el-input>
|
</el-input>
|
||||||
</template>
|
</template>
|
||||||
</ai-search-bar>
|
</ai-search-bar>
|
||||||
<ai-table
|
<ai-table
|
||||||
:tableData="tableData"
|
:tableData="tableData"
|
||||||
:col-configs="colConfigs"
|
:col-configs="colConfigs"
|
||||||
:total="total"
|
:total="total"
|
||||||
style="margin-top: 6px;"
|
style="margin-top: 6px;"
|
||||||
:border="true"
|
:border="true"
|
||||||
:current.sync="search.current"
|
:current.sync="search.current"
|
||||||
:size.sync="search.size"
|
:size.sync="search.size"
|
||||||
@getList="getList">
|
@getList="getList">
|
||||||
<el-table-column slot="options" width="160px" fixed="right" label="操作" align="center">
|
<el-table-column slot="options" width="160px" fixed="right" label="操作" align="center">
|
||||||
<template slot-scope="{ row }">
|
<template slot-scope="{ row }">
|
||||||
<div class="table-options">
|
<div class="table-options">
|
||||||
@@ -44,18 +44,18 @@
|
|||||||
</template>
|
</template>
|
||||||
</ai-card>
|
</ai-card>
|
||||||
<ai-dialog
|
<ai-dialog
|
||||||
:visible.sync="isShow"
|
:visible.sync="isShow"
|
||||||
width="920px"
|
width="920px"
|
||||||
title="数据源"
|
title="数据源"
|
||||||
@close="onClose"
|
@close="onClose"
|
||||||
@onConfirm="onConfirm">
|
@onConfirm="onConfirm">
|
||||||
<el-form ref="form" :model="form" label-width="110px" label-position="right">
|
<el-form ref="form" :model="form" label-width="110px" label-position="right">
|
||||||
<div class="ai-form">
|
<div class="ai-form">
|
||||||
<el-form-item label="数据源描述" style="width: 100%;" prop="description" :rules="[{ required: true, message: '请输入数据源描述', trigger: 'blur' }]">
|
<el-form-item label="数据源描述" style="width: 100%;" prop="description" :rules="[{ required: true, message: '请输入数据源描述', trigger: 'blur' }]">
|
||||||
<el-input
|
<el-input
|
||||||
size="small"
|
size="small"
|
||||||
placeholder="请输入数据源描述"
|
placeholder="请输入数据源描述"
|
||||||
v-model="form.description">
|
v-model="form.description">
|
||||||
</el-input>
|
</el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="类型" style="width: 100%;" prop="dataRange" :rules="[{ required: true, message: '请选择数据范围', trigger: 'change' }]">
|
<el-form-item label="类型" style="width: 100%;" prop="dataRange" :rules="[{ required: true, message: '请选择数据范围', trigger: 'change' }]">
|
||||||
@@ -64,55 +64,61 @@
|
|||||||
<el-radio label="1">SQL</el-radio>
|
<el-radio label="1">SQL</el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item v-if="form.type === '1'" label="sql语句" style="width: 100%;" prop="description" :rules="[{ required: true, message: '请输入sql语句', trigger: 'blur' }]">
|
<el-form-item v-if="form.type === '1'" label="sql语句" style="width: 100%;" prop="description"
|
||||||
|
:rules="[{ required: true, message: '请输入sql语句', trigger: 'blur' }]">
|
||||||
<el-input
|
<el-input
|
||||||
size="small"
|
:rows="8"
|
||||||
type="textarea"
|
size="small"
|
||||||
placeholder="请输入数据源描述"
|
type="textarea"
|
||||||
v-model="form.sqlContent">
|
placeholder="请输入数据源描述"
|
||||||
|
v-model="form.sqlContent">
|
||||||
</el-input>
|
</el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item v-if="form.type === '0'" label="村微应用" style="width: 100%;" prop="appId" :rules="[{ required: true, message: '请选择村微应用', trigger: 'change' }]">
|
<el-form-item v-if="form.type === '0'" label="村微应用" style="width: 100%;" prop="appId"
|
||||||
|
:rules="[{ required: true, message: '请选择村微应用', trigger: 'change' }]">
|
||||||
<el-select size="small" style="width: 100%;" v-model="form.appId" placeholder="请选择村微应用" @change="onAppChange">
|
<el-select size="small" style="width: 100%;" v-model="form.appId" placeholder="请选择村微应用" @change="onAppChange">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in appList"
|
v-for="item in appList"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
:label="item.appName"
|
:label="item.appName"
|
||||||
:value="item.id">
|
:value="item.id">
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item v-if="form.type === '0'" label="数据范围" style="width: 100%;" prop="dataRange" :rules="[{ required: true, message: '请选择数据范围', trigger: 'change' }]">
|
<el-form-item v-if="form.type === '0'" label="数据范围" style="width: 100%;" prop="dataRange"
|
||||||
|
:rules="[{ required: true, message: '请选择数据范围', trigger: 'change' }]">
|
||||||
<el-radio-group v-model="form.dataRange">
|
<el-radio-group v-model="form.dataRange">
|
||||||
<el-radio label="0">全部</el-radio>
|
<el-radio label="0">全部</el-radio>
|
||||||
<el-radio label="1">自定义条数</el-radio>
|
<el-radio label="1">自定义条数</el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="数据条数" style="width: 100%;" v-if="form.dataRange === '1' && form.type === '0'" prop="count" :rules="[{ required: true, message: '请输入数据条数', trigger: 'blur' }]">
|
<el-form-item label="数据条数" style="width: 100%;" v-if="form.dataRange === '1' && form.type === '0'" prop="count"
|
||||||
|
:rules="[{ required: true, message: '请输入数据条数', trigger: 'blur' }]">
|
||||||
<el-input
|
<el-input
|
||||||
size="small"
|
size="small"
|
||||||
placeholder="请输入数据条数"
|
placeholder="请输入数据条数"
|
||||||
v-model="form.count">
|
v-model="form.count">
|
||||||
</el-input>
|
</el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<div v-if="form.type === '0'">
|
<div v-if="form.type === '0'">
|
||||||
<el-form-item :label="'统计项' + index" style="width: 100%;" v-for="(item, index) in form.statisticsConfigs" :key="'statisticsConfigs' + index">
|
<el-form-item :label="'统计项' + index" style="width: 100%;" v-for="(item, index) in form.statisticsConfigs" :key="'statisticsConfigs' + index">
|
||||||
<div class="form-flex">
|
<div class="form-flex">
|
||||||
<div>
|
<div>
|
||||||
<el-select size="small" style="width: 160px;" v-model="item.fieldName" @change="e => onChooseField('statisticsConfigs', e, index)" placeholder="请选择" clearable>
|
<el-select size="small" style="width: 160px;" v-model="item.fieldName" @change="e => onChooseField('statisticsConfigs', e, index)"
|
||||||
|
placeholder="请选择" clearable>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="(item, index) in filedList"
|
v-for="(item, index) in filedList"
|
||||||
:key="index"
|
:key="index"
|
||||||
:label="item.fieldCnName"
|
:label="item.fieldCnName"
|
||||||
:value="item.fieldName">
|
:value="item.fieldName">
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
<el-select size="small" style="margin: 0 10px; width: 160px;" v-model="item.calcType" placeholder="请选择" clearable>
|
<el-select size="small" style="margin: 0 10px; width: 160px;" v-model="item.calcType" placeholder="请选择" clearable>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in dict.getDict('diyLargeScreenDatasourceCalcType2')"
|
v-for="item in dict.getDict('diyLargeScreenDatasourceCalcType2')"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
:label="item.dictName"
|
:label="item.dictName"
|
||||||
:value="item.dictValue">
|
:value="item.dictValue">
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
<el-input size="small" style="width: 165px;" placeholder="请输入别名" v-model="item.alias"></el-input>
|
<el-input size="small" style="width: 165px;" placeholder="请输入别名" v-model="item.alias"></el-input>
|
||||||
@@ -130,10 +136,10 @@
|
|||||||
<div>
|
<div>
|
||||||
<el-select size="small" style="width: 160px;" v-model="item.fieldName" placeholder="请选择" clearable>
|
<el-select size="small" style="width: 160px;" v-model="item.fieldName" placeholder="请选择" clearable>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in filedList"
|
v-for="item in filedList"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
:label="item.fieldCnName"
|
:label="item.fieldCnName"
|
||||||
:value="item.fieldName">
|
:value="item.fieldName">
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</div>
|
</div>
|
||||||
@@ -150,18 +156,18 @@
|
|||||||
<div>
|
<div>
|
||||||
<el-select size="small" style="width: 160px;" v-model="item.fieldName" placeholder="请选择" clearable>
|
<el-select size="small" style="width: 160px;" v-model="item.fieldName" placeholder="请选择" clearable>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in filedList"
|
v-for="item in filedList"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
:label="item.fieldCnName"
|
:label="item.fieldCnName"
|
||||||
:value="item.fieldName">
|
:value="item.fieldName">
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
<el-select size="small" style="width: 160px; margin-left: 10px;" v-model="item.orderType" placeholder="请选择" clearable>
|
<el-select size="small" style="width: 160px; margin-left: 10px;" v-model="item.orderType" placeholder="请选择" clearable>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in orderTypeDict"
|
v-for="item in orderTypeDict"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
:label="item.label"
|
:label="item.label"
|
||||||
:value="item.value">
|
:value="item.value">
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</div>
|
</div>
|
||||||
@@ -180,277 +186,274 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
name: 'SourceData',
|
name: 'SourceData',
|
||||||
|
|
||||||
props: {
|
props: {
|
||||||
instance: Function,
|
instance: Function,
|
||||||
dict: Object,
|
dict: Object,
|
||||||
params: Object,
|
params: Object,
|
||||||
urlPrefix: String
|
urlPrefix: String
|
||||||
},
|
},
|
||||||
|
|
||||||
data () {
|
data() {
|
||||||
return {
|
return {
|
||||||
isShow: false,
|
isShow: false,
|
||||||
search: {
|
search: {
|
||||||
current: 1,
|
current: 1,
|
||||||
size: 10,
|
size: 10,
|
||||||
name: ''
|
name: ''
|
||||||
|
},
|
||||||
|
total: 0,
|
||||||
|
colConfigs: [
|
||||||
|
{prop: 'appName', label: '应用名'},
|
||||||
|
{prop: 'appTableName', align: 'center', label: '表名'},
|
||||||
|
{prop: 'description', align: 'center', label: '描述'},
|
||||||
|
{prop: 'type', align: 'center', label: '类型', formart: v => v === '0' ? '村微应用' : 'sql语句'},
|
||||||
|
{prop: 'createUserName', align: 'center', label: '创建人'},
|
||||||
|
{prop: 'createTime', align: 'center', label: '创建时间'}
|
||||||
|
],
|
||||||
|
tableData: [],
|
||||||
|
filedList: [],
|
||||||
|
appList: [],
|
||||||
|
form: {
|
||||||
|
orderType: 'asc',
|
||||||
|
dataRange: '0',
|
||||||
|
type: '0',
|
||||||
|
sqlContent: '',
|
||||||
|
appId: '',
|
||||||
|
description: '',
|
||||||
|
appName: '',
|
||||||
|
appTableName: '',
|
||||||
|
count: '100',
|
||||||
|
statisticsConfigs: [{
|
||||||
|
alias: '',
|
||||||
|
calcType: '',
|
||||||
|
dictCode: '',
|
||||||
|
fieldCnName: '',
|
||||||
|
fieldName: ''
|
||||||
|
}],
|
||||||
|
orderConfigs: [{
|
||||||
|
alias: '',
|
||||||
|
calcType: '',
|
||||||
|
dictCode: '',
|
||||||
|
fieldCnName: '',
|
||||||
|
fieldName: ''
|
||||||
|
}],
|
||||||
|
groupConfigs: [{
|
||||||
|
alias: '',
|
||||||
|
calcType: '',
|
||||||
|
dictCode: '',
|
||||||
|
fieldCnName: '',
|
||||||
|
fieldName: ''
|
||||||
|
}]
|
||||||
|
},
|
||||||
|
id: '',
|
||||||
|
orderTypeDict: [
|
||||||
|
{
|
||||||
|
value: 'asc',
|
||||||
|
label: '升序'
|
||||||
},
|
},
|
||||||
total: 0,
|
{
|
||||||
colConfigs: [
|
value: 'desc',
|
||||||
{ prop: 'appName', label: '应用名' },
|
label: '降序'
|
||||||
{ prop: 'appTableName', align: 'center', label: '表名' },
|
}
|
||||||
{ prop: 'description', align: 'center', label: '描述' },
|
]
|
||||||
{ prop: 'type', align: 'center', label: '类型', formart: v => v === '0' ? '村微应用' : 'sql语句' },
|
}
|
||||||
{ prop: 'createUserName', align: 'center', label: '创建人' },
|
},
|
||||||
{ prop: 'createTime', align: 'center', label: '创建时间' }
|
|
||||||
],
|
created() {
|
||||||
tableData: [],
|
this.dict.load(['diyLargeScreenDatasourceCalcType2']).then(() => {
|
||||||
filedList: [],
|
this.getList()
|
||||||
appList: [],
|
this.getAppList()
|
||||||
form: {
|
})
|
||||||
orderType: 'asc',
|
},
|
||||||
dataRange: '0',
|
|
||||||
type: '0',
|
methods: {
|
||||||
sqlContent: '',
|
getInfo(id) {
|
||||||
appId: '',
|
this.instance.post(`${this.urlPrefix}/wxcp/wxuser/queryDetailById?id=${id}`).then(res => {
|
||||||
description: '',
|
if (res.code === 0) {
|
||||||
appName: '',
|
this.form = {
|
||||||
appTableName: '',
|
...res.data
|
||||||
count: '100',
|
|
||||||
statisticsConfigs: [{
|
|
||||||
alias: '',
|
|
||||||
calcType: '',
|
|
||||||
dictCode: '',
|
|
||||||
fieldCnName: '',
|
|
||||||
fieldName: ''
|
|
||||||
}],
|
|
||||||
orderConfigs: [{
|
|
||||||
alias: '',
|
|
||||||
calcType: '',
|
|
||||||
dictCode: '',
|
|
||||||
fieldCnName: '',
|
|
||||||
fieldName: ''
|
|
||||||
}],
|
|
||||||
groupConfigs: [{
|
|
||||||
alias: '',
|
|
||||||
calcType: '',
|
|
||||||
dictCode: '',
|
|
||||||
fieldCnName: '',
|
|
||||||
fieldName: ''
|
|
||||||
}]
|
|
||||||
},
|
|
||||||
id: '',
|
|
||||||
orderTypeDict: [
|
|
||||||
{
|
|
||||||
value: 'asc',
|
|
||||||
label: '升序'
|
|
||||||
},
|
|
||||||
{
|
|
||||||
value: 'desc',
|
|
||||||
label: '降序'
|
|
||||||
}
|
}
|
||||||
]
|
}
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
created () {
|
|
||||||
this.dict.load(['diyLargeScreenDatasourceCalcType2']).then(() => {
|
|
||||||
this.getList()
|
|
||||||
this.getAppList()
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
onChooseField(type, fieldName, index) {
|
||||||
getInfo (id) {
|
const dictCode = this.filedList.filter(v => v.fieldName === fieldName)[0].dictCode
|
||||||
this.instance.post(`${this.urlPrefix}/wxcp/wxuser/queryDetailById?id=${id}`).then(res => {
|
this.$set(this.form[type][index], 'dictCode', dictCode)
|
||||||
if (res.code === 0) {
|
},
|
||||||
this.form = {
|
|
||||||
...res.data
|
add(type) {
|
||||||
}
|
this.form[type].push({
|
||||||
|
alias: '',
|
||||||
|
calcType: '',
|
||||||
|
dictCode: '',
|
||||||
|
fieldCnName: '',
|
||||||
|
fieldName: ''
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
removeConfig(type, index) {
|
||||||
|
this.form[type].splice(index, 1)
|
||||||
|
},
|
||||||
|
|
||||||
|
toEdit(e) {
|
||||||
|
this.id = e.id
|
||||||
|
this.instance.post(`${this.urlPrefix}/appdiylargescreen/queryDatasourceDetailById?id=${e.id}`).then(res => {
|
||||||
|
if (res.code === 0) {
|
||||||
|
this.form = {
|
||||||
|
...res.data
|
||||||
}
|
}
|
||||||
})
|
|
||||||
},
|
|
||||||
|
|
||||||
onChooseField (type, fieldName, index) {
|
this.form.dataRange = this.form.dataRange === '0' ? '0' : '1'
|
||||||
const dictCode = this.filedList.filter(v => v.fieldName === fieldName)[0].dictCode
|
this.form.count = res.data.dataRange
|
||||||
this.$set(this.form[type][index], 'dictCode', dictCode)
|
this.filedList = this.appList.filter(v => v.id === res.data.appId).length && this.appList.filter(v => v.id === res.data.appId)[0].fields.map(item => {
|
||||||
},
|
let value = []
|
||||||
|
res.data.configs.forEach(v => {
|
||||||
add (type) {
|
if (v.fieldName === item.fieldName) {
|
||||||
this.form[type].push({
|
value.push(v.calcType)
|
||||||
alias: '',
|
|
||||||
calcType: '',
|
|
||||||
dictCode: '',
|
|
||||||
fieldCnName: '',
|
|
||||||
fieldName: ''
|
|
||||||
})
|
|
||||||
},
|
|
||||||
|
|
||||||
removeConfig (type, index) {
|
|
||||||
this.form[type].splice(index, 1)
|
|
||||||
},
|
|
||||||
|
|
||||||
toEdit (e) {
|
|
||||||
this.id = e.id
|
|
||||||
this.instance.post(`${this.urlPrefix}/appdiylargescreen/queryDatasourceDetailById?id=${e.id}`).then(res => {
|
|
||||||
if (res.code === 0) {
|
|
||||||
this.form = {
|
|
||||||
...res.data
|
|
||||||
}
|
|
||||||
|
|
||||||
this.form.dataRange = this.form.dataRange === '0' ? '0' : '1'
|
|
||||||
this.form.count = res.data.dataRange
|
|
||||||
this.filedList = this.appList.filter(v => v.id === res.data.appId).length && this.appList.filter(v => v.id === res.data.appId)[0].fields.map(item => {
|
|
||||||
let value = []
|
|
||||||
res.data.configs.forEach(v => {
|
|
||||||
if (v.fieldName === item.fieldName) {
|
|
||||||
value.push(v.calcType)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
return {
|
|
||||||
...item,
|
|
||||||
value
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
this.isShow = true
|
|
||||||
|
return {
|
||||||
|
...item,
|
||||||
|
value
|
||||||
|
}
|
||||||
|
})
|
||||||
|
this.isShow = true
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
remove(id) {
|
||||||
|
this.$confirm('确定删除该数据?').then(() => {
|
||||||
|
this.instance.post(`${this.urlPrefix}/appquestionnairetemplate/delete?id=${id}`).then(res => {
|
||||||
|
if (res.code == 0) {
|
||||||
|
this.$message.success('删除成功!')
|
||||||
|
this.getList()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
getList() {
|
||||||
|
this.instance.post(`${this.urlPrefix}/appdiylargescreen/allDatasourceByPage`, null, {
|
||||||
|
params: {
|
||||||
|
...this.search
|
||||||
|
}
|
||||||
|
}).then(res => {
|
||||||
|
if (res.code == 0) {
|
||||||
|
this.tableData = res.data.records
|
||||||
|
this.total = res.data.total
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
getAppList() {
|
||||||
|
this.instance.post(`${this.urlPrefix}/appdiylargescreen/allDatasourceApp`).then(res => {
|
||||||
|
if (res.code === 0) {
|
||||||
|
this.appList = res.data
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
onClose() {
|
||||||
|
this.id = ''
|
||||||
|
this.form.orderType = 'asc'
|
||||||
|
this.form.dataRange = 0
|
||||||
|
this.form.appId = ''
|
||||||
|
this.form.description = ''
|
||||||
|
this.form.appName = ''
|
||||||
|
this.form.appTableName = ''
|
||||||
|
this.form.count = 100
|
||||||
|
},
|
||||||
|
|
||||||
|
onAppChange(e) {
|
||||||
|
const value = this.appList.filter(v => v.id === e)[0]
|
||||||
|
this.form.appTableName = value.appTableName
|
||||||
|
this.form.appName = value.appName
|
||||||
|
this.form.statisticsConfigs = [{
|
||||||
|
alias: '',
|
||||||
|
calcType: '',
|
||||||
|
dictCode: '',
|
||||||
|
fieldCnName: '',
|
||||||
|
fieldName: ''
|
||||||
|
}]
|
||||||
|
this.form.orderConfigs = [{
|
||||||
|
alias: '',
|
||||||
|
calcType: '',
|
||||||
|
dictCode: '',
|
||||||
|
fieldCnName: '',
|
||||||
|
fieldName: ''
|
||||||
|
}]
|
||||||
|
this.form.groupConfigs = [{
|
||||||
|
alias: '',
|
||||||
|
calcType: '',
|
||||||
|
dictCode: '',
|
||||||
|
fieldCnName: '',
|
||||||
|
fieldName: ''
|
||||||
|
}]
|
||||||
|
this.filedList = value.fields.map(v => {
|
||||||
|
return {
|
||||||
|
...v,
|
||||||
|
value: ''
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
onConfirm() {
|
||||||
|
this.$refs.form.validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
|
let configs = []
|
||||||
|
|
||||||
|
if (this.filedList.length) {
|
||||||
|
this.filedList.forEach(item => {
|
||||||
|
if (item.value.length) {
|
||||||
|
item.value.forEach(v => {
|
||||||
|
configs.push({
|
||||||
|
alias: item.fieldCnName,
|
||||||
|
calcType: v,
|
||||||
|
fieldCnName: item.fieldCnName,
|
||||||
|
fieldName: item.fieldName,
|
||||||
|
dictCode: item.dictCode,
|
||||||
|
orderType: this.orderType
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
this.instance.post(`${this.urlPrefix}/appdiylargescreen/addOrUpdateDatasource`, {
|
||||||
|
...this.form,
|
||||||
|
configs,
|
||||||
|
id: this.id ? this.id : '',
|
||||||
|
dataRange: this.form.dataRange === '0' ? 0 : this.form.count
|
||||||
|
}).then(res => {
|
||||||
|
if (res.code === 0) {
|
||||||
|
this.$message.success(this.id ? '编辑成功' : '添加成功')
|
||||||
|
this.search.current = 1
|
||||||
|
this.isShow = false
|
||||||
|
|
||||||
remove (id) {
|
|
||||||
this.$confirm('确定删除该数据?').then(() => {
|
|
||||||
this.instance.post(`${this.urlPrefix}/appquestionnairetemplate/delete?id=${id}`).then(res => {
|
|
||||||
if (res.code == 0) {
|
|
||||||
this.$message.success('删除成功!')
|
|
||||||
this.getList()
|
this.getList()
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
}
|
||||||
},
|
})
|
||||||
|
},
|
||||||
|
|
||||||
getList () {
|
cancel() {
|
||||||
this.instance.post(`${this.urlPrefix}/appdiylargescreen/allDatasourceByPage`, null, {
|
this.$router.push({})
|
||||||
params: {
|
|
||||||
...this.search
|
|
||||||
}
|
|
||||||
}).then(res => {
|
|
||||||
if (res.code == 0) {
|
|
||||||
this.tableData = res.data.records
|
|
||||||
this.total = res.data.total
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
|
|
||||||
getAppList () {
|
|
||||||
this.instance.post(`${this.urlPrefix}/appdiylargescreen/allDatasourceApp`).then(res => {
|
|
||||||
if (res.code === 0) {
|
|
||||||
this.appList = res.data
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
|
|
||||||
onClose () {
|
|
||||||
this.id = ''
|
|
||||||
this.form.orderType = 'asc'
|
|
||||||
this.form.dataRange = 0
|
|
||||||
this.form.appId = ''
|
|
||||||
this.form.description = ''
|
|
||||||
this.form.appName = ''
|
|
||||||
this.form.appTableName = ''
|
|
||||||
this.form.count = 100
|
|
||||||
},
|
|
||||||
|
|
||||||
onAppChange (e) {
|
|
||||||
const value = this.appList.filter(v => v.id === e)[0]
|
|
||||||
this.form.appTableName = value.appTableName
|
|
||||||
this.form.appName = value.appName
|
|
||||||
this.form.statisticsConfigs = [{
|
|
||||||
alias: '',
|
|
||||||
calcType: '',
|
|
||||||
dictCode: '',
|
|
||||||
fieldCnName: '',
|
|
||||||
fieldName: ''
|
|
||||||
}]
|
|
||||||
this.form.orderConfigs = [{
|
|
||||||
alias: '',
|
|
||||||
calcType: '',
|
|
||||||
dictCode: '',
|
|
||||||
fieldCnName: '',
|
|
||||||
fieldName: ''
|
|
||||||
}]
|
|
||||||
this.form.groupConfigs = [{
|
|
||||||
alias: '',
|
|
||||||
calcType: '',
|
|
||||||
dictCode: '',
|
|
||||||
fieldCnName: '',
|
|
||||||
fieldName: ''
|
|
||||||
}]
|
|
||||||
this.filedList = value.fields.map(v => {
|
|
||||||
return {
|
|
||||||
...v,
|
|
||||||
value: ''
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
|
|
||||||
onConfirm () {
|
|
||||||
this.$refs.form.validate((valid) => {
|
|
||||||
if (valid) {
|
|
||||||
let configs = []
|
|
||||||
|
|
||||||
if (this.filedList.length) {
|
|
||||||
this.filedList.forEach(item => {
|
|
||||||
if (item.value.length) {
|
|
||||||
item.value.forEach(v => {
|
|
||||||
configs.push({
|
|
||||||
alias: item.fieldCnName,
|
|
||||||
calcType: v,
|
|
||||||
fieldCnName: item.fieldCnName,
|
|
||||||
fieldName: item.fieldName,
|
|
||||||
dictCode: item.dictCode,
|
|
||||||
orderType: this.orderType
|
|
||||||
})
|
|
||||||
})
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
this.instance.post(`${this.urlPrefix}/appdiylargescreen/addOrUpdateDatasource`, {
|
|
||||||
...this.form,
|
|
||||||
configs,
|
|
||||||
id: this.id ? this.id : '',
|
|
||||||
dataRange: this.form.dataRange === '0' ? 0 : this.form.count
|
|
||||||
}).then(res => {
|
|
||||||
if (res.code === 0) {
|
|
||||||
this.$message.success(this.id ? '编辑成功' : '添加成功')
|
|
||||||
this.search.current = 1
|
|
||||||
this.isShow = false
|
|
||||||
|
|
||||||
this.getList()
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
})
|
|
||||||
},
|
|
||||||
|
|
||||||
cancel (isRefresh) {
|
|
||||||
this.$emit('change', {
|
|
||||||
type: 'list',
|
|
||||||
isRefresh: !!isRefresh
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
.form-flex {
|
.form-flex {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -259,6 +259,8 @@
|
|||||||
this.keys = Object.keys(res.data[0])
|
this.keys = Object.keys(res.data[0])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
this.options.dynamicData = []
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@@ -312,6 +314,8 @@
|
|||||||
this.list = res.data
|
this.list = res.data
|
||||||
this.keys = Object.keys(res.data[0])
|
this.keys = Object.keys(res.data[0])
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
this.options.dynamicData = []
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
58
packages/bigscreen/designer/components/preview.vue
Normal file
58
packages/bigscreen/designer/components/preview.vue
Normal file
@@ -0,0 +1,58 @@
|
|||||||
|
<template>
|
||||||
|
<section class="preview">
|
||||||
|
<ai-dv-wrapper :views="[{label: '返回'}]" :theme="config.theme" @change="$router.back()" v-if="screenId" :title="info.name">
|
||||||
|
<ai-dv-background
|
||||||
|
:theme="config.theme"
|
||||||
|
v-if="config.length || config.theme === '1'"
|
||||||
|
:src="config.theme === '1' ? 'https://cdn.cunwuyun.cn/dvcp/dv/img/dj-bg.png' : config.backgroundImage[0].url">
|
||||||
|
</ai-dv-background>
|
||||||
|
<app-gigscreen-viewer :urlPrefix="urlPrefix" :instance="instance" :dict="dict" :id="screenId"/>
|
||||||
|
</ai-dv-wrapper>
|
||||||
|
</section>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import AppGigscreenViewer from "../../viewer/AppGigscreenViewer";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "preview",
|
||||||
|
components: {AppGigscreenViewer},
|
||||||
|
props: {
|
||||||
|
instance: Function,
|
||||||
|
dict: Object,
|
||||||
|
permissions: Function,
|
||||||
|
urlPrefix: {
|
||||||
|
type: String,
|
||||||
|
default: '/app'
|
||||||
|
}
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
screenId: v => v.$route.query.id
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
info: {},
|
||||||
|
config: {}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
getDvData() {
|
||||||
|
let {id} = this.$route.query
|
||||||
|
this.instance.post(`${this.urlPrefix}/appdiylargescreen/queryLargeScreenDetailById?id=${id}`).then(res => {
|
||||||
|
if (res?.data) {
|
||||||
|
this.info = res.data
|
||||||
|
this.config = JSON.parse(res.data.config).dashboard
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.getDvData()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.preview {
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -537,7 +537,10 @@ const components = [
|
|||||||
{
|
{
|
||||||
content: '中卫慧通',
|
content: '中卫慧通',
|
||||||
lng: 117.1339399,
|
lng: 117.1339399,
|
||||||
lat: 36.7190487
|
lat: 36.7190487,
|
||||||
|
地区: '中卫慧通',
|
||||||
|
经度: 117.1339399,
|
||||||
|
纬度: 36.7190487
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
api: '',
|
api: '',
|
||||||
@@ -613,11 +616,11 @@ const components = [
|
|||||||
dataType: 'staticData',
|
dataType: 'staticData',
|
||||||
staticData: [
|
staticData: [
|
||||||
{
|
{
|
||||||
key: '个人服务办理',
|
label: '个人服务办理',
|
||||||
value: 247
|
value: 247
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
key: '同比上月',
|
label: '同比上月',
|
||||||
value: 247
|
value: 247
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="AppGigscreenViewer">
|
<section class="AppGigscreenViewer">
|
||||||
<div v-if="!component">
|
<div v-if="!component">
|
||||||
<div
|
<div
|
||||||
class="component-item"
|
class="component-item"
|
||||||
@@ -14,21 +14,18 @@
|
|||||||
}"
|
}"
|
||||||
v-for="(item, index) in componentList"
|
v-for="(item, index) in componentList"
|
||||||
:key="index">
|
:key="index">
|
||||||
<RenderElement :instance="instance" :data="item" :index="index" :theme="dashboard.theme"></RenderElement>
|
<ai-dv-render :instance="instance" :data="item" :index="index" :theme="dashboard.theme"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<components v-else :is="component" :dict="dict" :instance="instance" :nav="meta"/>
|
<components v-else :is="component" :dict="dict" :instance="instance" :nav="meta"/>
|
||||||
</div>
|
</section>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
import RenderElement from '../designer/components/RenderElement'
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'AppGigscreenViewer',
|
name: 'AppGigscreenViewer',
|
||||||
label: '大屏预览',
|
label: '大屏预览',
|
||||||
|
|
||||||
props: {
|
props: {
|
||||||
instance: Function,
|
instance: Function,
|
||||||
dict: Object,
|
dict: Object,
|
||||||
@@ -38,17 +35,11 @@ export default {
|
|||||||
default: '/app'
|
default: '/app'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
watch: {
|
watch: {
|
||||||
id(v) {
|
id(v) {
|
||||||
this.getInfo(v)
|
this.getInfo(v)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
components: {
|
|
||||||
RenderElement
|
|
||||||
},
|
|
||||||
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
component: '',
|
component: '',
|
||||||
@@ -65,32 +56,25 @@ export default {
|
|||||||
meta: {}
|
meta: {}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
created() {
|
created() {
|
||||||
this.getInfo(this.id)
|
this.getInfo(this.id)
|
||||||
|
|
||||||
// this.scale = document.body.clientWidth / 1920
|
|
||||||
},
|
},
|
||||||
|
|
||||||
mounted() {
|
mounted() {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
let content = document.querySelector('#dv-full-screen-container')
|
let content = document.querySelector('#dv-full-screen-container')
|
||||||
if (content) {
|
if (content) {
|
||||||
const transform = content.style.transform
|
const transform = content.style.transform
|
||||||
const scale = transform.replace('scale', '').replace('(', '').replace(')', '')
|
const scale = transform.replace('scale', '').replace('(', '').replace(')', '')
|
||||||
|
|
||||||
if (scale == 1) {
|
if (scale == 1) {
|
||||||
this.scale = document.body.clientWidth / 1920
|
this.scale = document.body.clientWidth / 1920
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
getInfo(id) {
|
getInfo(id) {
|
||||||
this.component = null
|
this.component = null
|
||||||
this.instance.post(`${this.urlPrefix}/appdiylargescreen/queryLargeScreenDetailById?id=${id}`).then(res => {
|
id && this.instance.post(`${this.urlPrefix}/appdiylargescreen/queryLargeScreenDetailById?id=${id}`).then(res => {
|
||||||
if (res?.data) {
|
if (res?.data) {
|
||||||
const config = JSON.parse(res.data.config)
|
const config = JSON.parse(res.data.config)
|
||||||
if (config.custom) {
|
if (config.custom) {
|
||||||
@@ -123,7 +107,6 @@ export default {
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
getSourceData(item, index) {
|
getSourceData(item, index) {
|
||||||
const api = item.dataType === 'apiData' ? item.api : `${this.urlPrefix}/appdiylargescreen/statisticsByLsid?id=${item.sourceDataId}`
|
const api = item.dataType === 'apiData' ? item.api : `${this.urlPrefix}/appdiylargescreen/statisticsByLsid?id=${item.sourceDataId}`
|
||||||
this.instance.post(api).then(res => {
|
this.instance.post(api).then(res => {
|
||||||
@@ -174,9 +157,13 @@ export default {
|
|||||||
...obj
|
...obj
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
} else dynamicData = res.data
|
} else {
|
||||||
|
dynamicData = res.data
|
||||||
|
}
|
||||||
}
|
}
|
||||||
this.$set(this.componentList[index], item.dataType, dynamicData)
|
this.$set(this.componentList[index], item.dataType, dynamicData)
|
||||||
|
} else {
|
||||||
|
this.$set(this.componentList[index], item.dataType, [])
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -41,7 +41,7 @@
|
|||||||
</template>
|
</template>
|
||||||
</ai-search-bar>
|
</ai-search-bar>
|
||||||
<ai-table :tableData="tableData" :col-configs="colConfigs" :total="page.total" border :dict="dict" :current.sync="page.current"
|
<ai-table :tableData="tableData" :col-configs="colConfigs" :total="page.total" border :dict="dict" :current.sync="page.current"
|
||||||
:size.sync="page.size" @getDetail="getDetail"/>
|
:size.sync="page.size" @getList="getDetail"/>
|
||||||
</template>
|
</template>
|
||||||
</ai-card>
|
</ai-card>
|
||||||
</template>
|
</template>
|
||||||
|
|||||||
@@ -4,18 +4,15 @@
|
|||||||
<ai-title slot="title" title="广播设备管理" isShowBottomBorder/>
|
<ai-title slot="title" title="广播设备管理" isShowBottomBorder/>
|
||||||
<template #content>
|
<template #content>
|
||||||
<ai-search-bar bottomBorder>
|
<ai-search-bar bottomBorder>
|
||||||
|
<template slot="left">
|
||||||
|
<el-button type="primary" icon="iconfont iconResetting" @click="update" :loading="btnLoading">更新数据</el-button>
|
||||||
|
</template>
|
||||||
<template slot="right">
|
<template slot="right">
|
||||||
<el-input v-model="search.name" size="small" placeholder="设备名称/设备编号" clearable
|
<el-input v-model="search.name" size="small" placeholder="设备名称/设备编号" clearable
|
||||||
v-throttle="() => {page.current = 1, getList()}"
|
v-throttle="() => {page.current = 1, getList()}"
|
||||||
@clear=";(page.current = 1), (search.name = ''), getList()" suffix-icon="iconfont iconSearch"/>
|
@clear=";(page.current = 1), (search.name = ''), getList()" suffix-icon="iconfont iconSearch"/>
|
||||||
</template>
|
</template>
|
||||||
</ai-search-bar>
|
</ai-search-bar>
|
||||||
<ai-search-bar class="ai-search-ba mar-t10">
|
|
||||||
<template slot="left">
|
|
||||||
<!-- <el-button icon="iconfont" type="primary" size="small">数据同步</el-button> -->
|
|
||||||
<!-- <el-button icon="iconfont iconDelete" size="small" @click="removeAll" :disabled="ids.length == 0">删除 </el-button> -->
|
|
||||||
</template>
|
|
||||||
</ai-search-bar>
|
|
||||||
<ai-table :tableData="tableData" :col-configs="colConfigs" :total="total" ref="aitableex"
|
<ai-table :tableData="tableData" :col-configs="colConfigs" :total="total" ref="aitableex"
|
||||||
:current.sync="page.current" :size.sync="page.size" @getList="getList"
|
:current.sync="page.current" :size.sync="page.size" @getList="getList"
|
||||||
@selection-change="(v) => (ids = v.map((e) => e.id))">
|
@selection-change="(v) => (ids = v.map((e) => e.id))">
|
||||||
@@ -114,6 +111,7 @@ export default {
|
|||||||
areaId: '',
|
areaId: '',
|
||||||
bindVisible: false,
|
bindVisible: false,
|
||||||
changeInfo: {},
|
changeInfo: {},
|
||||||
|
btnLoading: false,
|
||||||
locate: false
|
locate: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -198,6 +196,22 @@ export default {
|
|||||||
},
|
},
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
update () {
|
||||||
|
this.btnLoading = true
|
||||||
|
this.instance.post(`/app/appdlbquipment/sync`, null, {
|
||||||
|
timeout: 1000000
|
||||||
|
}).then(res => {
|
||||||
|
if (res.code == 0) {
|
||||||
|
this.$message.success('更新成功')
|
||||||
|
this.getList()
|
||||||
|
}
|
||||||
|
|
||||||
|
this.btnLoading = false
|
||||||
|
}).catch(() => {
|
||||||
|
|
||||||
|
this.btnLoading = false
|
||||||
|
})
|
||||||
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<section class="AppISManage">
|
<section class="AppISManage">
|
||||||
<device-slider :permissions="permissions" :show.sync="slider" :ins="instance" :dict="dict" @treeCommand="handleSliderOption" @select="handleSelectMonitor" :render-item="renderTreeItem" ref="DeviceSlider" />
|
<device-slider :permissions="permissions" :show.sync="slider" :instance="instance" :dict="dict" @treeCommand="handleSliderOption" @select="handleSelectMonitor" :render-item="renderTreeItem" ref="DeviceSlider" />
|
||||||
<div class="monitorPane" v-loading="isLoading" element-loading-background="rgba(0, 0, 0, 0.6)">
|
<div class="monitorPane" v-loading="isLoading" element-loading-background="rgba(0, 0, 0, 0.6)">
|
||||||
<div class="headerBar">
|
<div class="headerBar">
|
||||||
<el-select default-first-option size="small" v-model="splitScreen" @change="onChange">
|
<el-select default-first-option size="small" v-model="splitScreen" @change="onChange">
|
||||||
@@ -54,8 +54,7 @@
|
|||||||
splitOps() {
|
splitOps() {
|
||||||
return [
|
return [
|
||||||
{ label: '单分屏', value: 1, per: '100%' },
|
{ label: '单分屏', value: 1, per: '100%' },
|
||||||
{ label: '四分屏', value: 4, per: '49.2%' },
|
{ label: '四分屏', value: 4, per: '49.2%' }
|
||||||
{ label: '九分屏', value: 9, per: '32%' },
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
currentSplitStyle() {
|
currentSplitStyle() {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<section class="AppISMap">
|
<section class="AppISMap">
|
||||||
<device-slider :show.sync="slider" :ins="instance" :dict="dict" @list="v=>list=v" @select="markerClickEvent"/>
|
<device-slider :show.sync="slider" :instance="instance" :dict="dict" @list="v=>list=v" @select="markerClickEvent"/>
|
||||||
<div id="amap"/>
|
<div id="amap"/>
|
||||||
<div ref="selectedInfoWin" class="selected">
|
<div ref="selectedInfoWin" class="selected">
|
||||||
<b>{{ selected.deviceName }}</b>
|
<b>{{ selected.deviceName }}</b>
|
||||||
|
|||||||
@@ -22,7 +22,10 @@
|
|||||||
prefix-icon="el-icon-search"
|
prefix-icon="el-icon-search"
|
||||||
@clear="search.name = '', handleTreeFilter()" clearable/>
|
@clear="search.name = '', handleTreeFilter()" clearable/>
|
||||||
</div>
|
</div>
|
||||||
<div title>设备列表</div>
|
<div title>
|
||||||
|
<div>设备列表</div>
|
||||||
|
<el-button type="text" icon="iconfont iconResetting" @click="updateDev" size="mini" :loading="btnLoading">刷新</el-button>
|
||||||
|
</div>
|
||||||
<div fill class="deviceList">
|
<div fill class="deviceList">
|
||||||
<el-tree ref="deviceTree" highlight-current :render-content="renderItem" :data="treeData" :props="propsConfig"
|
<el-tree ref="deviceTree" highlight-current :render-content="renderItem" :data="treeData" :props="propsConfig"
|
||||||
@node-click="handleNodeClick" @node-contextmenu="nodeContextmenu"
|
@node-click="handleNodeClick" @node-contextmenu="nodeContextmenu"
|
||||||
@@ -48,10 +51,10 @@ export default {
|
|||||||
name: "deviceSlider",
|
name: "deviceSlider",
|
||||||
props: {
|
props: {
|
||||||
show: Boolean,
|
show: Boolean,
|
||||||
ins: Function,
|
instance: Function,
|
||||||
dict: Object,
|
dict: Object,
|
||||||
permissions: Function,
|
permissions: Function,
|
||||||
renderItem: Function
|
renderItem: Function,
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
overview() {
|
overview() {
|
||||||
@@ -98,7 +101,8 @@ export default {
|
|||||||
x: '',
|
x: '',
|
||||||
y: '',
|
y: '',
|
||||||
node: {}
|
node: {}
|
||||||
}
|
},
|
||||||
|
btnLoading: false,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@@ -110,8 +114,10 @@ export default {
|
|||||||
this.isShowMenu = false
|
this.isShowMenu = false
|
||||||
},
|
},
|
||||||
getDevices() {
|
getDevices() {
|
||||||
this.ins.post("/app/appzyvideoequipment/tree", null, {
|
this.instance.post(`/app/appzyvideoequipment/tree`, null, {
|
||||||
params: {size: 999}
|
params: {
|
||||||
|
size: 999
|
||||||
|
}
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
if (res?.data) {
|
if (res?.data) {
|
||||||
this.staData = res.data.count
|
this.staData = res.data.count
|
||||||
@@ -122,6 +128,21 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
updateDev() {
|
||||||
|
this.btnLoading = true
|
||||||
|
this.instance.post(`/app/appzyvideoequipment/sync`, null, {
|
||||||
|
timeout: 1000000
|
||||||
|
}).then(res => {
|
||||||
|
if (res.code == 0) {
|
||||||
|
this.$message.success('更新成功')
|
||||||
|
this.getDevices()
|
||||||
|
}
|
||||||
|
this.btnLoading = false
|
||||||
|
}).catch(() => {
|
||||||
|
this.btnLoading = false
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
handleTreeCommand(e, node) {
|
handleTreeCommand(e, node) {
|
||||||
this.$emit('treeCommand', {
|
this.$emit('treeCommand', {
|
||||||
type: e,
|
type: e,
|
||||||
@@ -154,14 +175,16 @@ export default {
|
|||||||
handleTreeFilter() {
|
handleTreeFilter() {
|
||||||
this.$refs.deviceTree?.filter(this.search.name)
|
this.$refs.deviceTree?.filter(this.search.name)
|
||||||
},
|
},
|
||||||
|
|
||||||
onChange() {
|
onChange() {
|
||||||
this.$refs.deviceTree?.filter(this.search.name)
|
this.$refs.deviceTree?.filter(this.search.name)
|
||||||
}
|
},
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
created() {
|
created() {
|
||||||
this.dict.load("deviceStatus")
|
this.$dict.load("deviceStatus").then(()=>{
|
||||||
this.getDevices()
|
this.getDevices()
|
||||||
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
mounted() {
|
mounted() {
|
||||||
@@ -247,6 +270,18 @@ export default {
|
|||||||
background: #3E4A69;
|
background: #3E4A69;
|
||||||
padding: 0 16px;
|
padding: 0 16px;
|
||||||
line-height: 28px;
|
line-height: 28px;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
|
::v-deep .el-button {
|
||||||
|
padding: 0 4px;
|
||||||
|
height: 28px;
|
||||||
|
background: #3E4A69;
|
||||||
|
}
|
||||||
|
::v-deep .el-button:hover {
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
::v-deep.deviceList {
|
::v-deep.deviceList {
|
||||||
|
|||||||
@@ -57,8 +57,8 @@ export default {
|
|||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.communityOverview {
|
.communityOverview {
|
||||||
max-width: 400px;
|
max-width: 400px;
|
||||||
max-height: 700px;
|
max-height: 600px;
|
||||||
overflow-y: auto;
|
overflow-y: auto!important;
|
||||||
|
|
||||||
.units {
|
.units {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|||||||
@@ -57,8 +57,8 @@ export default {
|
|||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.communityOverview {
|
.communityOverview {
|
||||||
max-width: 400px;
|
max-width: 400px;
|
||||||
max-height: 700px;
|
max-height: 600px;
|
||||||
overflow-y: auto;
|
overflow-y: auto!important;
|
||||||
|
|
||||||
.units {
|
.units {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|||||||
@@ -5,6 +5,7 @@
|
|||||||
* @param params showList:打印加载的应用;apps:加载的应用文件名数组
|
* @param params showList:打印加载的应用;apps:加载的应用文件名数组
|
||||||
*/
|
*/
|
||||||
import core from './core.import'
|
import core from './core.import'
|
||||||
|
import dvui from '../project/dvui/entries'
|
||||||
|
|
||||||
const install = function (Vue, params) {
|
const install = function (Vue, params) {
|
||||||
if (install.installed) return
|
if (install.installed) return
|
||||||
@@ -31,6 +32,7 @@ const install = function (Vue, params) {
|
|||||||
apps.push(app.component)
|
apps.push(app.component)
|
||||||
Vue.component(app.name, app.component)
|
Vue.component(app.name, app.component)
|
||||||
})
|
})
|
||||||
|
Vue.use(dvui)
|
||||||
return Promise.resolve(apps)
|
return Promise.resolve(apps)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -95,9 +95,11 @@
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
remove(id) {
|
remove(ids) {
|
||||||
this.$confirm('确定删除该数据?').then(() => {
|
this.$confirm('确定删除该数据?').then(() => {
|
||||||
this.instance.post(`/app/appjob/delete?id=${id}`).then(res => {
|
this.instance.post(`/app/appjob/delete`,null,{
|
||||||
|
params:{ids}
|
||||||
|
}).then(res => {
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
this.$message.success('删除成功!')
|
this.$message.success('删除成功!')
|
||||||
this.getList()
|
this.getList()
|
||||||
|
|||||||
@@ -45,7 +45,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<ai-wechat-selecter slot="append" :instance="instance" :props="{id:'wxUserId',label:'name'}"
|
<ai-wechat-selecter slot="append" :instance="instance" :props="{id:'wxUserId',label:'name'}"
|
||||||
v-model="item.candidateList" v-if="item.candidateApproverType==1">
|
v-model="item.candidateList" v-if="item.candidateApproverType==1">
|
||||||
<el-button size="mini" type="primary">选择指定人员</el-button>
|
<el-button size="mini" type="primary">选择指定人员</el-button>
|
||||||
</ai-wechat-selecter>
|
</ai-wechat-selecter>
|
||||||
</div>
|
</div>
|
||||||
@@ -53,8 +53,8 @@
|
|||||||
</el-steps>
|
</el-steps>
|
||||||
</template>
|
</template>
|
||||||
</ai-card>
|
</ai-card>
|
||||||
<el-dialog :title="titleType" class="editStyle" :visible.sync="isAddStep" width="575px" height="380px"
|
<ai-dialog :title="titleType" class="editStyle" :visible.sync="isAddStep" width="575px" height="380px"
|
||||||
:close-on-click-modal="false">
|
:close-on-click-modal="false" @onConfirm="saveAddProgress('addForm')">
|
||||||
<el-form :model="nodeObj" label-width="120px" ref="addForm" :rules="addRules">
|
<el-form :model="nodeObj" label-width="120px" ref="addForm" :rules="addRules">
|
||||||
<el-form-item label="审批步骤名称:" prop="nodeName">
|
<el-form-item label="审批步骤名称:" prop="nodeName">
|
||||||
<el-input size="small" v-model="nodeObj.nodeName" placeholder="如:部门主管审批(限10个字)" :maxLength="10"
|
<el-input size="small" v-model="nodeObj.nodeName" placeholder="如:部门主管审批(限10个字)" :maxLength="10"
|
||||||
@@ -87,12 +87,7 @@
|
|||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
<div slot="footer" style="text-align: center;">
|
</ai-dialog>
|
||||||
<el-button style="width: 92px;" size="small" @click="isAddStep = false">取消</el-button>
|
|
||||||
<el-button style="width: 92px;" size="small" type="primary" @click="saveAddProgress('addForm')">确认
|
|
||||||
</el-button>
|
|
||||||
</div>
|
|
||||||
</el-dialog>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -175,7 +170,6 @@ export default {
|
|||||||
this.titleType = '编辑审批步骤';
|
this.titleType = '编辑审批步骤';
|
||||||
item.nodeType = item.nodeType * 1;
|
item.nodeType = item.nodeType * 1;
|
||||||
item.candidateApproverType = item.candidateApproverType * 1;
|
item.candidateApproverType = item.candidateApproverType * 1;
|
||||||
item.scopeCandidates = item.scopeCandidates * 1;
|
|
||||||
this.nodeObj = JSON.parse(JSON.stringify(item));
|
this.nodeObj = JSON.parse(JSON.stringify(item));
|
||||||
} else {
|
} else {
|
||||||
this.titleType = '添加审批步骤';
|
this.titleType = '添加审批步骤';
|
||||||
@@ -188,7 +182,7 @@ export default {
|
|||||||
saveAddProgress(formName) {
|
saveAddProgress(formName) {
|
||||||
this.$refs[formName].validate((valid) => {
|
this.$refs[formName].validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
if (this.nodeObj.scopeCandidates == 0) this.nodeObj.candidateList = [];
|
if (this.nodeObj.scopeCandidates == '0') this.nodeObj.candidateList = [];
|
||||||
if (this.indexType == 1) {
|
if (this.indexType == 1) {
|
||||||
this.form.processNodeList.push(JSON.parse(JSON.stringify(this.nodeObj)));
|
this.form.processNodeList.push(JSON.parse(JSON.stringify(this.nodeObj)));
|
||||||
} else {
|
} else {
|
||||||
@@ -206,7 +200,7 @@ export default {
|
|||||||
nodeIndex: '',
|
nodeIndex: '',
|
||||||
nodeName: '',
|
nodeName: '',
|
||||||
nodeType: '',
|
nodeType: '',
|
||||||
scopeCandidates: ''
|
scopeCandidates: '1'
|
||||||
};
|
};
|
||||||
this.$refs['addForm'].resetFields();
|
this.$refs['addForm'].resetFields();
|
||||||
},
|
},
|
||||||
|
|||||||
50
packages/wxwork/AppMassNotification/AppMassNotification.vue
Normal file
50
packages/wxwork/AppMassNotification/AppMassNotification.vue
Normal file
@@ -0,0 +1,50 @@
|
|||||||
|
<template>
|
||||||
|
<section class="AppMassNotification">
|
||||||
|
<keep-alive :include="['List']">
|
||||||
|
<component ref="component" :is="currentPage" :instance="instance" :params="params" :dict="dict" @change="onChange"/>
|
||||||
|
</keep-alive>
|
||||||
|
</section>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import List from "./components/List.vue";
|
||||||
|
import Add from "./components/Add.vue";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: "AppMassNotification",
|
||||||
|
label: "群发通知",
|
||||||
|
props: {
|
||||||
|
instance: Function,
|
||||||
|
dict: Object,
|
||||||
|
},
|
||||||
|
components: {Add, List},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
component: "List",
|
||||||
|
params: {},
|
||||||
|
include: [],
|
||||||
|
}
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
currentPage() {
|
||||||
|
const {hash} = this.$route
|
||||||
|
return hash == "#add" ? Add : List
|
||||||
|
},
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
onChange(data) {
|
||||||
|
if (data.type === "Add") {
|
||||||
|
this.$router.push({hash: "#add", query: data.params})
|
||||||
|
} else {
|
||||||
|
this.$router.push({})
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.AppMassNotification {
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
422
packages/wxwork/AppMassNotification/components/Add.vue
Normal file
422
packages/wxwork/AppMassNotification/components/Add.vue
Normal file
@@ -0,0 +1,422 @@
|
|||||||
|
<template>
|
||||||
|
<section class="Add">
|
||||||
|
<ai-detail v-if="!$route.query.id">
|
||||||
|
<template slot="title">
|
||||||
|
<ai-title title="群发通知" isShowBack isShowBottomBorder @onBackClick="cancel(false)"></ai-title>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<template slot="content">
|
||||||
|
<ai-card>
|
||||||
|
<template #title>
|
||||||
|
<div class="ai-card__title">
|
||||||
|
<h2>发送条件</h2>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<template #content>
|
||||||
|
<el-form size="small" class="ai-form" :rules="rules" ref="form" :model="form" label-width="100px" label-position="right">
|
||||||
|
<el-form-item label="发送方式" prop="messageSource" style="width: 50%">
|
||||||
|
<el-radio-group v-model="form.messageSource" @change="sourceChange" >
|
||||||
|
<el-radio label="2">居民群</el-radio>
|
||||||
|
<el-radio label="1">居民</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="地区选择" style="width: 100%">
|
||||||
|
<ai-area-get v-model="areaId" :root="areaRootId" :instance="instance" @select="handleAreaSelect" multiple size="small" placeholder="请选择"/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="发送范围" prop="deptList" style="width: 100%">
|
||||||
|
<select-dept-user v-model="form.deptList" v-bind="$props" :source="form.messageSource"/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</template>
|
||||||
|
</ai-card>
|
||||||
|
|
||||||
|
<ai-card title="群发消息设置">
|
||||||
|
<template #content>
|
||||||
|
<el-form class="ai-form" ref="form" :rules="rules" :model="form" label-width="110px" label-position="right">
|
||||||
|
<el-form-item class="el-form-item__textarea" label="群发内容" prop="content" style="width: 100%">
|
||||||
|
<el-input type="textarea" placeholder="请输入…" v-model="form.content" maxlength="1000" :rows="5" show-word-limit></el-input>
|
||||||
|
</el-form-item>
|
||||||
|
<!-- 图片 -->
|
||||||
|
<el-form-item label="图片" style="width: 100%">
|
||||||
|
<ai-uploader :instance="instance" isWechat v-model="imgList" multiple acceptType=".jpg,.png,.jpeg" :limit="9"
|
||||||
|
url="/app/wxcp/upload/uploadFile?type=image"></ai-uploader>
|
||||||
|
</el-form-item>
|
||||||
|
<!-- 视频 -->
|
||||||
|
<el-form-item label="视频" style="width: 100%">
|
||||||
|
<ai-uploader :instance="instance" fileType="file" isWechat multiple acceptType=".mp4" v-model="videoList" :limit="9"
|
||||||
|
url="/app/wxcp/upload/uploadFile?type=video"></ai-uploader>
|
||||||
|
</el-form-item>
|
||||||
|
<!-- 附件 -->
|
||||||
|
<el-form-item label="附件" style="width: 100%">
|
||||||
|
<ai-uploader :instance="instance" fileType="file" isWechat multiple v-model="filesList" :limit="9"
|
||||||
|
url="/app/wxcp/upload/uploadFile?type=file"></ai-uploader>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
</template>
|
||||||
|
</ai-card>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<template #footer>
|
||||||
|
<el-button @click="cancel">取消</el-button>
|
||||||
|
<el-button type="primary" @click="confirm">确认发送</el-button>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
</ai-detail>
|
||||||
|
|
||||||
|
<ai-detail class="add" v-if="$route.query.id">
|
||||||
|
<template slot="title">
|
||||||
|
<ai-title title="群发通知详情" isShowBack isShowBottomBorder @onBackClick="cancel(false)"></ai-title>
|
||||||
|
</template>
|
||||||
|
<template slot="content">
|
||||||
|
<ai-card title="详情">
|
||||||
|
<template #content>
|
||||||
|
<ai-wrapper>
|
||||||
|
<ai-info-item label="创建者" :value="data.userName" isLine></ai-info-item>
|
||||||
|
<ai-info-item label="发送方式" :value="data.messageSource" isLine>{{ data.messageSource | format }}</ai-info-item>
|
||||||
|
</ai-wrapper>
|
||||||
|
|
||||||
|
<ai-wrapper v-for="item in data.fileList" :key="item.id">
|
||||||
|
<ai-info-item label="群发内容" :value="item.content" isLine v-if="item.contentType == 'text'"></ai-info-item>
|
||||||
|
</ai-wrapper>
|
||||||
|
|
||||||
|
<!-- <ai-wrapper v-for="item in data.fileList" :key="item.id">
|
||||||
|
<ai-info-item label="图片" isLine v-if="item.contentType == 'image'">
|
||||||
|
<ai-uploader v-model="images" :instance="instance" :limit="9" disabled/>
|
||||||
|
</ai-info-item>
|
||||||
|
</ai-wrapper>
|
||||||
|
|
||||||
|
<ai-wrapper v-for="item in data.fileList" :key="item.id">
|
||||||
|
<ai-info-item label="视频" isLine v-if="item.contentType == 'video'">
|
||||||
|
<video :src="item.accessUrl" style="width: 100%; height:100%; object-fit: fill;" muted controls="controls"></video>
|
||||||
|
</ai-info-item>
|
||||||
|
</ai-wrapper>
|
||||||
|
|
||||||
|
<ai-wrapper v-for="item in data.fileList" :key="item.id">
|
||||||
|
<ai-info-item label="附件" isLine v-if="item.contentType == 'file'">
|
||||||
|
<ai-file-list :fileList="fileDownLoad"></ai-file-list>
|
||||||
|
</ai-info-item>
|
||||||
|
</ai-wrapper> -->
|
||||||
|
<ai-wrapper>
|
||||||
|
<ai-info-item label="图片" isLine v-show="images.length">
|
||||||
|
<ai-uploader v-model="images" :instance="instance" :limit="9" disabled/>
|
||||||
|
</ai-info-item>
|
||||||
|
</ai-wrapper>
|
||||||
|
|
||||||
|
<ai-wrapper>
|
||||||
|
<ai-info-item label="视频" isLine v-show="videoArr.length" v-for="(item,index) in videoArr" :key="index">
|
||||||
|
<video :src="item.accessUrl" style="width: 100%; height:100%; object-fit: fill;" muted controls="controls"></video>
|
||||||
|
</ai-info-item>
|
||||||
|
</ai-wrapper>
|
||||||
|
|
||||||
|
<ai-wrapper>
|
||||||
|
<ai-info-item label="附件" isLine v-show="fileDownLoad.length">
|
||||||
|
<ai-file-list :fileList="fileDownLoad"></ai-file-list>
|
||||||
|
</ai-info-item>
|
||||||
|
</ai-wrapper>
|
||||||
|
|
||||||
|
</template>
|
||||||
|
</ai-card>
|
||||||
|
</template>
|
||||||
|
</ai-detail>
|
||||||
|
</section>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import {mapState} from "vuex";
|
||||||
|
import SelectDeptUser from "./SelectDeptUser";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
name: 'Add',
|
||||||
|
components: {SelectDeptUser},
|
||||||
|
props: {
|
||||||
|
instance: Function,
|
||||||
|
dict: Object
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
isShow: false,
|
||||||
|
data: {},
|
||||||
|
form: {
|
||||||
|
areaId: '',
|
||||||
|
tag: '',
|
||||||
|
messageSource: '2',
|
||||||
|
sendTime: '',
|
||||||
|
content: '',
|
||||||
|
contentType: 'text',
|
||||||
|
fileList: [],
|
||||||
|
organization: '',
|
||||||
|
deptList: [],
|
||||||
|
},
|
||||||
|
tags: [],
|
||||||
|
subTags: {},
|
||||||
|
areaId: [],
|
||||||
|
areaName: [],
|
||||||
|
imgList: [],
|
||||||
|
videoList: [],
|
||||||
|
filesList: [],
|
||||||
|
fileDownLoad: [],
|
||||||
|
areaRootId: '',
|
||||||
|
users: [],
|
||||||
|
images: [],
|
||||||
|
imgs: [],
|
||||||
|
videos: [],
|
||||||
|
videoArr: [],
|
||||||
|
files: [],
|
||||||
|
rules: {
|
||||||
|
deptList: [{required: true, message: '请选择发送范围'}],
|
||||||
|
content: [{required: true, message: '请输入群发内容'}],
|
||||||
|
messageSource: [{required: true, message: '请选择群发方式'}],
|
||||||
|
},
|
||||||
|
}
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
...mapState(['user']),
|
||||||
|
tagsChange() {
|
||||||
|
if (this.tags?.length) {
|
||||||
|
return this.form.tag = this.tags.toString();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
areaid() {
|
||||||
|
return this.form.areaId = this.areaId.toString();
|
||||||
|
},
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
if (this.$route.query.id) {
|
||||||
|
this.getInfo()
|
||||||
|
}
|
||||||
|
this.areaRootId = [this.user.info.areaId.substr(0, 6), '000000'].join("")
|
||||||
|
},
|
||||||
|
filters: {
|
||||||
|
format(val) {
|
||||||
|
if(val == 1) {
|
||||||
|
return '居民'
|
||||||
|
} else if(val == 2) {
|
||||||
|
return '居民群'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
handleAreaSelect(v) {
|
||||||
|
this.areaName = v?.[0]?.label
|
||||||
|
},
|
||||||
|
sourceChange(val) {
|
||||||
|
this.form.messageSource = val
|
||||||
|
this.form.deptList = []
|
||||||
|
},
|
||||||
|
getInfo() {
|
||||||
|
this.instance.post(`/app/pushmessage/detail?id=${this.$route.query.id}`).then(res => {
|
||||||
|
if (res?.data) {
|
||||||
|
this.data = res.data
|
||||||
|
// this.images = [{url: res.data.fileList.filter(e => e.contentType == "image").map().accessUrl}]
|
||||||
|
// this.fileDownLoad = [{url: res.data.fileList.filter(e => e.contentType == "file")[0]?.accessUrl}]
|
||||||
|
this.images = res.data.fileList.filter(e => e.contentType == "image")?.map(i => {
|
||||||
|
return {
|
||||||
|
url: i.accessUrl
|
||||||
|
}
|
||||||
|
})
|
||||||
|
this.fileDownLoad = res.data.fileList.filter(e => e.contentType == "file")?.map(v => {
|
||||||
|
return {
|
||||||
|
url: v.accessUrl
|
||||||
|
}
|
||||||
|
})
|
||||||
|
if (res.data.fileList.filter(e => e.contentType == "video")) {
|
||||||
|
this.videoArr = res.data.fileList.filter(e => e.contentType == "video")
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
confirm() {
|
||||||
|
if(!this.form.deptList.length) {
|
||||||
|
return this.$message.error('请选择发送范围')
|
||||||
|
}
|
||||||
|
this.$refs.form.validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
|
this.form.fileList = []
|
||||||
|
let contentList = [{
|
||||||
|
content: this.form.content,
|
||||||
|
contentType: 'text'
|
||||||
|
}]
|
||||||
|
|
||||||
|
if (this.imgList.length) {
|
||||||
|
this.imgs = this.imgList.map(item => {
|
||||||
|
return {
|
||||||
|
contentType: 'image',
|
||||||
|
mediaId: item.media.mediaId,
|
||||||
|
accessUrl: item.url,
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.videoList.length) {
|
||||||
|
this.videos = this.videoList.map(item => {
|
||||||
|
return {
|
||||||
|
contentType: 'video',
|
||||||
|
mediaId: item.media.mediaId,
|
||||||
|
accessUrl: item.url,
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
if (this.filesList.length) {
|
||||||
|
this.files = this.filesList.map(item => {
|
||||||
|
return {
|
||||||
|
contentType: 'file',
|
||||||
|
mediaId: item.media.mediaId,
|
||||||
|
accessUrl: item.url,
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
this.form.fileList = [...contentList, ...this.imgs, ...this.videos, ...this.files]
|
||||||
|
this.instance.post(`/app/pushmessage/addOrUpdate`, {
|
||||||
|
...this.form
|
||||||
|
}).then(res => {
|
||||||
|
if (res.code == 0) {
|
||||||
|
this.$message.success('提交成功')
|
||||||
|
setTimeout(() => {
|
||||||
|
this.cancel(true)
|
||||||
|
}, 600)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
cancel(isRefresh) {
|
||||||
|
this.$emit('change', {
|
||||||
|
type: 'List',
|
||||||
|
isRefresh: !!isRefresh
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped lang="scss">
|
||||||
|
.Add {
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ai-card__title {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
|
||||||
|
h2 {
|
||||||
|
margin-right: 20px;
|
||||||
|
color: #222222;
|
||||||
|
font-size: 16px;
|
||||||
|
font-weight: 700;
|
||||||
|
}
|
||||||
|
|
||||||
|
span {
|
||||||
|
color: #888888;
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.appletss {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
|
||||||
|
.applets-item {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
width: 400px;
|
||||||
|
height: 60px;
|
||||||
|
margin-right: 8px;
|
||||||
|
margin-bottom: 8px;
|
||||||
|
padding: 0 17px;
|
||||||
|
background: #FFFFFF;
|
||||||
|
border-radius: 2px;
|
||||||
|
border: 1px solid #D0D4DC;
|
||||||
|
cursor: pointer;
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
border-color: #2266FF;
|
||||||
|
}
|
||||||
|
|
||||||
|
::v-deep {
|
||||||
|
.el-radio__label {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
img {
|
||||||
|
width: 40px;
|
||||||
|
height: 40px;
|
||||||
|
margin: 0 8px 0 13px;
|
||||||
|
}
|
||||||
|
|
||||||
|
span {
|
||||||
|
color: #222222;
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-radio {
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.applets-active {
|
||||||
|
border-color: #2266FF;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.tips {
|
||||||
|
position: relative;
|
||||||
|
top: 2px;
|
||||||
|
padding-left: 8px;
|
||||||
|
color: #222222;
|
||||||
|
font-size: 14px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-form-item-item__textarea {
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
.el-form-item__btn {
|
||||||
|
position: absolute;
|
||||||
|
bottom: 12px;
|
||||||
|
left: 12px;
|
||||||
|
line-height: 1;
|
||||||
|
z-index: 1;
|
||||||
|
color: #2266FF;
|
||||||
|
font-size: 14px;
|
||||||
|
user-select: none;
|
||||||
|
background: #fff;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tags {
|
||||||
|
// padding: 10px;
|
||||||
|
.tag_title {
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
|
||||||
|
.tag_item {
|
||||||
|
margin: 5px 0;
|
||||||
|
|
||||||
|
span {
|
||||||
|
display: inline-block;
|
||||||
|
// padding: 5px 10px;
|
||||||
|
width: 80px;
|
||||||
|
text-align: center;
|
||||||
|
height: 30px;
|
||||||
|
line-height: 30px;
|
||||||
|
background: #DDD;
|
||||||
|
color: #333;
|
||||||
|
border-radius: 4px;
|
||||||
|
margin-right: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.active {
|
||||||
|
background: #53bcea;
|
||||||
|
color: #FFFFFF;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
</style>
|
||||||
@@ -233,6 +233,7 @@
|
|||||||
handleNodeClick (e) {
|
handleNodeClick (e) {
|
||||||
this.girdLevel = e.girdLevel
|
this.girdLevel = e.girdLevel
|
||||||
this.isLoading = true
|
this.isLoading = true
|
||||||
|
console.log(e)
|
||||||
this.getGirdInfo(e.id, e.girdLevel)
|
this.getGirdInfo(e.id, e.girdLevel)
|
||||||
this.getStatisticsInfo(e.id)
|
this.getStatisticsInfo(e.id)
|
||||||
},
|
},
|
||||||
@@ -341,43 +342,16 @@
|
|||||||
this.y = '50%'
|
this.y = '50%'
|
||||||
},
|
},
|
||||||
|
|
||||||
getGirdInfo (id, level) {
|
getGirdInfo (id) {
|
||||||
this.instance.post(`/app/appgirdinfo/listAllGirdAndMemberByTop?id=${id || ''}`).then((res) => {
|
this.instance.post(`/app/appgirdinfo/listAllGirdAndMemberByTop?id=${id || ''}`).then((res) => {
|
||||||
if (res.code == 0) {
|
if (res.code == 0) {
|
||||||
const chartData = this.formatList(res.data)
|
const chartData = this.formatList([res.data])
|
||||||
if (res.data && res.data[0] && res.data[0].parentGirdInfo) {
|
console.log(chartData)
|
||||||
const parentGirdInfo = res.data[0].parentGirdInfo
|
this.chartData = chartData
|
||||||
const girdMemberList = parentGirdInfo.girdMemberManageList ? parentGirdInfo.girdMemberManageList.map(v => {
|
|
||||||
return {
|
|
||||||
...v,
|
|
||||||
label: v.name,
|
|
||||||
id: v.id,
|
|
||||||
checkType: '2',
|
|
||||||
girdName: parentGirdInfo.girdName,
|
|
||||||
girdLevel: parentGirdInfo.girdLevel,
|
|
||||||
isUser: true
|
|
||||||
}
|
|
||||||
}) : [{
|
|
||||||
label: '-',
|
|
||||||
id: parentGirdInfo.id,
|
|
||||||
girdLevel: parentGirdInfo.girdLevel,
|
|
||||||
girdName: parentGirdInfo.girdName
|
|
||||||
}]
|
|
||||||
this.chartData = [{
|
|
||||||
label: parentGirdInfo.girdName,
|
|
||||||
id: parentGirdInfo.id,
|
|
||||||
girdLevel: parentGirdInfo.girdLevel,
|
|
||||||
isUser: false,
|
|
||||||
children: chartData,
|
|
||||||
userList: girdMemberList
|
|
||||||
}]
|
|
||||||
} else {
|
|
||||||
this.chartData = chartData
|
|
||||||
}
|
|
||||||
|
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
if (level === '2') {
|
if (id) {
|
||||||
this.getUserList(id)
|
this.getUserList(id, chartData[0].id)
|
||||||
} else {
|
} else {
|
||||||
this.isLoading = false
|
this.isLoading = false
|
||||||
this.autoScale()
|
this.autoScale()
|
||||||
@@ -387,7 +361,7 @@
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
getUserList (id) {
|
getUserList (id, parentId) {
|
||||||
this.instance.post(`/app/appgirdmemberresident/listByGirdMember`, null, {
|
this.instance.post(`/app/appgirdmemberresident/listByGirdMember`, null, {
|
||||||
params: {
|
params: {
|
||||||
size: 1000,
|
size: 1000,
|
||||||
@@ -410,7 +384,7 @@
|
|||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
const node = this.$refs.VueOkrTree.getNode(id)
|
const node = this.$refs.VueOkrTree.getNode(parentId)
|
||||||
this.$refs.VueOkrTree.append({
|
this.$refs.VueOkrTree.append({
|
||||||
id: new Date().getTime(),
|
id: new Date().getTime(),
|
||||||
label: '子节点',
|
label: '子节点',
|
||||||
|
|||||||
@@ -57,8 +57,8 @@ export default {
|
|||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
.communityOverview {
|
.communityOverview {
|
||||||
max-width: 400px;
|
max-width: 400px;
|
||||||
max-height: 700px;
|
max-height: 600px;
|
||||||
overflow-y: auto;
|
overflow-y: auto!important;
|
||||||
|
|
||||||
.units {
|
.units {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|||||||
@@ -4,8 +4,8 @@
|
|||||||
<ai-title slot="title" title="审批详情" isShowBack isShowBottomBorder @onBackClick="approval.goBack()">
|
<ai-title slot="title" title="审批详情" isShowBack isShowBottomBorder @onBackClick="approval.goBack()">
|
||||||
<template #rightBtn>
|
<template #rightBtn>
|
||||||
<template v-if="listType==0&&$permissions('zwsp_oaapprovalapplyinfo_approve')">
|
<template v-if="listType==0&&$permissions('zwsp_oaapprovalapplyinfo_approve')">
|
||||||
<el-button size="small" class="iconfont iconClean del-btn-list" @click="agreeRefulse(0)">拒绝</el-button>
|
<el-button size="small" icon="iconfont iconClean del-btn-list" @click="agreeRefulse(0)">拒绝</el-button>
|
||||||
<el-button size="small" type="primary" class="iconfont iconCorrect" @click="agreeRefulse(1)">同意</el-button>
|
<el-button size="small" type="primary" icon="iconfont iconCorrect" @click="agreeRefulse(1)">同意</el-button>
|
||||||
</template>
|
</template>
|
||||||
<el-button v-if="listType==2&&detail.approvalStatus==0&&$permissions('app_oaapprovalapplyinfo_del')"
|
<el-button v-if="listType==2&&detail.approvalStatus==0&&$permissions('app_oaapprovalapplyinfo_del')"
|
||||||
size="small" class="iconfont iconRevoke del-btn-list" style="width: 76px;" @click="recall">撤回
|
size="small" class="iconfont iconRevoke del-btn-list" style="width: 76px;" @click="recall">撤回
|
||||||
@@ -157,9 +157,9 @@
|
|||||||
<span class="li_opinion" v-if="item.annexFiles && item.annexFiles.length>0">审批附件:</span>
|
<span class="li_opinion" v-if="item.annexFiles && item.annexFiles.length>0">审批附件:</span>
|
||||||
<div style="flex: 1;">
|
<div style="flex: 1;">
|
||||||
<div class="desc_div">
|
<div class="desc_div">
|
||||||
<img @click="openImg(value.accessUrl)" v-for="(value,_v) in item.pictureFiles" :key="_v"
|
<el-image v-for="(value,_v) in item.pictureFiles" :key="_v" :preview-src-list="[value.accessUrl]"
|
||||||
:src="value.accessUrl" alt="图片" width="80px" height="80px"
|
:src="value.accessUrl" alt="图片" width="80px" height="80px"
|
||||||
style="border: 1px solid #ddd;cursor: pointer;">
|
style="border: 1px solid #ddd;cursor: pointer;"/>
|
||||||
</div>
|
</div>
|
||||||
<ul class="file_ul">
|
<ul class="file_ul">
|
||||||
<li v-for="(v,_i) in item.annexFiles" :key="_i" @click="downFile(v.accessUrl)">
|
<li v-for="(v,_i) in item.annexFiles" :key="_i" @click="downFile(v.accessUrl)">
|
||||||
@@ -205,15 +205,12 @@
|
|||||||
</template>
|
</template>
|
||||||
</ai-detail>
|
</ai-detail>
|
||||||
|
|
||||||
<el-dialog :visible.sync="isOpen" width="600px">
|
|
||||||
<img :src="imgUrl" alt="" width="100%" height="500px">
|
|
||||||
</el-dialog>
|
|
||||||
|
|
||||||
<!--审批同意、拒绝-->
|
<!--审批同意、拒绝-->
|
||||||
<el-dialog :title="titleType" center :visible.sync="isAgree" width="720px" v-loading="loading"
|
<el-dialog :title="titleType" center :visible.sync="isAgree" width="720px" v-loading="loading"
|
||||||
:close-on-click-modal="false" @close="form.fieldInfos = []">
|
:close-on-click-modal="false" @close="form.fieldInfos = []">
|
||||||
<div style="height: 400px;overflow-y: auto;">
|
<div style="max-height: 400px;overflow-y: auto;">
|
||||||
<el-form size="small" :model="form" label-width="90px" ref="ruleForm" label-position="right"
|
<el-form size="small" :model="form" label-width="120px" ref="ruleForm" label-position="right"
|
||||||
class="dialog-form">
|
class="dialog-form">
|
||||||
<el-form-item v-for="(op,i) in form.fieldInfos" :key="i"
|
<el-form-item v-for="(op,i) in form.fieldInfos" :key="i"
|
||||||
:label="op.fieldName + (op.fieldNameSuffix ? op.fieldNameSuffix : '')" class="dynamicFormItem"
|
:label="op.fieldName + (op.fieldNameSuffix ? op.fieldNameSuffix : '')" class="dynamicFormItem"
|
||||||
@@ -240,15 +237,15 @@
|
|||||||
type="date"
|
type="date"
|
||||||
placeholder="请选择">
|
placeholder="请选择">
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
<ai-select v-if="op.fieldDataType=='9'" v-model="op.fieldValue"
|
<ai-select v-if="op.fieldDataType=='9'" v-model="op.fieldValue" :selectList="dict.getDict(op.dictionaryCode)"/>
|
||||||
:selectList="dict.getDict(op.dictionaryCode)"/>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="审批意见" prop="opinion" :rules="[{ required: true, message: '请输入审批意见', trigger: 'blur' }]"
|
<el-form-item label="指定审批人" prop="appointNextCandidateId" :rules="[{ required: true, message: '请选择指定审批人'}]" v-if="form.nextNodeAreaFilter==3">
|
||||||
v-if="titleType=='审批拒绝'">
|
<ai-select v-model="form.appointNextCandidateId" :selectList="form.nextCandidateList"/>
|
||||||
<el-input type="textarea" :rows="4" v-model.trim="form.opinion" placeholder="请输入" show-word-limit
|
|
||||||
:maxlength="150"></el-input>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="图片" prop="imgList" style="position: relative;">
|
<el-form-item label="审批意见" prop="opinion" :rules="[{ required: true, message: '请输入审批意见', trigger: 'blur' }]" v-if="!form.pass">
|
||||||
|
<el-input type="textarea" :rows="4" v-model.trim="form.opinion" placeholder="请输入" show-word-limit :maxlength="150"/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="图片" prop="imgList" style="position: relative;" v-if="form.pictureEnable==1">
|
||||||
<span style="position: absolute;left: -78px;top: 18px;font-size: 12px;color: #999;">(最多9张)</span>
|
<span style="position: absolute;left: -78px;top: 18px;font-size: 12px;color: #999;">(最多9张)</span>
|
||||||
<el-upload
|
<el-upload
|
||||||
action
|
action
|
||||||
@@ -268,7 +265,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="附件" prop="fileList">
|
<el-form-item label="附件" prop="fileList" v-if="form.annexEnable==1">
|
||||||
<el-upload
|
<el-upload
|
||||||
class="upload-demo"
|
class="upload-demo"
|
||||||
action
|
action
|
||||||
@@ -324,7 +321,6 @@ export default {
|
|||||||
detailObj: {},
|
detailObj: {},
|
||||||
dataList: [],
|
dataList: [],
|
||||||
processList: [],
|
processList: [],
|
||||||
titleType: '',
|
|
||||||
isAgree: false,
|
isAgree: false,
|
||||||
form: {
|
form: {
|
||||||
id: '',
|
id: '',
|
||||||
@@ -344,7 +340,6 @@ export default {
|
|||||||
fileList: [],
|
fileList: [],
|
||||||
alreadyList: [],//已审批的
|
alreadyList: [],//已审批的
|
||||||
imgUrl: '',
|
imgUrl: '',
|
||||||
isOpen: false,
|
|
||||||
url: "/admin/sysunit/getAll2",
|
url: "/admin/sysunit/getAll2",
|
||||||
applyForm: {},
|
applyForm: {},
|
||||||
menuList: ["基本信息", '申请表单', '附件材料', "审批记录"],
|
menuList: ["基本信息", '申请表单', '附件材料', "审批记录"],
|
||||||
@@ -370,7 +365,8 @@ export default {
|
|||||||
{slot: "annex"},
|
{slot: "annex"},
|
||||||
{slot: "options"}
|
{slot: "options"}
|
||||||
]
|
]
|
||||||
}
|
},
|
||||||
|
titleType: v => v.form.pass ? '审批同意' : '审批拒绝'
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
handleDownload() {
|
handleDownload() {
|
||||||
@@ -417,10 +413,6 @@ export default {
|
|||||||
this.fileList = []
|
this.fileList = []
|
||||||
this.isAgree = false
|
this.isAgree = false
|
||||||
},
|
},
|
||||||
openImg(url) {
|
|
||||||
this.isOpen = true;
|
|
||||||
this.imgUrl = url;
|
|
||||||
},
|
|
||||||
// 下载
|
// 下载
|
||||||
downFile(url) {
|
downFile(url) {
|
||||||
window.open(url);
|
window.open(url);
|
||||||
@@ -558,36 +550,22 @@ export default {
|
|||||||
let dictionaryArr = []
|
let dictionaryArr = []
|
||||||
this.loading = true
|
this.loading = true
|
||||||
this.instance.post(`/app/approv-alapply-info/approval-popup?id=${this.detail.id}&type=${index}`).then(res => {
|
this.instance.post(`/app/approv-alapply-info/approval-popup?id=${this.detail.id}&type=${index}`).then(res => {
|
||||||
this.loading = false
|
if (res?.data) {
|
||||||
if (res && res.data) {
|
|
||||||
if (index == 1) {
|
if (index == 1) {
|
||||||
res.data.fieldInfos.map(e => {
|
this.form = res.data
|
||||||
if (e.fieldType == 3 && e.dictionaryCode && dictionaryArr.indexOf(e.dictionaryCode) == -1) {
|
this.form.fieldInfos = res.data.fieldInfos.filter(e => e.fieldType == 3)
|
||||||
|
this.form.nextCandidateList = this.form.nextCandidateList?.map(e => ({dictValue: e.candidate, dictName: e.name}))
|
||||||
|
this.form.fieldInfos.map(e => {
|
||||||
|
if (e.dictionaryCode && !dictionaryArr.includes(e.dictionaryCode)) {
|
||||||
dictionaryArr.push(e.dictionaryCode)
|
dictionaryArr.push(e.dictionaryCode)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
if (dictionaryArr.length) {
|
dictionaryArr.length > 0 && this.dict.load(dictionaryArr)
|
||||||
this.dict.load(dictionaryArr).then(() => {
|
|
||||||
this.form.fieldInfos = res.data.fieldInfos.filter(e => e.fieldType == 3)
|
|
||||||
})
|
|
||||||
} else {
|
|
||||||
this.form.fieldInfos = res.data.fieldInfos.filter(e => e.fieldType == 3)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
this.form.pass = index == 1
|
||||||
this.isAgree = true;
|
this.isAgree = true;
|
||||||
if (index == 0) {
|
|
||||||
this.form.pass = false;
|
|
||||||
this.titleType = '审批拒绝';
|
|
||||||
} else {
|
|
||||||
this.form.pass = true;
|
|
||||||
this.titleType = '审批同意';
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}).catch(err => {
|
}).finally(() => this.loading = false)
|
||||||
this.loading = false
|
|
||||||
console.log(err);
|
|
||||||
})
|
|
||||||
},
|
},
|
||||||
saveAgree() {
|
saveAgree() {
|
||||||
this.form.id = this.detail.id;
|
this.form.id = this.detail.id;
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
</el-tabs>
|
</el-tabs>
|
||||||
</template>
|
</template>
|
||||||
</ai-list>
|
</ai-list>
|
||||||
<component v-else :is="currentComp" :instance="instance" :dict="dict" :processType="currentTab.value" :row="row" @back="back"/>
|
<component v-else :is="currentTab.detail" :instance="instance" :dict="dict" :processType="currentTab.value" :row="row" @back="back"/>
|
||||||
</section>
|
</section>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -35,7 +35,6 @@ export default {
|
|||||||
return {
|
return {
|
||||||
currIndex: "0",
|
currIndex: "0",
|
||||||
row: {},
|
row: {},
|
||||||
currentComp: "",
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@@ -49,22 +48,18 @@ export default {
|
|||||||
return this.tabs?.[this.currIndex] || {}
|
return this.tabs?.[this.currIndex] || {}
|
||||||
},
|
},
|
||||||
showDetail() {
|
showDetail() {
|
||||||
return !!this.$route.query?.id || !!this.$route.query?.processType
|
return this.$route.hash == "#add" || !!this.$route.query?.processType
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
goPage(params) {
|
goPage(params) {
|
||||||
this.row = params.row
|
this.$router.push({query: {id: params.row.id}, hash: "#add"})
|
||||||
this.currentComp = params.comp
|
|
||||||
this.$router.push({query: {processType: this.currentTab.value}})
|
|
||||||
},
|
},
|
||||||
|
|
||||||
back() {
|
back() {
|
||||||
this.$router.push({query: {}})
|
this.$router.push({query: {}})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.$router.push({query: {}});
|
|
||||||
this.$dict.load("hbDepartment", 'sex', 'nation', 'marital', 'native_place', 'education', 'candidateApproverType', 'scopeCandidates', 'nodeType')
|
this.$dict.load("hbDepartment", 'sex', 'nation', 'marital', 'native_place', 'education', 'candidateApproverType', 'scopeCandidates', 'nodeType')
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,12 +9,12 @@
|
|||||||
</el-steps>
|
</el-steps>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<template #content v-if="refresh">
|
<template #content v-if="loaded">
|
||||||
<baseInfo ref="baseInfo" :instance="instance" :dict="dict" v-show="activeStep==0"/>
|
<baseInfo ref="baseInfo" :instance="instance" :dict="dict" v-if="activeStep==0"/>
|
||||||
<applyForm ref="applyForm" :instance="instance" :dict="dict" v-show="activeStep==1"/>
|
<applyForm ref="applyForm" :instance="instance" :dict="dict" v-show="activeStep==1"/>
|
||||||
<attachmentMaterial ref="attachmentMaterial" :instance="instance" v-show="activeStep==2"/>
|
<attachmentMaterial ref="attachmentMaterial" :instance="instance" v-if="activeStep==2"/>
|
||||||
<processApproval ref="processApproval" :approvalSteps="applyForm.approvalSteps" :instance="instance"
|
<processApproval ref="processApproval" :approvalSteps="applyForm.approvalSteps" :instance="instance"
|
||||||
:dict="dict" v-show="activeStep==3"/>
|
:dict="dict" v-if="activeStep==3"/>
|
||||||
</template>
|
</template>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<el-button class="btn" v-if="activeStep==0" @click="handleBack">取消</el-button>
|
<el-button class="btn" v-if="activeStep==0" @click="handleBack">取消</el-button>
|
||||||
@@ -39,12 +39,10 @@ export default {
|
|||||||
props: {
|
props: {
|
||||||
instance: Function,
|
instance: Function,
|
||||||
dict: Object,
|
dict: Object,
|
||||||
row: Object
|
|
||||||
},
|
},
|
||||||
components: {baseInfo, applyForm, attachmentMaterial, processApproval},
|
components: {baseInfo, applyForm, attachmentMaterial, processApproval},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
activeStep: 0,
|
|
||||||
baseInfo: {},
|
baseInfo: {},
|
||||||
applyForm: {
|
applyForm: {
|
||||||
tableId: "",
|
tableId: "",
|
||||||
@@ -52,7 +50,8 @@ export default {
|
|||||||
},
|
},
|
||||||
processAnnexDefs: [],
|
processAnnexDefs: [],
|
||||||
detailObj: {},
|
detailObj: {},
|
||||||
refresh: true
|
activeStep: 0,
|
||||||
|
loaded: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@@ -66,7 +65,7 @@ export default {
|
|||||||
},
|
},
|
||||||
detailTitle() {
|
detailTitle() {
|
||||||
return this.detailObj?.id ? "编辑事项" : "添加事项"
|
return this.detailObj?.id ? "编辑事项" : "添加事项"
|
||||||
}
|
},
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
/**
|
/**
|
||||||
@@ -103,9 +102,9 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
handleBaseInfo() {
|
handleBaseInfo() {
|
||||||
this.$refs['baseInfo'].banseInfoForm().then(res => {
|
this.$refs.baseInfo.banseInfoForm().then(res => {
|
||||||
if (res) {
|
if (res) {
|
||||||
this.$refs['applyForm'].getFormList()
|
this.$refs.applyForm?.getFormList()
|
||||||
this.baseInfo = res
|
this.baseInfo = res
|
||||||
this.activeStep++
|
this.activeStep++
|
||||||
}
|
}
|
||||||
@@ -115,18 +114,17 @@ export default {
|
|||||||
* 保存
|
* 保存
|
||||||
*/
|
*/
|
||||||
save() {
|
save() {
|
||||||
this.$refs['processApproval'].handleProcessApproval().then(res => {
|
this.$refs.processApproval?.handleProcessApproval().then(res => {
|
||||||
this.instance.post(`/approval-process-def/add-update`, {
|
this.instance.post(`/approval-process-def/add-update`, {
|
||||||
...this.detailObj,
|
...this.detailObj,
|
||||||
...this.baseInfo,
|
...this.baseInfo,
|
||||||
processDefStatus: Number(this.baseInfo.processDefStatus),
|
processDefStatus: Number(this.baseInfo.processDefStatus),
|
||||||
tableId: this.applyForm.tableId,
|
tableId: this.applyForm.tableId,
|
||||||
processType: 0,
|
|
||||||
tableType: 2,
|
tableType: 2,
|
||||||
processAnnexDefs: this.annexs.map(e => ({...e, mustFill: Number(e.mustFill)})),
|
processAnnexDefs: this.annexs?.map(e => ({...e, mustFill: Number(e.mustFill)})),
|
||||||
processNodeList: res.processNodeList
|
processNodeList: res.processNodeList
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
if (res.code == 0) {
|
if (res?.code == 0) {
|
||||||
this.$message.success("保存成功")
|
this.$message.success("保存成功")
|
||||||
this.$emit("back")
|
this.$emit("back")
|
||||||
}
|
}
|
||||||
@@ -139,28 +137,21 @@ export default {
|
|||||||
this.instance.post(`/approval-process-def/info-id`, null, {params: {id}}).then(res => {
|
this.instance.post(`/approval-process-def/info-id`, null, {params: {id}}).then(res => {
|
||||||
if (res?.data) {
|
if (res?.data) {
|
||||||
this.detailObj = res.data
|
this.detailObj = res.data
|
||||||
this.refreshDetail()
|
|
||||||
}
|
}
|
||||||
})
|
}).finally(() => this.loaded = true)
|
||||||
},
|
},
|
||||||
getStepIcon(rowIndex) {
|
getStepIcon(rowIndex) {
|
||||||
if (rowIndex < this.activeStep) return "iconfont iconSteps_Finished"
|
if (rowIndex < this.activeStep) return "iconfont iconSteps_Finished"
|
||||||
else if (this.activeStep == rowIndex) return "iconfont iconSteps_In_Progress"
|
else if (this.activeStep == rowIndex) return "iconfont iconSteps_In_Progress"
|
||||||
return ""
|
return ""
|
||||||
},
|
},
|
||||||
refreshDetail() {
|
|
||||||
this.refresh = false
|
|
||||||
this.$nextTick(() => this.refresh = true)
|
|
||||||
},
|
|
||||||
handleBack() {
|
handleBack() {
|
||||||
this.detailObj?.id && this.$router.push({query: {}})
|
this.detailObj?.id && this.$router.push({query: {}})
|
||||||
this.$emit('back')
|
this.$emit('back')
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
if (this.row.id) {
|
this.getDetail(this.$route.query.id)
|
||||||
this.getDetail(this.row.id)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -29,15 +29,7 @@
|
|||||||
<el-checkbox :label="p.dictName" v-for="(p,i) in dict.getDict(e.dictionaryCode)"
|
<el-checkbox :label="p.dictName" v-for="(p,i) in dict.getDict(e.dictionaryCode)"
|
||||||
:key="Math.random()"></el-checkbox>
|
:key="Math.random()"></el-checkbox>
|
||||||
</el-checkbox-group>
|
</el-checkbox-group>
|
||||||
|
<ai-select v-if="e.fieldDataType==9" disabled/>
|
||||||
<el-select placeholder="请选择" disabled size="small" clearable style="width: 100%;" v-if="e.fieldDataType==9">
|
|
||||||
<el-option
|
|
||||||
v-for="(item,i) in dict.getDict(e.fieldDbName)" :key="i"
|
|
||||||
:label="item.dictName"
|
|
||||||
:value="item.dictValue">
|
|
||||||
</el-option>
|
|
||||||
</el-select>
|
|
||||||
|
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="form.picker"
|
v-model="form.picker"
|
||||||
v-if="['2','3','7','8'].includes(e.fieldDataType)"
|
v-if="['2','3','7','8'].includes(e.fieldDataType)"
|
||||||
|
|||||||
@@ -44,25 +44,8 @@
|
|||||||
</el-button>
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- <ai-wechat-selecter slot="append" :instance="instance" :props="{id:'wxUserId',label:'name'}"
|
<ai-person-select :chooseUserList="item.candidateList" v-if="item.candidateApproverType==1" :instance="instance" customRightText url="/user/page"
|
||||||
v-model="item.candidateList" v-if="item.candidateApproverType==1">
|
headerTitle="人员列表" dialogTitle="选择" :isMultiple="true" @selectPerson="e => changeCharge(e, index)">
|
||||||
<el-button size="mini" type="primary">选择指定人员</el-button>
|
|
||||||
</ai-wechat-selecter> -->
|
|
||||||
<!-- <ai-user-picker :instance="instance" v-model="item.candidateList" v-if="item.candidateApproverType==1"/> -->
|
|
||||||
<!-- <ai-people :showAiArea="false" customCliker :instance="instance"
|
|
||||||
unitUrl="/admin/sysunit/getAll2"
|
|
||||||
:meta="[]" v-model="item.candidateList"
|
|
||||||
v-if="item.candidateApproverType==1">
|
|
||||||
<el-button size="mini" type="primary">选择指定人员</el-button>
|
|
||||||
</ai-people> -->
|
|
||||||
|
|
||||||
<!-- <ai-user-picker :instance="instance" v-model="form.portalUserId"/> -->
|
|
||||||
<ai-person-select
|
|
||||||
:chooseUserList="item.candidateList"
|
|
||||||
v-if="item.candidateApproverType==1"
|
|
||||||
:instance="instance" customRightText url="/user/page"
|
|
||||||
headerTitle="人员列表" dialogTitle="选择" :isMultiple="true"
|
|
||||||
@selectPerson="e => changeCharge(e, index)">
|
|
||||||
<template v-slot:option="{ item }">
|
<template v-slot:option="{ item }">
|
||||||
<span class="iconfont iconProlife">{{ item.name }}</span>
|
<span class="iconfont iconProlife">{{ item.name }}</span>
|
||||||
<span>{{ item.phone }}</span>
|
<span>{{ item.phone }}</span>
|
||||||
@@ -73,63 +56,40 @@
|
|||||||
</el-steps>
|
</el-steps>
|
||||||
</template>
|
</template>
|
||||||
</ai-card>
|
</ai-card>
|
||||||
<el-dialog :title="titleType" class="editStyle" :visible.sync="isAddStep" width="575px" height="380px"
|
<ai-dialog :title="titleType" class="editStyle" :visible.sync="isAddStep" width="575px" height="380px"
|
||||||
:close-on-click-modal="false">
|
:close-on-click-modal="false" @onConfirm="saveAddProgress">
|
||||||
<el-form size="small" :model="nodeObj" label-width="120px" ref="addForm" :rules="addRules">
|
<el-form size="small" :model="nodeObj" label-width="100px" ref="addForm" :rules="addRules">
|
||||||
<el-form-item label="审批步骤名称" prop="nodeName">
|
<el-form-item label="审批步骤" prop="nodeName">
|
||||||
<el-input v-model="nodeObj.nodeName" placeholder="如:部门主管审批(限10个字)" :maxLength="10"
|
<el-input v-model="nodeObj.nodeName" placeholder="如:部门主管审批(限10个字)" :maxLength="10" clearable/>
|
||||||
clearable/>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="审批方式" prop="nodeType">
|
<el-form-item label="审批方式" prop="nodeType">
|
||||||
<el-radio-group v-model="nodeObj.nodeType">
|
<el-radio-group v-model="nodeObj.nodeType" @change="nodeObj.areaFilter='',nodeObj.annexEnable='',nodeObj.pictureEnable=''">
|
||||||
<el-radio :label="2">或签
|
<el-radio v-for="op in approvalWays" :key="op.value" :label="op.value">
|
||||||
<el-popover
|
<span v-text="op.label"/>
|
||||||
placement="top-start"
|
<el-popover placement="top-start" width="200" trigger="click" :content="op.tips">
|
||||||
width="200"
|
<el-button type="text" slot="reference" icon="el-icon-warning" class="color-666"/>
|
||||||
trigger="click"
|
|
||||||
content="或签是指该节点指定多名负责人审批时,其中任何一人完成审批即可。适合一个事项只需要某个岗位任何一人审批即可的业务场景。">
|
|
||||||
<el-button class="el-icon-warning" slot="reference"
|
|
||||||
style="padding:0;height:14px;border:0;"></el-button>
|
|
||||||
</el-popover>
|
|
||||||
</el-radio>
|
|
||||||
<el-radio :label="3">抄送
|
|
||||||
<el-popover
|
|
||||||
placement="top-start"
|
|
||||||
width="200"
|
|
||||||
trigger="click"
|
|
||||||
content="抄送是指一个事项审批完成后,抄送给需要知晓的单位或个人,被抄送的对象可以查阅该事项内容,无需审批。适合一个事项无需对方审批,但审批完成后需要通知对方知晓的业务场景。">
|
|
||||||
<el-button class="el-icon-warning" slot="reference"
|
|
||||||
style="padding:0;height:14px;border:0;"></el-button>
|
|
||||||
</el-popover>
|
|
||||||
</el-radio>
|
|
||||||
</el-radio-group>
|
|
||||||
</el-form-item>
|
|
||||||
<el-form-item label="数据权限" prop="areaFilter">
|
|
||||||
<el-radio-group v-model="nodeObj.areaFilter">
|
|
||||||
<el-radio :label="0">不限
|
|
||||||
<el-popover placement="top-start" width="200" trigger="click" content="审批人员可查看全部申报事项">
|
|
||||||
<el-button class="el-icon-warning" slot="reference" style="padding:0;height:14px;border:0;"/>
|
|
||||||
</el-popover>
|
|
||||||
</el-radio>
|
|
||||||
<el-radio :label="1">村社区
|
|
||||||
<el-popover placement="top-start" width="200" trigger="click" content="审批人员可查看本村申报事项">
|
|
||||||
<el-button class="el-icon-warning" slot="reference" style="padding:0;height:14px;border:0;"/>
|
|
||||||
</el-popover>
|
|
||||||
</el-radio>
|
|
||||||
<el-radio :label="2">镇街
|
|
||||||
<el-popover placement="top-start" width="200" trigger="click" content="审批人员可查看本镇申报事项">
|
|
||||||
<el-button class="el-icon-warning" slot="reference" style="padding:0;height:14px;border:0;"/>
|
|
||||||
</el-popover>
|
</el-popover>
|
||||||
</el-radio>
|
</el-radio>
|
||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<template v-if="nodeObj.nodeType==2">
|
||||||
|
<el-form-item label="数据权限" prop="areaFilter">
|
||||||
|
<el-radio-group v-model="nodeObj.areaFilter">
|
||||||
|
<el-radio v-for="op in dict.getDict('processNodeAreaFilter')" :key="op.dictValue" :label="op.dictValue">
|
||||||
|
<span v-text="op.dictName"/>
|
||||||
|
<el-popover placement="top-start" width="200" trigger="click" :content="dict.getLabel('processNodeAreaFilterTips',op.dictValue)">
|
||||||
|
<el-button type="text" slot="reference" icon="el-icon-warning" class="color-666"/>
|
||||||
|
</el-popover>
|
||||||
|
</el-radio>
|
||||||
|
</el-radio-group>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="附件图片">
|
||||||
|
<el-checkbox v-model="nodeObj.annexEnable" true-label="1" false-label="0">附件</el-checkbox>
|
||||||
|
<el-checkbox v-model="nodeObj.pictureEnable" true-label="1" false-label="0">图片</el-checkbox>
|
||||||
|
</el-form-item>
|
||||||
|
</template>
|
||||||
</el-form>
|
</el-form>
|
||||||
<div slot="footer" style="text-align: center;">
|
</ai-dialog>
|
||||||
<el-button style="width: 92px;" size="small" @click="isAddStep = false">取消</el-button>
|
|
||||||
<el-button style="width: 92px;" size="small" type="primary" @click="saveAddProgress">确认
|
|
||||||
</el-button>
|
|
||||||
</div>
|
|
||||||
</el-dialog>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -149,19 +109,15 @@ export default {
|
|||||||
form: {
|
form: {
|
||||||
processNodeList: [],
|
processNodeList: [],
|
||||||
},
|
},
|
||||||
areaId: "",
|
approvalWays: [
|
||||||
|
{value: 2, label: '或签', tips: '或签是指该节点指定多名负责人审批时,其中任何一人完成审批即可。适合一个事项只需要某个岗位任何一人审批即可的业务场景。'},
|
||||||
|
{value: 3, label: '抄送', tips: '抄送是指一个事项审批完成后,抄送给需要知晓的单位或个人,被抄送的对象可以查阅该事项内容,无需审批。适合一个事项无需对方审批,但审批完成后需要通知对方知晓的业务场景。'},
|
||||||
|
],
|
||||||
isAddStep: false,
|
isAddStep: false,
|
||||||
isSelectImg: false,
|
isSelectImg: false,
|
||||||
isSelectUnit: false,
|
isSelectUnit: false,
|
||||||
isSelectPerson: false,
|
isSelectPerson: false,
|
||||||
nodeObj: {
|
nodeObj: {areaFilter: [], annexEnable: null, pictureEnable: null},
|
||||||
candidateApproverType: '1',
|
|
||||||
candidateList: [],
|
|
||||||
nodeIndex: '',
|
|
||||||
nodeName: '',
|
|
||||||
nodeType: '',
|
|
||||||
scopeCandidates: ''
|
|
||||||
},
|
|
||||||
indexType: '',
|
indexType: '',
|
||||||
titleType: '',
|
titleType: '',
|
||||||
bomIndex: '',
|
bomIndex: '',
|
||||||
@@ -190,15 +146,11 @@ export default {
|
|||||||
handleProcessApproval() {
|
handleProcessApproval() {
|
||||||
return Promise.resolve(this.form)
|
return Promise.resolve(this.form)
|
||||||
},
|
},
|
||||||
/**
|
|
||||||
*删除
|
|
||||||
* */
|
|
||||||
deleteInfo(index) {
|
deleteInfo(index) {
|
||||||
this.$confirm("是否删除").then(() => {
|
this.$confirm("是否删除").then(() => {
|
||||||
this.form.processNodeList.splice(index, 1)
|
this.form.processNodeList.splice(index, 1)
|
||||||
})
|
}).catch(() => 0)
|
||||||
},
|
},
|
||||||
|
|
||||||
changeCharge(e, i) {
|
changeCharge(e, i) {
|
||||||
this.$set(this.form.processNodeList[i], 'candidateList', e.map(v => {
|
this.$set(this.form.processNodeList[i], 'candidateList', e.map(v => {
|
||||||
return {
|
return {
|
||||||
@@ -209,9 +161,6 @@ export default {
|
|||||||
},
|
},
|
||||||
/**
|
/**
|
||||||
* 添加流程
|
* 添加流程
|
||||||
* @param index
|
|
||||||
* @param item
|
|
||||||
* @param i
|
|
||||||
*/
|
*/
|
||||||
addAppStep(index, item, i) {
|
addAppStep(index, item, i) {
|
||||||
this.isAddStep = true;
|
this.isAddStep = true;
|
||||||
@@ -220,10 +169,8 @@ export default {
|
|||||||
if (index == 2) {
|
if (index == 2) {
|
||||||
this.titleType = '编辑审批步骤';
|
this.titleType = '编辑审批步骤';
|
||||||
item.nodeType = item.nodeType * 1;
|
item.nodeType = item.nodeType * 1;
|
||||||
item.areaFilter = item.areaFilter * 1;
|
|
||||||
item.candidateApproverType = item.candidateApproverType * 1;
|
item.candidateApproverType = item.candidateApproverType * 1;
|
||||||
item.scopeCandidates = item.scopeCandidates * 1;
|
this.nodeObj = this.$copy(item)
|
||||||
this.nodeObj = JSON.parse(JSON.stringify(item));
|
|
||||||
} else {
|
} else {
|
||||||
this.titleType = '添加审批步骤';
|
this.titleType = '添加审批步骤';
|
||||||
if (this.form.processNodeList.length > 0) {
|
if (this.form.processNodeList.length > 0) {
|
||||||
@@ -235,11 +182,11 @@ export default {
|
|||||||
saveAddProgress() {
|
saveAddProgress() {
|
||||||
this.$refs.addForm.validate((valid) => {
|
this.$refs.addForm.validate((valid) => {
|
||||||
if (valid) {
|
if (valid) {
|
||||||
if (this.nodeObj.scopeCandidates == 0) this.nodeObj.candidateList = [];
|
if (this.nodeObj.scopeCandidates == '0') this.nodeObj.candidateList = [];
|
||||||
if (this.indexType == 1) {
|
if (this.indexType == 1) {
|
||||||
this.form.processNodeList.push(JSON.parse(JSON.stringify(this.nodeObj)));
|
this.form.processNodeList.push(this.$copy(this.nodeObj));
|
||||||
} else {
|
} else {
|
||||||
this.form.processNodeList.splice(this.bomIndex, 1, JSON.parse(JSON.stringify(this.nodeObj)));
|
this.form.processNodeList.splice(this.bomIndex, 1, this.$copy(this.nodeObj));
|
||||||
}
|
}
|
||||||
this.$refs.addForm.resetFields();
|
this.$refs.addForm.resetFields();
|
||||||
this.isAddStep = false;
|
this.isAddStep = false;
|
||||||
@@ -253,13 +200,16 @@ export default {
|
|||||||
nodeIndex: '',
|
nodeIndex: '',
|
||||||
nodeName: '',
|
nodeName: '',
|
||||||
nodeType: '',
|
nodeType: '',
|
||||||
scopeCandidates: ''
|
scopeCandidates: '1',
|
||||||
|
annexEnable: null,
|
||||||
|
pictureEnable: null,
|
||||||
|
areaFilter: null
|
||||||
};
|
};
|
||||||
this.$refs.addForm?.resetFields();
|
this.$refs.addForm?.resetFields();
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.areaId = this.user.info.areaId.substring(0, 6) + '000000'
|
this.dict.load("processNodeAreaFilter", 'processNodeAreaFilterTips')
|
||||||
if (this.config.detailObj?.id) {
|
if (this.config.detailObj?.id) {
|
||||||
Object.keys(this.form).map(e => this.form[e] = this.config.detailObj[e])
|
Object.keys(this.form).map(e => this.form[e] = this.config.detailObj[e])
|
||||||
}
|
}
|
||||||
@@ -442,6 +392,10 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.color-666 {
|
||||||
|
color: #666;
|
||||||
|
}
|
||||||
|
|
||||||
.dia_per_content {
|
.dia_per_content {
|
||||||
width: 640px;
|
width: 640px;
|
||||||
height: 400px;
|
height: 400px;
|
||||||
@@ -511,7 +465,7 @@ export default {
|
|||||||
.peraoBtn {
|
.peraoBtn {
|
||||||
.el-button--text {
|
.el-button--text {
|
||||||
color: #333;
|
color: #333;
|
||||||
font-size: 12px;
|
font-size: 14px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -96,6 +96,14 @@ module.exports = {
|
|||||||
'^/ns': '/'
|
'^/ns': '/'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
'/lns': {
|
||||||
|
target: 'http://localhost:12525',
|
||||||
|
changeOrigin: true,
|
||||||
|
pathRewrite: {
|
||||||
|
//地址重写
|
||||||
|
'^/lns': '/'
|
||||||
|
}
|
||||||
|
},
|
||||||
'/xsjr': {
|
'/xsjr': {
|
||||||
target: 'http://192.168.1.87:39896',
|
target: 'http://192.168.1.87:39896',
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
|
|||||||
Reference in New Issue
Block a user