Browse Source

Merge branch 'test' of http://git.elinkit.com.cn:7070/r/epmet-oper-gov into test

shibei_master
jiangyy 3 years ago
parent
commit
69927218b4
  1. 12
      src/assets/scss/buttonstyle.scss
  2. 8
      src/assets/scss/main-shuju.scss
  3. 44
      src/router/index.js
  4. 3
      src/views/main-content.vue
  5. 142
      src/views/main-shuju/main-content.vue
  6. 45
      src/views/modules/base/community/communityTable.vue
  7. 11
      src/views/modules/secretaryLog/difficulty/difficultyForm.vue
  8. 9
      src/views/modules/secretaryLog/humanisticCare/careForm.vue
  9. 7
      src/views/modules/secretaryLog/workLog/form.vue
  10. 4
      src/views/modules/secretaryLog/workLog/index.vue
  11. 2
      src/views/tips.vue

12
src/assets/scss/buttonstyle.scss

@ -81,7 +81,11 @@
background-color: #3e8ef7 !important; background-color: #3e8ef7 !important;
border-color: #3e8ef7 !important; border-color: #3e8ef7 !important;
} }
.diy-button--qrcode {
color: #fff !important;
background-color: #4ec591 !important;
border-color: #4ec591 !important;
}
//table按钮样式 //table按钮样式
//查看 //查看
@ -101,3 +105,9 @@
color: #d51010 !important; color: #d51010 !important;
text-decoration: underline !important; text-decoration: underline !important;
} }
//
.div-table-button--qr {
color: #4ec591 !important;
text-decoration: underline !important;
}

8
src/assets/scss/main-shuju.scss

@ -5,6 +5,14 @@
body { body {
} }
.m-iframe {
position: relative;
width: 100vw;
height: calc(100vh - 55px);
margin: -10px;
z-index: 100;
}
/* Reset element-ui /* Reset element-ui
------------------------------ */ ------------------------------ */
.g-bd { .g-bd {

44
src/router/index.js

@ -307,11 +307,13 @@ router.beforeEach((to, from, next) => {
// url: "visual/basicinfo/basicInfoMain", // url: "visual/basicinfo/basicInfoMain",
children: [ children: [
{ {
url: "/visual/ai/index", url: "https://test-rxs-job.elinkservice.cn/haiqin-ai/aisecurity.html#/monitor-panel",
name: "AI安防", // url: "/visual/ai/index",
name: "视频监控",
id: "5feawfwa111111efwa57", id: "5feawfwa111111efwa57",
}, },
{ /*{
// url: "http://www.baidu.com",
url: "/visual/ai/renliu", url: "/visual/ai/renliu",
name: "人流数据", name: "人流数据",
id: "5fwaefwae222112fawef58", id: "5fwaefwae222112fawef58",
@ -330,10 +332,11 @@ router.beforeEach((to, from, next) => {
url: "/visual/ai/gongdan", url: "/visual/ai/gongdan",
name: "工单数据", name: "工单数据",
id: "fewafwafewaefddd", id: "fewafwafewaefddd",
}, },*/
{ {
url: "/visual/ai/yujing", // url: "/visual/ai/yujing",
name: "预警事件", url: "https://test-rxs-job.elinkservice.cn/haiqin-ai/aisecurity.html#/data-analysis",
name: "预警分析",
id: "545345fdsfs", id: "545345fdsfs",
}, },
], ],
@ -486,12 +489,33 @@ function fnAddDynamicMenuRoutes2(menuList = [], routes = []) {
eval(s2) eval(s2)
); // URL支持{{ window.xxx }}占位符变量 ); // URL支持{{ window.xxx }}占位符变量
if (isURL(URL)) { if (isURL(URL)) {
route["path"] = route["name"] = `i-${menuList[i].id}`; if (menuList[i].children && menuList[i].children.length >= 1) {
route["meta"]["iframeURL"] = URL; let item = menuList[i].children.find(
(subMenu) => subMenu.url == menuList[i].url
);
if (item) {
route["path"] = route["name"] = `i-${menuList[i].id}`;
route["redirect"] = `i-${item.id}`;
} else {
route["path"] = route["name"] = `i-${menuList[i].id}`;
route["meta"]["iframeURL"] = URL;
}
} else {
route["path"] = route["name"] = `i-${menuList[i].id}`;
route["meta"]["iframeURL"] = URL;
}
} else { } else {
URL = URL.replace(/^\//, "").replace(/_/g, "-"); URL = URL.replace(/^\//, "").replace(/_/g, "-");
route["path"] = route["name"] = URL.replace(/\//g, "-"); if (URL.startsWith("unopen")) {
route["component"] = () => import(`@/views/modules/${URL}`); route["path"] = route["name"] = URL.replace(/\//g, "-");
route["component"] = () => import(`@/views/modules/unopen`);
} else if (menuList[i].children && menuList[i].children.length >= 1) {
route["path"] = route["name"] = URL;
route["redirect"] = URL.replace(/\//g, "-");
} else {
route["path"] = route["name"] = URL.replace(/\//g, "-");
route["component"] = () => import(`@/views/modules/${URL}`);
}
} }
routes.push(route); routes.push(route);
} }

3
src/views/main-content.vue

@ -134,6 +134,9 @@ export default {
this.loopTips() this.loopTips()
}, },
destroyed() {
this.$store.dispatch('clearInter')
},
computed: { computed: {
msgList() { msgList() {
return this.$store.state.tipsList return this.$store.state.tipsList

142
src/views/main-shuju/main-content.vue

@ -1,98 +1,126 @@
<template> <template>
<main :class="['aui-content']"> <main :class="['aui-content']">
<!-- 其他方式, 展示内容 --> <!-- tab展示内容 -->
<template> <template>
<keep-alive> <template v-if="tabIsIframe($router.currentRoute.meta.iframeURL)">
<router-view /> <iframe
:src="
$router.currentRoute.meta.iframeURL +
'?token=' +
token +
'&customerId=' +
customerId
"
ref="iframe"
class="m-iframe"
id="iframe"
width="100%"
height="100%"
frameborder="0"
scrolling="yes"
/>
</template>
<keep-alive v-show="!tabIsIframe($router.currentRoute.meta.iframeURL)">
<router-view @changeCustomerName="changeCustomerName" />
</keep-alive> </keep-alive>
</template> </template>
</main> </main>
</template> </template>
<script> <script>
import { isURL } from '@/utils/validate' import { isURL } from "@/utils/validate";
import Cookie from 'js-cookie' import Cookie from "js-cookie";
export default { export default {
data () { data() {
return { return {
iframeUrl: '', iframeUrl: "",
token: '', token: "",
customerId: '' customerId: "",
} };
}, },
created () { watch: {
// this.$nextTick(() => { // "$router.currentRoute.name": function () {
// this.sendMessage() // console.log($router.currentRoute);
// }) // },
this.token = localStorage.getItem('token') },
this.customerId = localStorage.getItem('customerId') created() {
this.token = localStorage.getItem("token");
this.customerId = localStorage.getItem("customerId");
}, },
methods: { methods: {
changeCustomerName (customerName) { changeCustomerName(customerName) {
this.$emit('changeCustomerName', customerName) this.$emit("changeCustomerName", customerName);
}, },
// tabs, iframe // tabs, iframe
tabIsIframe (url) { tabIsIframe(url) {
// this.appendIframe(url) // this.appendIframe(url)
this.iframeUrl = url + '?token=' + localStorage.getItem('token') + '&customerId=' + localStorage.getItem('customerId') // this.iframeUrl =
return isURL(url) // url +
// "?token=" +
// localStorage.getItem("token") +
// "&customerId=" +
// localStorage.getItem("customerId");
return isURL(url);
}, },
// tabs, tab // tabs, tab
tabSelectedHandle (tab) { tabSelectedHandle(tab) {
tab = this.$store.state.contentTabs.filter(item => item.name === tab.name)[0] tab = this.$store.state.contentTabs.filter(
(item) => item.name === tab.name
)[0];
if (tab) { if (tab) {
this.$router.push({ this.$router.push({
'name': tab.name, name: tab.name,
'params': { ...tab.params }, params: { ...tab.params },
'query': { ...tab.query } query: { ...tab.query },
}) });
} }
}, },
// tabs, tab // tabs, tab
tabRemoveHandle (tabName) { tabRemoveHandle(tabName) {
if (tabName === 'home') { if (tabName === "home") {
return false return false;
} }
this.$store.state.contentTabs = this.$store.state.contentTabs.filter(item => item.name !== tabName) this.$store.state.contentTabs = this.$store.state.contentTabs.filter(
(item) => item.name !== tabName
);
if (this.$store.state.contentTabs.length <= 0) { if (this.$store.state.contentTabs.length <= 0) {
this.$store.state.sidebarMenuActiveName = this.$store.state.contentTabsActiveName = 'home' this.$store.state.sidebarMenuActiveName =
return false this.$store.state.contentTabsActiveName = "home";
return false;
} }
// tab // tab
if (tabName === this.$store.state.contentTabsActiveName) { if (tabName === this.$store.state.contentTabsActiveName) {
let tab = this.$store.state.contentTabs[this.$store.state.contentTabs.length - 1] let tab =
this.$store.state.contentTabs[
this.$store.state.contentTabs.length - 1
];
this.$router.push({ this.$router.push({
name: tab.name, name: tab.name,
params: { ...tab.params }, params: { ...tab.params },
query: { ...tab.query } query: { ...tab.query },
}) });
} }
}, },
// tabs, // tabs,
tabsCloseOtherHandle () { tabsCloseOtherHandle() {
this.$store.state.contentTabs = this.$store.state.contentTabs.filter(item => { this.$store.state.contentTabs = this.$store.state.contentTabs.filter(
return item.name === 'home' || item.name === this.$store.state.contentTabsActiveName (item) => {
}) return (
item.name === "home" ||
item.name === this.$store.state.contentTabsActiveName
);
}
);
}, },
// tabs, // tabs,
tabsCloseAllHandle () { tabsCloseAllHandle() {
this.$store.state.contentTabs = this.$store.state.contentTabs.filter(item => item.name === 'home') this.$store.state.contentTabs = this.$store.state.contentTabs.filter(
this.$router.push({ name: 'home' }) (item) => item.name === "home"
);
this.$router.push({ name: "home" });
}, },
sendMessage () { },
// const iframe = this.$refs.iframes.contentWindow };
const iframe = document.getElementsByClassName('iframes')[0].contentWindow
console.log('iframe', iframe)
// iframe.postMessage({
// token: localStorage.getItem('token'),
// customerId: localStorage.getItem('customerId')
// }, '*')
iframe.postMessage({ name: 'lalalal' }, '*')
},
}
}
</script> </script>
<style lang="scss" src="@/assets/scss/main-shuju.scss" scoped></style> <style lang="scss" src="@/assets/scss/main-shuju.scss" scoped></style>

45
src/views/modules/base/community/communityTable.vue

@ -33,6 +33,10 @@
class="diy-button--reset" class="diy-button--reset"
size="small" size="small"
@click="resetSearch">重置</el-button> @click="resetSearch">重置</el-button>
<!-- <el-button style="margin-left:10px"
class="diy-button--reset"
size="small"
@click="resetSearch">重置</el-button> -->
</div> </div>
<div class="div_btn"> <div class="div_btn">
<el-button style="" <el-button style=""
@ -99,6 +103,10 @@
class="diy-button--reset" class="diy-button--reset"
size="small" size="small"
@click="handleExport">导出</el-button> @click="handleExport">导出</el-button>
<el-button v-if="agencyObj.level == 'community'" style="margin-left:10px"
class="diy-button--qrcode"
size="small"
@click="handleDownQr(agencyObj, 'community')">社区二维码</el-button>
</div> </div>
@ -119,6 +127,11 @@
<el-table-column prop="neighborHoodName" <el-table-column prop="neighborHoodName"
label="小区名称" label="小区名称"
min-width="100"> min-width="100">
<!-- <template slot-scope="scope">
<a class="name-a" @click="handleDetail(scope.row)">
{{ scope.row.neighborHoodName }}
</a>
</template> -->
</el-table-column> </el-table-column>
<el-table-column prop="agencyName" <el-table-column prop="agencyName"
label="所属组织" label="所属组织"
@ -156,7 +169,12 @@
style="color:#feb349;text-decoration: underline;" style="color:#feb349;text-decoration: underline;"
size="small" size="small"
@click="handleToNextLevel(scope.row)">进入</el-button> --> @click="handleToNextLevel(scope.row)">进入</el-button> -->
<el-button type="text" <!-- <el-button type="text"
class="div-table-button--qr"
size="small"
@click="handleDownQr(scope.row, 'neighborHood')">二维码</el-button> -->
<el-button
type="text"
class="div-table-button--detail" class="div-table-button--detail"
size="small" size="small"
@click="handleDetail(scope.row)">查看</el-button> @click="handleDetail(scope.row)">查看</el-button>
@ -223,6 +241,7 @@ import CommunityForm from './communityForm'
import { requestPost } from "@/js/dai/request"; import { requestPost } from "@/js/dai/request";
import { mapGetters } from 'vuex' import { mapGetters } from 'vuex'
import { Loading } from 'element-ui' // Loading import { Loading } from 'element-ui' // Loading
import axios from 'axios'
let loading // let loading //
export default { export default {
@ -528,7 +547,29 @@ export default {
this.$message.error(msg) this.$message.error(msg)
} }
}, },
async handleDownQr(row, type) {
// const url = window.SITE_CONFIG['apiURL'] + `/gov/org/icneighborhood/createQrCode/${row.neighborHoodId}`
const url = '/gov/org/agency/create-qrcode'
const _id = type == 'community' ? row.id : row.neighborHoodId
const params = {
id: _id,
type
}
await axios({
method: 'POST',
url: window.SITE_CONFIG['apiURL'] + url,
data: params,
responseType: 'blob'
}).then(res => {
console.log('res----1r', res)
if (res.headers["content-disposition"]) {
let fileName = window.decodeURI(res.headers["content-disposition"].split(";")[1].split("=")[1])
console.log('filename', fileName)
this.download(res.data, fileName) //blob
} else this.$message.error('下载失败')
// this.download(res.data, '1.png')
})
},
// //
async handleExport () { async handleExport () {
let title = this.agencyObj.label let title = this.agencyObj.label

11
src/views/modules/secretaryLog/difficulty/difficultyForm.vue

@ -17,7 +17,8 @@
type="textarea" type="textarea"
maxlength="100" maxlength="100"
show-word-limit show-word-limit
:rows="3" :rows="4"
clearable
placeholder="请输入内容" placeholder="请输入内容"
v-model="formData.content"></el-input> v-model="formData.content"></el-input>
</el-form-item> </el-form-item>
@ -30,7 +31,8 @@
type="textarea" type="textarea"
maxlength="100" maxlength="100"
show-word-limit show-word-limit
:rows="3" :rows="4"
clearable
placeholder="请输入解决方式" placeholder="请输入解决方式"
v-model="formData.resolveWay"></el-input> v-model="formData.resolveWay"></el-input>
</el-form-item> </el-form-item>
@ -44,6 +46,7 @@
format="yyyy-MM-dd HH:mm" format="yyyy-MM-dd HH:mm"
value-format="yyyy-MM-dd HH:mm" value-format="yyyy-MM-dd HH:mm"
type="datetime" type="datetime"
clearable
placeholder="选择时间"> placeholder="选择时间">
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
@ -56,6 +59,7 @@
format="yyyy-MM-dd HH:mm" format="yyyy-MM-dd HH:mm"
value-format="yyyy-MM-dd HH:mm" value-format="yyyy-MM-dd HH:mm"
type="datetime" type="datetime"
clearable
:picker-options="pickerOptions" :picker-options="pickerOptions"
@change="handleTime" @change="handleTime"
placeholder="选择时间"> placeholder="选择时间">
@ -70,7 +74,8 @@
type="textarea" type="textarea"
maxlength="100" maxlength="100"
show-word-limit show-word-limit
:rows="3" :rows="4"
clearable
placeholder="请输入备注" placeholder="请输入备注"
v-model="formData.remark"></el-input> v-model="formData.remark"></el-input>
</el-form-item> </el-form-item>

9
src/views/modules/secretaryLog/humanisticCare/careForm.vue

@ -15,6 +15,7 @@
style="display: block"> style="display: block">
<el-input class="item_width_2" <el-input class="item_width_2"
placeholder="请输入关怀类型" placeholder="请输入关怀类型"
clearable
v-model="formData.concernType"> v-model="formData.concernType">
</el-input> </el-input>
</el-form-item> </el-form-item>
@ -25,6 +26,7 @@
style="display: block"> style="display: block">
<el-input class="item_width_2" <el-input class="item_width_2"
placeholder="请输入关怀人员" placeholder="请输入关怀人员"
clearable
v-model="formData.resiName"> v-model="formData.resiName">
</el-input> </el-input>
</el-form-item> </el-form-item>
@ -35,6 +37,7 @@
style="display: block"> style="display: block">
<el-input class="item_width_2" <el-input class="item_width_2"
placeholder="请输入电话" placeholder="请输入电话"
clearable
v-model="formData.phone"> v-model="formData.phone">
</el-input> </el-input>
</el-form-item> </el-form-item>
@ -44,6 +47,7 @@
style="display: block"> style="display: block">
<el-input class="item_width_1" <el-input class="item_width_1"
placeholder="请输入地址" placeholder="请输入地址"
clearable
v-model="formData.address"> v-model="formData.address">
</el-input> </el-input>
</el-form-item> </el-form-item>
@ -56,7 +60,8 @@
type="textarea" type="textarea"
maxlength="100" maxlength="100"
show-word-limit show-word-limit
:rows="3" :rows="4"
clearable
placeholder="请输入关怀事项" placeholder="请输入关怀事项"
v-model="formData.content"></el-input> v-model="formData.content"></el-input>
</el-form-item> </el-form-item>
@ -70,6 +75,7 @@
format="yyyy-MM-dd HH:mm" format="yyyy-MM-dd HH:mm"
value-format="yyyy-MM-dd HH:mm" value-format="yyyy-MM-dd HH:mm"
type="datetime" type="datetime"
clearable
placeholder="选择时间"> placeholder="选择时间">
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
@ -82,6 +88,7 @@
format="yyyy-MM-dd HH:mm" format="yyyy-MM-dd HH:mm"
value-format="yyyy-MM-dd HH:mm" value-format="yyyy-MM-dd HH:mm"
type="datetime" type="datetime"
clearable
:picker-options="pickerOptions" :picker-options="pickerOptions"
@change="handleTime" @change="handleTime"
placeholder="选择时间"> placeholder="选择时间">

7
src/views/modules/secretaryLog/workLog/form.vue

@ -16,7 +16,8 @@
type="textarea" type="textarea"
maxlength="100" maxlength="100"
show-word-limit show-word-limit
:rows="3" :rows="4"
clearable
:disabled="disabled" :disabled="disabled"
placeholder="请输入内容" placeholder="请输入内容"
v-model="formData.content"></el-input> v-model="formData.content"></el-input>
@ -30,7 +31,8 @@
type="textarea" type="textarea"
maxlength="100" maxlength="100"
show-word-limit show-word-limit
:rows="3" :rows="4"
clearable
:disabled="disabled" :disabled="disabled"
placeholder="请输入工作事项" placeholder="请输入工作事项"
v-model="formData.workType"></el-input> v-model="formData.workType"></el-input>
@ -44,6 +46,7 @@
format="yyyy-MM-dd HH:mm" format="yyyy-MM-dd HH:mm"
value-format="yyyy-MM-dd HH:mm" value-format="yyyy-MM-dd HH:mm"
type="datetime" type="datetime"
clearable
:disabled="disabled" :disabled="disabled"
:picker-options="pickerOptions" :picker-options="pickerOptions"
@change="handleTime" @change="handleTime"

4
src/views/modules/secretaryLog/workLog/index.vue

@ -150,7 +150,7 @@
:close-on-click-modal="false" :close-on-click-modal="false"
:close-on-press-escape="false" :close-on-press-escape="false"
:title="formTitle" :title="formTitle"
width="70%" width="50%"
top="5vh" top="5vh"
class="dialog-h" class="dialog-h"
@closed="diaClose"> @closed="diaClose">
@ -309,7 +309,7 @@ export default {
}, },
async deleteDifficulty (row) { async deleteDifficulty (row) {
const url = "/gov/project/memoDifficulty/delete" const url = "/gov/project/memoWorkDiary/delete"
// const url = "http://yapi.elinkservice.cn/mock/245/gov/project/memoDifficulty/delete" // const url = "http://yapi.elinkservice.cn/mock/245/gov/project/memoDifficulty/delete"
let ids = [row.id] let ids = [row.id]
let params = { let params = {

2
src/views/tips.vue

@ -70,7 +70,7 @@ export default {
} }
.tips-wr-desc { .tips-wr-desc {
width: 100%; width: 100%;
height: 33px; height: 32px;
margin-top: 10px; margin-top: 10px;
padding-left: 20px; padding-left: 20px;
display: -webkit-box; display: -webkit-box;

Loading…
Cancel
Save