d3823c8fa520188e016c6cccbffb8127c3d6e440.svn-base 30 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776
  1. <template>
  2. <div id="systemHeader" >
  3. <div id="systemInformation" class="style_for_ie" style="min-width: 260px;">
  4. <div id="systemInformationIcon">
  5. <img class="logoImg" src="../../assets/images/province_icon.png" alt="" style="width:40px;height:40px;">
  6. </div>
  7. <div id="systemInformationTitle" style="margin-left:10px;font-size:18px;font-weight: 700;">
  8. {{systemInformationTitle}}
  9. </div>
  10. </div>
  11. <!-- <div class="scrollBtn" @click="pointl(0)" v-if="leftBtn && !isFujian"><i class="el-icon-arrow-left"></i></div>-->
  12. <div id="systemMenuContainer"
  13. style="overflow:hidden;width:calc(100% - 520px);font-size: 14.5px;font-family: '微软雅黑, sans-serif" ref="scroll">
  14. <systemMenu @addSystemMenuView='menuItemClick' :changeSystem="changeSystem" @initFinish="initFinish"></systemMenu>
  15. </div>
  16. <!-- <div class="scrollBtn" @click="pointl(1)" v-if="rightBtn && !isFujian"><i class="el-icon-arrow-right"></i></div>-->
  17. <!-- class="systemTheme" -->
  18. <div id="userInforContainer" style="width: 330px;display: flex;justify-content: center;align-items: center">
  19. <div id="orgListContainer" style="width: 100px;" v-if="popperClass">
  20. <!-- <el-form-item label="当前机构"> -->
  21. <el-select @change="changeOrgId" v-model="defaultOrgId" placeholder="test">
  22. <el-option v-for="(item,index) in allOrg" :key="index" :label="item.orgNm" :value="item.orgId">
  23. </el-option>
  24. </el-select>
  25. <!-- </el-form-item> -->
  26. </div>
  27. <div id="otherSystemLinks" style="display:flex;flex-direction:row;justify-content:flex-start;align-items:center">
  28. <el-dropdown>
  29. <span class="el-dropdown-link" style="display: flex;align-items: center;font-size: 13px;color: white;padding-top: 2px;cursor:pointer;">
  30. <img src="../../assets/images/user.png" alt="" style="margin-top: 3px;">&nbsp;{{userName}}
  31. </span>
  32. <el-dropdown-menu slot="dropdown" style="width: 130px;">
  33. <span @click="showModal" style="display: flex;justify-content:left;align-items:center;cursor: pointer;color:#000000;font-size: 14px;letter-spacing: 2px;padding: 8px;font-weight:bold;"><img src="../../assets/images/password.png" style="width: 20px;height:18px;margin-right: 6px;"></img>修改密码</span>
  34. <el-dropdown @command="dropDownClick" v-if="(perType == '1' || perType == '2')" style="width: 100%;">
  35. <span class="el-dropdown-link" style="width: 100%;display: flex;justify-content: left;align-items: center;color:#000000;font-size: 14px;font-weight:bold;padding: 8px;cursor:pointer;">
  36. <img src="../../assets/images/scan.png" title="app下载" style="margin-right:6px;cursor: pointer;width: 20px;height:18px;">
  37. <span>扫描下载app</span>
  38. </span>
  39. <el-dropdown-menu slot="dropdown">
  40. <div style="padding:10px;width: 200px;">
  41. <img :src="qrCodeDownImg" style="width:200px;">
  42. </div>
  43. </el-dropdown-menu>
  44. </el-dropdown>
  45. <!-- <el-dropdown v-if="isSc" style="width: 100%;">-->
  46. <!-- <span class="el-dropdown-link" style="cursor:pointer;width:100%;display: flex;align-items: center;padding: 8px;font-size: 14px;font-weight:bold;color: #000000;cursor:pointer;justify-content:left;">-->
  47. <!-- <img src="../../assets/images/pf.png" alt="" style="margin-top: 3px;width: 20px;height:18px;margin-right: 6px;">&nbsp;-->
  48. <!-- <span>切换皮肤</span>-->
  49. <!-- </span>-->
  50. <!-- <el-dropdown-menu slot="dropdown">-->
  51. <!-- <li style="width:80px;height:30px;display: flex;align-items: center;padding-left: 15px;letter-spacing: 3px;font-weight: bold;font-size: 15px;color:#00213a;border-bottom: 1px solid #cdd4d2;cursor:pointer;" @click="changeThem(0)">-->
  52. <!-- <span style="display: block;width: 20px;height:20px;background: #00213a;border-radius: 10px"></span>&nbsp;&nbsp;深色-->
  53. <!-- </li>-->
  54. <!-- <li style="width:80px;height:30px;display: flex;align-items: center;padding-left: 15px;letter-spacing: 3px;font-weight: bold;font-size: 15px;color:#37baf3;cursor:pointer;" @click="changeThem(1)">-->
  55. <!-- <span style="display: block;width: 20px;height:20px;background: #37baf3;border-radius: 10px"></span>&nbsp;&nbsp;浅色-->
  56. <!-- </li>-->
  57. <!-- </el-dropdown-menu>-->
  58. <!-- </el-dropdown>-->
  59. </el-dropdown-menu>
  60. </el-dropdown>
  61. <!-- <div-->
  62. <!-- style="width: 30px;height:30px;display: flex;justify-content: center;align-items: center;background: #89d6f8;border-radius: 15px;margin-right: 5px;">-->
  63. <!-- <img src="../../assets/images/user.png" alt=""></div>-->
  64. <!-- <div-->
  65. <!-- style="display:flex;flex-direction:column;justify-content:flex-start;align-items:flex-start;align-items: center;font-size: 10px;">-->
  66. <!-- <span class="account">{{userName}}</span>-->
  67. <!-- &lt;!&ndash; <span class="account">{{persType}}</span> &ndash;&gt;-->
  68. <!-- </div>-->
  69. <el-dropdown @command="dropDownClick" v-if="(perType == '1' || perType == '2')">
  70. <span class="el-dropdown-link change_system_text" style="">
  71. 切换系统
  72. <!-- <img src="../../assets/img/weibiaoti-.png" title="切换主题" style="margin: 10px 0px 0 10px;cursor: pointer;"> -->
  73. </span>
  74. <el-dropdown-menu slot="dropdown">
  75. <el-dropdown-item :command="'2'" :class="{'isSelect':curApp==2}">切换至稽察系统</el-dropdown-item>
  76. <el-dropdown-item :command="'1'" :class="{'isSelect':curApp==1}">切换至督查系统</el-dropdown-item>
  77. <el-dropdown-item :command="'3'" v-if="isCd" :class="{'isSelect':curApp==3}">切换至日常监督系统</el-dropdown-item>
  78. <!-- <el-dropdown-item :command="'theme'">切换主题</el-dropdown-item>-->
  79. </el-dropdown-menu>
  80. </el-dropdown>
  81. <!-- <img v-else src="../../assets/img/weibiaoti-.png" title="切换主题" style="margin: 5px 0px 0 10px;cursor: pointer;"-->
  82. <!-- @click="changeTheme">-->
  83. <img class="exit" @click="exit" src="../../assets/images/exits.png" alt="" title="退出">
  84. <el-dropdown>
  85. <span class="el-dropdown-link" style="display: flex;align-items: center;font-size: 13px;color: white;cursor:pointer;margin-left: 10px;">
  86. <img src="../../assets/images/downIcon.png" alt="" style="margin-top: 3px;width: 20px;height:20px;">&nbsp;
  87. </span>
  88. <el-dropdown-menu slot="dropdown">
  89. <li style="width:130px;height:30px;display: flex;align-items: center;font-weight: bold;font-size: 15px;color:#37baf3;border-bottom: 1px solid #cdd4d2;cursor:pointer;">
  90. <a :href="isFujian?`${hostUrl}${pageOfficeUrlFj}`:pageOfficeUrl" download="posetup.exe" style="text-decoration: underline;text-indent: 10px;">PageOffice下载</a>
  91. </li>
  92. <li style="width:130px;height:30px;display: flex;align-items: center;font-weight: bold;font-size: 15px;color:#37baf3;cursor:pointer;">
  93. <a :href="wpsUrl" download="wps" style="text-decoration: underline;text-indent: 10px;" target="_blank">WPS下载</a>
  94. </li>
  95. </el-dropdown-menu>
  96. </el-dropdown>
  97. <!-- <div v-if="isOrgIdType">-->
  98. <!-- <span style="font-size: 12px; margin: 0 15px;"> | </span>-->
  99. <!-- <a href="../../static/help.html" target="_blank" class="toptitle">帮助中心</a>-->
  100. <!-- </div>-->
  101. <!-- <ul v-show="isShow" @mouseover="showItem" @mouseout="hideItem">-->
  102. <!-- <li @click="showModal">修改密码</li>-->
  103. <!-- <li @click="exit">退&#x3000;&#x3000;出</li>-->
  104. <!-- </ul>-->
  105. </div>
  106. </div>
  107. <!-- <m-password v-show='modalShow' @modifySuccess="modifyPwd"></m-password> -->
  108. <el-dialog
  109. title="修改密码"
  110. :visible.sync="dialogVisible"
  111. width="350px">
  112. <div style="width: 300px;padding-bottom: 10px">
  113. <el-form ref="form" :model="form" :rules="rules" label-width="80px">
  114. <el-form-item label="新密码" prop="pwd">
  115. <el-input v-model="form.pwd"></el-input>
  116. </el-form-item>
  117. <el-form-item label="" style="margin-top: 30px;">
  118. <el-button @click="dialogVisible = false">取 消</el-button>
  119. <el-button type="primary" @click="updatePass">确 定</el-button>
  120. </el-form-item>
  121. </el-form>
  122. </div>
  123. </el-dialog>
  124. </div>
  125. </template>
  126. <script>
  127. // import('../../assets/')
  128. import {ipPath} from '../../utils/component'
  129. import aes from '../../utils/aes';
  130. import theme from '../../store/theme'
  131. import orgStatus from '../../store/orgChange.js'
  132. import request from '@util/gw_ajax_request'
  133. import { mapGetters, mapActions } from 'vuex'
  134. import systemMenu from './systemMenuBar.vue'
  135. // import {dictList} from '../../utils/myRequest/api.js'
  136. // import mPassword from '../../views/Login/modifyPwd.vue'
  137. import {hostUrl} from '@util/global_variable'
  138. let validatePwd = (rule, value, callback) => {
  139. if (value === '') {
  140. callback(new Error('密码不能为空'));
  141. } else if(!(/^(?=.*[0-9].*)(?=.*[A-Z].*)(?=.*[a-z].*)(?=.*[`~!@#$%^&*()_\-+=<>.?:"{}].*).{8,20}$/.test(value))) {
  142. callback(new Error("密码必须包含大写字母,小写字母,数字,特殊字符,且长度为8到20位"))
  143. } else {
  144. callback();
  145. }
  146. };
  147. export default {
  148. name: 'systemHeader',
  149. components: {
  150. 'systemMenu': systemMenu,
  151. // 'm-password': mPassword
  152. },
  153. data() {
  154. return {
  155. rules:{
  156. pwd: [{required: true, validator: validatePwd, trigger: "change"}],
  157. },
  158. form:{
  159. guid:localStorage.getItem("userid"),
  160. pwd:""
  161. },
  162. dialogVisible:false,
  163. leftBtn: false,
  164. rightBtn: false,
  165. themeName: 'light',
  166. systemInformationTitle: '福建水利监督',
  167. systemInformationIcon: '../assets/icon/lankaoLogo.png',
  168. userName: localStorage.getItem('account'),
  169. dictAll: null,
  170. dictTypes: [],
  171. dictionary: {},
  172. dictItem: {},
  173. isShow: 0,
  174. modalShow: 0,
  175. defaultOrgId: localStorage.getItem('currentOrgId'),
  176. allOrg: [],
  177. popperClass: 'hide_option',
  178. logoImg: '../assets/images/province_logo.png',
  179. //allOrg:localStorage.getItem("allOrg")
  180. changeSystem: false,
  181. perType: localStorage.getItem('persType'),
  182. isOrgIdType: false,
  183. qrCodeDownImg:"",
  184. pageOfficeUrl:"/pageofficePath/posetup.exe",
  185. pageOfficeUrlFj:"/upload/office/posetup.exe",
  186. wpsUrl:"https://www.wps.cn/"
  187. }
  188. },
  189. computed: {
  190. persType: function () {
  191. let pt = localStorage.getItem('persType');
  192. let re = '';
  193. if (pt) {
  194. switch (pt) {
  195. case '1': re = '管理员'; break;
  196. case '2': re = '机构领导'; break;
  197. case '3': re = '督查人员'; break;
  198. }
  199. }
  200. return re;
  201. },
  202. persId() {
  203. return localStorage.getItem('userid') ? localStorage.getItem('userid') : ''
  204. },
  205. ownApp() {
  206. return localStorage.getItem('ownApp');
  207. },
  208. isSc(){
  209. if(localStorage.getItem('currentRlcode').substring(0,2)=='51'){
  210. return true;
  211. }else{
  212. return false;
  213. }
  214. },
  215. isFujian(){
  216. if(localStorage.getItem('currentRlcode').substring(0,2)=='35'){
  217. return true;
  218. }else{
  219. return false;
  220. }
  221. },
  222. isCd(){
  223. var path = window.location.href;
  224. return path.indexOf("221.237.107.122")>-1
  225. },
  226. hostUrl(){
  227. return hostUrl
  228. },
  229. curApp(){
  230. return localStorage.getItem('ownApp')
  231. },
  232. isHb(){
  233. if(localStorage.getItem('currentRlcode') && localStorage.getItem('currentRlcode').substring(0,2)=="42"){
  234. return true;
  235. }else{
  236. return false;
  237. }
  238. }
  239. },
  240. created() {
  241. this.isOrgIdType = false;
  242. let ownApp = localStorage.getItem('ownApp')
  243. let currentOrgId = localStorage.getItem("currentOrgId")
  244. var path = window.location.href;
  245. if (ownApp == 1) {
  246. this.logoImg = '../assets/images/province_logo.png'
  247. if (path.indexOf('221.237.107.122')>-1) {
  248. this.systemInformationTitle = '成都市水务监督'
  249. }else if (currentOrgId == '034') {
  250. this.systemInformationTitle = '福建水利监督平台'
  251. } else if (currentOrgId == '041') {
  252. this.systemInformationTitle = '水利督查'
  253. } else if (localStorage.getItem('currentRlcode').substring(0,2)=='37') {
  254. this.systemInformationTitle = '山东省水利监督信息系统'
  255. } else if (currentOrgId == '055') {
  256. this.systemInformationTitle = '海南水务监督平台'
  257. }else if (localStorage.getItem('currentRlcode').substring(0,2)=='44') {
  258. this.systemInformationTitle = '广东省水利监督'
  259. }else {
  260. this.systemInformationTitle = localStorage.getItem("currentOrgNm") + '水利监督'
  261. }
  262. } else if(ownApp == 2){
  263. this.logoImg = '../assets/images/province_logo.png'
  264. if (path.indexOf('221.237.107.122')>-1) {
  265. this.systemInformationTitle = '成都市水务监督'
  266. } else if (currentOrgId == '034') {
  267. this.systemInformationTitle = '福建水利稽察平台'
  268. } else if (currentOrgId == '036'){
  269. this.systemInformationTitle = '浙江省水利稽察数字化应用'
  270. } else if (currentOrgId == '041') {
  271. this.systemInformationTitle = '水利稽察'
  272. } else if (localStorage.getItem('currentRlcode').substring(0,2)=='37') {
  273. this.systemInformationTitle = '山东省水利稽察信息系统'
  274. } else if (currentOrgId == '055') {
  275. this.systemInformationTitle = '海南水务稽察平台'
  276. } else if (localStorage.getItem('currentRlcode').substring(0,2)=='44') {
  277. this.systemInformationTitle = '广东省水利稽察'
  278. }else {
  279. this.systemInformationTitle = localStorage.getItem("currentOrgNm") + '水利稽察'
  280. this.isOrgIdType = true;
  281. }
  282. }else{
  283. this.systemInformationTitle = '成都市水务监督'
  284. }
  285. // this.changeTitle()
  286. },
  287. mounted() {
  288. // this.$nextTick(() => {
  289. // this.resizeScroll();
  290. // });
  291. ipPath(this);
  292. window.addEventListener('resize', () => {
  293. this.resizeScroll();
  294. })
  295. this.allOrg = JSON.parse(localStorage.getItem("allOrg"));
  296. console.log(this.allOrg);
  297. // 是否显示切换省份下拉框 省份为一个则不显示
  298. this.popperClass = this.allOrg.length && this.allOrg.length > 1 ? true : false
  299. if(this.isHb){
  300. setTimeout(()=>{
  301. if (!localStorage.getItem('hasReloaded')) {
  302. localStorage.setItem('hasReloaded', 'true');
  303. window.location.reload();
  304. }
  305. },600)
  306. }
  307. },
  308. methods: {
  309. changeThem(type){
  310. if(type=="0"){
  311. document.cookie = "isDcTheme="+escape('1');
  312. localStorage.setItem("style","0");
  313. document.documentElement.style.setProperty('--theme_head_bar_active','#0e4f74');
  314. document.documentElement.style.setProperty('--theme_head_color','#003e60');
  315. document.documentElement.style.setProperty('--theme_head_bar','linear-gradient(0deg,rgb(0 44 76),rgb(0 60 93),rgb(0 51 80))');
  316. document.documentElement.style.setProperty('--main_background',`url(${require('../../assets/bjdc.png')}) no-repeat`);
  317. document.documentElement.style.setProperty('--header_background',`url(${require('../../assets/headerdc.png')}) no-repeat`);
  318. document.documentElement.style.setProperty('--bg_color','#001C2E');
  319. document.documentElement.style.setProperty('--border-color','#002d49');
  320. document.documentElement.style.setProperty('--main_color','#01c3dc');
  321. document.documentElement.style.setProperty('--scrollbar-color','#006397 #001C2E');
  322. document.documentElement.style.setProperty('--hover-bg','#07537b');
  323. document.documentElement.style.setProperty('--hover-color','#64b2ba');
  324. document.documentElement.style.setProperty('--summary-bg','linear-gradient(180deg, #FFFFFF 0%, #ADE8FA 100%)');
  325. document.documentElement.style.setProperty('--summary-color','#C1F053');
  326. document.documentElement.style.setProperty('--summary-img-bg','none');
  327. document.documentElement.style.setProperty('--echart_title','#084d74');
  328. document.documentElement.style.setProperty('--echart_border','5px solid #003d5e');
  329. document.documentElement.style.setProperty('--echarts_map_bg','#002845');
  330. document.documentElement.style.setProperty('--echarts_map_bg_start','#00497d');
  331. document.documentElement.style.setProperty('--echarts_map_spin','#ff9b41');
  332. document.documentElement.style.setProperty('--news_color','#aae0fc');
  333. document.documentElement.style.setProperty('--news_border','1px solid #4f8dc0');
  334. document.documentElement.style.setProperty('--tip_bg','#00213a');
  335. document.documentElement.style.setProperty('--tip_color','#2682b4');
  336. document.documentElement.style.setProperty('--boxborder_color','1px solid #144365');
  337. if(this.$route.fullPath.indexOf("/home")>-1){
  338. this.$router.push("/home"+"?tm="+new Date().getTime());
  339. }
  340. if(this.$route.fullPath.indexOf("/jchome")>-1){
  341. this.$router.push("/jchome"+"?tm="+new Date().getTime());
  342. }
  343. }
  344. if(type=="1"){
  345. document.cookie = "isDcTheme="+escape('0');
  346. localStorage.setItem("style","1");
  347. document.documentElement.style.setProperty('--theme_head_bar_active','#147DF4');
  348. document.documentElement.style.setProperty('--theme_head_color','#0dabf5');
  349. document.documentElement.style.setProperty('--theme_head_bar','linear-gradient(0deg,rgba(8,146,233,1),rgba(9,169,244,1),rgba(122,210,255,1))');
  350. document.documentElement.style.setProperty('--main_background',`url(${require('../../assets/scbg.jpg')}) no-repeat`);
  351. document.documentElement.style.setProperty('--header_background','#09a4f1');
  352. document.documentElement.style.setProperty('--bg_color','white');
  353. document.documentElement.style.setProperty('--border-color','#C0C4CC');
  354. document.documentElement.style.setProperty('--main_color','#0c92d5');
  355. document.documentElement.style.setProperty('--scrollbar-color','#0c92d5 white');
  356. document.documentElement.style.setProperty('--hover-bg','#0c92d5');
  357. document.documentElement.style.setProperty('--hover-color','white');
  358. document.documentElement.style.setProperty('--summary-bg','linear-gradient(180deg, #0c92d5 0%, #0c92d5 100%)');
  359. document.documentElement.style.setProperty('--summary-color','#e6a23c');
  360. document.documentElement.style.setProperty('--summary-img-bg','#0c92d5');
  361. document.documentElement.style.setProperty('--echart_title','#09a4f1');
  362. document.documentElement.style.setProperty('--echart_border','5px solid #09a4f1');
  363. document.documentElement.style.setProperty('--echarts_map_bg','#5aaef1');
  364. document.documentElement.style.setProperty('--echarts_map_bg_start','#3384da');
  365. document.documentElement.style.setProperty('--echarts_map_spin','#ff9b41');
  366. document.documentElement.style.setProperty('--news_color','#88898d');
  367. document.documentElement.style.setProperty('--news_border','1px solid #C0C4CC');
  368. document.documentElement.style.setProperty('--tip_bg','#09a4f1');
  369. document.documentElement.style.setProperty('--tip_color','white');
  370. document.documentElement.style.setProperty('--boxborder_color','1px solid #09a4f1');
  371. if(this.$route.fullPath.indexOf("/home")>-1){
  372. this.$router.push("/home"+"?tm="+new Date().getTime());
  373. }
  374. if(this.$route.fullPath.indexOf("/jchome")>-1){
  375. this.$router.push("/jchome"+"?tm="+new Date().getTime());
  376. }
  377. }
  378. },
  379. updatePass(){
  380. this.$refs['form'].validate((valid) => {
  381. if (valid) {
  382. var obj = {
  383. guid:this.form.guid,
  384. pwd:aes.encrypt(this.form.pwd)
  385. }
  386. request.post(`/bis/insp/updatePassword`,obj).then(res => {
  387. if (res.success) {
  388. this.$message.success("更新成功");
  389. this.dialogVisible = false;
  390. this.form.pwd = "";
  391. } else {
  392. this.$message.error(res.message);
  393. }
  394. });
  395. } else {
  396. return false
  397. }
  398. })
  399. },
  400. initFinish() {
  401. this.resizeScroll();
  402. },
  403. pointl(p) {
  404. var el = this.$refs.scroll;
  405. var _self = this;
  406. if (p == 0) {
  407. if (el.scrollLeft <= 100) {
  408. //el.scrollLeft=0;
  409. _self.trans(el, el.scrollLeft - 0, "left");
  410. } else {
  411. //el.scrollLeft-=50;
  412. _self.trans(el, 100, "left");
  413. }
  414. } else {
  415. if (el.scrollWidth - el.scrollLeft <= 100) {
  416. //el.scrollLeft=el.scrollWidth;
  417. _self.trans(el, el.scrollWidth - el.scrollLeft, "right");
  418. } else {
  419. //el.scrollLeft+=50;
  420. _self.trans(el, 100, "right");
  421. }
  422. }
  423. },
  424. resizeScroll() {
  425. var el = this.$refs.scroll;
  426. var _self = this;
  427. setTimeout(function () {
  428. if (el.scrollWidth > el.clientWidth) {
  429. _self.leftBtn = true;
  430. _self.rightBtn = true;
  431. } else {
  432. _self.leftBtn = false;
  433. _self.rightBtn = false;
  434. }
  435. }, 100)
  436. },
  437. trans(o, p, t) {
  438. var ms = 1000 / 100;
  439. var i = 0;
  440. if (p == 0) {
  441. return;
  442. }
  443. var myInterval = setInterval(function () {
  444. if (t == "left") {
  445. o.scrollLeft -= 1;
  446. i++
  447. if (p == i) {
  448. clearInterval(myInterval)
  449. }
  450. }
  451. if (t == "right") {
  452. o.scrollLeft += 1;
  453. i++
  454. if (p == i) {
  455. clearInterval(myInterval)
  456. }
  457. }
  458. }, ms)
  459. },
  460. changeTheme() {
  461. if (this.themeName == 'light') {
  462. theme.commit('changeTestMsg', 'dark');
  463. this.themeName = 'dark';
  464. } else {
  465. theme.commit('changeTestMsg', 'light');
  466. this.themeName = 'light';
  467. }
  468. },
  469. changeOrgId(orgId) {
  470. localStorage.setItem("currentOrgId", orgId);
  471. let currentOrgObj = this.allOrg.filter(ele => ele.orgId == orgId)
  472. localStorage.setItem("currentRlcode", currentOrgObj[0].rlcode);
  473. this.ownAdName = localStorage.getItem('currentRlcode') == '660000000000' ? '师' : "省份"
  474. // 改变全局adcode状态
  475. this.$store.commit('changeAdCode', currentOrgObj[0].rlcode)
  476. localStorage.setItem("currentOrgNm", currentOrgObj[0].orgNm);
  477. console.log(localStorage.getItem('currentOrgNm'))
  478. orgStatus.commit('changeOrg', orgId);
  479. this.initRoot();
  480. this.$router.go(0);
  481. },
  482. changeTitle() {
  483. let currentOrgId = localStorage.getItem("currentOrgId")
  484. if (currentOrgId == '034') {
  485. document.title = '福建水利监督'
  486. } else {
  487. document.title = '督查业务系统'
  488. }
  489. },
  490. menuItemClick: function (menuItem) {
  491. this.$emit('addSystemMenuView', { viewItem: menuItem.viewItem });
  492. },
  493. showItem() {
  494. this.isShow = 1
  495. },
  496. hideItem() {
  497. this.isShow = 0
  498. },
  499. showModal() {
  500. this.dialogVisible = true;
  501. },
  502. GetQueryString(name) {
  503. var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
  504. var r = window.location.search.substr(1).match(reg);
  505. if (r != null) return unescape(r[2]);
  506. return null;
  507. },
  508. exit() {
  509. this.$message.success('退出成功')
  510. if(localStorage.getItem("isSplit")=="1"){
  511. localStorage.clear();
  512. this.$router.push('/logindc')
  513. }else if(localStorage.getItem("isSplit")=="2"){
  514. localStorage.clear();
  515. this.$router.push('/loginjc')
  516. }else{
  517. localStorage.clear();
  518. this.$router.push('/login')
  519. }
  520. },
  521. modifyPwd(val) {
  522. this.modalShow = val
  523. },
  524. dropDownClick(val) {
  525. // //debugger
  526. if (val == 'theme') {
  527. this.changeTheme()
  528. } else {
  529. // let ownApp = localStorage.getItem('ownApp')
  530. if (val == '2') {
  531. localStorage.setItem('ownApp', '2')
  532. orgStatus.commit('changeSystem', '2')
  533. this.$router.push('/jchome');
  534. } else if(val == '1'){
  535. localStorage.setItem('ownApp', '1')
  536. orgStatus.commit('changeSystem', '1')
  537. this.$router.push('/home');
  538. }else{
  539. localStorage.setItem('ownApp', '3')
  540. orgStatus.commit('changeSystem', '3')
  541. this.$router.push('/cdjctz');
  542. }
  543. this.changeSystem = !this.changeSystem
  544. // 切换系统时默认使用浅色主题
  545. theme.commit('changeTestMsg', 'light');
  546. this.themeName = 'light';
  547. }
  548. },
  549. initRoot(){
  550. if(this.isHb){
  551. const scriptElement = document.createElement('script');
  552. scriptElement.async = true;
  553. scriptElement.defer = true;
  554. scriptElement.src="http://183.95.190.106:8000/embed.js?protocol=http&host=10.142.147.43:8080&token=2172e2f8daf74a11&t="+new Date().getTime()
  555. document.head.appendChild(scriptElement);
  556. }
  557. }
  558. }
  559. }
  560. </script>
  561. <style>
  562. @import url("/src/assets/iconfont/iconfont.css");
  563. .isSelect{
  564. color:#0daaf4 !important;
  565. }
  566. .scrollBtn {
  567. width: 15px;
  568. height: 100%;
  569. display: flex;
  570. align-items: center;
  571. justify-content: center;
  572. background: white;
  573. margin-left: 10px;
  574. margin-right: 10px;
  575. color: #0daaf4;
  576. font-weight: bold;
  577. font-size: 20px;
  578. cursor: pointer;
  579. }
  580. .systemTheme {
  581. cursor: pointer;
  582. width: 1vw;
  583. height: 1vw;
  584. background-image: url('/src/assets/img/weibiaoti-.png');
  585. }
  586. .el-select .el-input__inner {
  587. cursor: pointer;
  588. font-size: 10px !important;
  589. }
  590. #systemHeader.light_back {
  591. background: url("/src/assets/header.png") no-repeat;
  592. background-size: cover;
  593. }
  594. #systemHeader.dark_back {
  595. background-color: #0d2145;
  596. background-image: url("/src/assets/systemMenuBarDark.png");
  597. background-repeat: no-repeat;
  598. background-size: 100% 100%;
  599. }
  600. #systemHeader {
  601. background: var(--theme_head_color);
  602. z-index: 10;
  603. height: 6vh;
  604. width: 100%;
  605. max-height: 6vh;
  606. /* background-color: rgb(25,24,81); */
  607. /* 27,29,85 */
  608. /* background-image:linear-gradient(to bottom,rgb(25,24,81), rgb(27,29,85)); */
  609. /*background-color: #0069d5;*/
  610. /* background-image: url("https://www.transparenttextures.com/patterns/bright-squares.png"); */
  611. /* background: url("/src/assets/systemMenuBar.png") no-repeat; */
  612. -webkit-background-size: cover;
  613. -moz-background-size: cover;
  614. -o-background-size: cover;
  615. background-size: cover;
  616. display: flex;
  617. flex-direction: row;
  618. justify-content: space-between;
  619. align-items: center;
  620. color: aliceblue;
  621. border-bottom-color: rgba(255, 255, 255, 0.15);
  622. border-bottom-style: solid;
  623. border-bottom-width: 0px;
  624. }
  625. #systemInformation {
  626. margin-left: 10px;
  627. /*text-shadow: 1px 1px 10px rgb(255,255,255,1);*/
  628. /*font-family: inherit!important;*/
  629. display: flex;
  630. flex-direction: row;
  631. justify-content: flex-start;
  632. align-items: center;
  633. /*flex-basis:19%;*/
  634. font-family: SourceHanSansCN-Medium;
  635. font-weight: 500;
  636. color: rgba(255, 255, 255, 1);
  637. /* text-shadow:1px 2px 0px rgba(0, 0, 0, 0.42); */
  638. background: linear-gradient(0deg, rgba(246, 240, 240, 1) 0%, rgba(226, 226, 226, 1) 45.556640625%, rgba(255, 255, 255, 1) 47.900390625%, rgba(243, 243, 243, 1) 100%);
  639. -webkit-background-clip: text;
  640. -webkit-text-fill-color: transparent;
  641. }
  642. #systemInformationIcon {
  643. width: 36px;
  644. display: flex;
  645. flex-direction: row;
  646. justify-content: flex-start;
  647. align-items: center;
  648. background-color: rgba(255, 255, 255, .4);
  649. border-radius: 6px;
  650. }
  651. .change_system_text {
  652. color: #fff;
  653. font-size: 12px;
  654. margin-left: 10px;
  655. border: solid 1px #fff;
  656. padding: 2px;
  657. border-radius: 5px;
  658. cursor: pointer;
  659. }
  660. @media screen and (min-width: 1680px) {
  661. #systemInformationIcon {
  662. width: 42px;
  663. }
  664. }
  665. #otherSystemLinks {
  666. margin-right: 10px;
  667. /* line-height: 60px; */
  668. }
  669. #otherSystemLinks ul {
  670. position: fixed;
  671. top: 59px;
  672. right: 6px;
  673. padding: 10px 10px;
  674. background-color: #fff;
  675. color: #666;
  676. font-size: 14px;
  677. list-style: none;
  678. z-index: 2001;
  679. }
  680. #otherSystemLinks ul li {
  681. padding: 0 10px;
  682. line-height: 36px;
  683. cursor: pointer;
  684. }
  685. #otherSystemLinks ul li:first-child {
  686. border-bottom: solid 1px #eee;
  687. }
  688. #otherSystemLinks ul li:hover {
  689. color: #0069d5;
  690. }
  691. #otherSystemLinks a {
  692. font-size: 14px;
  693. color: white !important;
  694. font-family: inherit !important;
  695. text-decoration-line: none;
  696. font-weight: 50;
  697. }
  698. #otherSystemLinks a:hover {
  699. /* background-color: aqua; */
  700. color: aqua !important;
  701. font-family: inherit !important;
  702. }
  703. #systemMenuContainer {
  704. height: 100%;
  705. }
  706. .logoImg {
  707. width: 90%;
  708. }
  709. .account {
  710. display: inline-block;
  711. vertical-align: top;
  712. margin-top: 2px;
  713. font-size: 14px;
  714. }
  715. .exit {
  716. margin-left: 12px;
  717. margin-top: 5px;
  718. cursor: pointer;
  719. }
  720. .hide_option {
  721. opacity: 0
  722. }
  723. .show_option {
  724. opacity: 1
  725. }
  726. /* ie11 */
  727. @media all and (-ms-high-contrast:none) {
  728. .style_for_ie {
  729. background: none !important;
  730. }
  731. }
  732. /* ie10 */
  733. @media screen and (-ms-high-contrast: active),
  734. (-ms-high-contrast: none) {
  735. .style_for_ie {
  736. background: none !important;
  737. }
  738. }
  739. </style>