15179599649
2024-01-20 2f447d2cf565cd98c17397a2cb3ea3497eef368c
'修改第二次投票不能投选本部门人员entity'
11 files modified
160 ■■■■ changed files
src/App.vue 12 ●●●●● patch | view | raw | blame | history
src/main.js 42 ●●●●● patch | view | raw | blame | history
src/router/axios.js 1 ●●●● patch | view | raw | blame | history
src/store/index.js 6 ●●●● patch | view | raw | blame | history
src/views/Addmessage/index.vue 1 ●●●● patch | view | raw | blame | history
src/views/Appraising/index.vue 15 ●●●●● patch | view | raw | blame | history
src/views/examine/index.vue 15 ●●●●● patch | view | raw | blame | history
src/views/login/index.vue 39 ●●●● patch | view | raw | blame | history
src/views/message/index.vue 15 ●●●●● patch | view | raw | blame | history
src/views/toAppraising/toAppraisingthree.vue 10 ●●●●● patch | view | raw | blame | history
vue.config.js 4 ●●●● patch | view | raw | blame | history
src/App.vue
@@ -1,6 +1,6 @@
<template>
  <div id="app">
    <router-view v-wechat-title='$route.meta.title'></router-view>
    <router-view v-wechat-title="$route.meta.title"></router-view>
    <van-overlay :show="showif">
      <div class="wrapper">
        <van-loading type="spinner" size="80d" />
@@ -11,12 +11,17 @@
</template>
<script>
import store from './store/index'
export default {
  data() {
    return {};
  },
  created() {},
  created() {
    // console.log(store.state)
    //   Loginto(store.state.refreshdata).then(res => {
    //     console.log(res)
    //   })
  },
  computed: {
    showif() {
      return this.$store.state.overlayshow;
@@ -45,5 +50,4 @@
    color: #a8a8a8;
  }
}
</style>
src/main.js
@@ -2,9 +2,6 @@
import App from "./App.vue";
import router from "./router/page";
import store from "./store";
import * as echarts from "echarts";
// import ElementUI from "element-ui";
// import "element-ui/lib/theme-chalk/index.css";
import "./styles/index.scss";
import "font-awesome/css/font-awesome.min.css";
import axios from "./router/axios";
@@ -15,6 +12,7 @@
import "vant/lib/index.css";
import { Picker } from 'vant';
router.beforeEach((to, from, next) => {
  if (to.meta.title) {
    document.title = to.meta.title;
@@ -23,29 +21,7 @@
  }
  next();
});
// import DC from "@dvgis/dc-sdk/dist/dc.base.min"; //基础包
// import DcCore from "@dvgis/dc-sdk/dist/dc.core.min"; //核心包
// import DcChart from "@dvgis/dc-sdk/dist/dc.chart.min"; //chart包
// import DcMapv from "@dvgis/dc-sdk/dist/dc.mapv.min"; //mapv包
// import DcS3M from "@dvgis/dc-sdk/dist/dc.s3m.min"; //s3m包
// import "@dvgis/dc-sdk/dist/dc.core.min.css"; // 主要样式
// import * as turf from "@turf/turf";
// Vue.prototype.$echarts = echarts;
// Vue.prototype.$turf = turf;
// global.DC = DC;
// global.DC;
// global.echarts = echarts;
// global.viewer = null;
// DC.use(DcCore); //安装DC核心库
// DC.use(DcChart); //安装DC图标库,使用前确保echarts为全局函数
// DC.use(DcMapv); //安装Mapv库
// DC.use(DcS3M); //安装DcS3M库
Vue.config.productionTip = false;
// Vue.use(ElementUI);
Vue.use(Vant);
Vue.use(Picker);
@@ -56,3 +32,19 @@
  store,
  render: (h) => h(App),
}).$mount("#app");
// router.beforeEach((to, from, next) => {
//   setInterval(() => {
//     console.log('111')
//   }, 1000);
  // if (!localStorage.getItem('token')) {
  //     // Token不存在则重定向到登录页
  //     next('/login');
  // } else {
  //     // Token存在则放行
  //     next();
  //     setInterval(() => {
  //         refreshToken();
  //     }, 60 * 60 * 1000); // 每小时更新一次Token
  // }
// })
src/router/axios.js
@@ -20,6 +20,7 @@
import router from "../router/page";
import "vant/lib/index.css";
import store from "../store/index";
import { Loginto } from "@/api/hfiveget/index.js";
Vue.use(Vant);
// 调用后台管理的
src/store/index.js
@@ -15,6 +15,7 @@
        overlayshow: false,
        logintopath: '',
        infoone: { index: 0, num: 0 },
        refreshdata: {}
    },
    mutations: {
        updateoverlayshow(state) {
@@ -25,7 +26,10 @@
        },
        updatelogintopath(state, router) {
            state.logintopath = router
        }
        },
        updaterefreshdata(state, data) {
            state.refreshdata = data
        },
    },
    getters
})
src/views/Addmessage/index.vue
@@ -30,7 +30,6 @@
        <van-button type="primary" @click="submit(2)" v-show="!this.shownim">匿名留言</van-button>
      <van-button type="primary" @click="submit(1)">实名留言</van-button>
      </div>
    </div>
  </div>
</template>
src/views/Appraising/index.vue
@@ -35,13 +35,26 @@
  taskListByPolling
} from "@/api/hfiveget/index.js";
import store from "../../store/index";
import { setToken, getToken } from "@/utils/auth.js";
import { Loginto } from "@/api/hfiveget/index.js";
export default {
  data() {
    return {
      ViewData: []
    };
  },
  beforeCreate() {
    Loginto(JSON.parse(localStorage.getItem("refreshdatabaocun"))).then(res => {
      setToken(res.data.refresh_token);
    });
    setInterval(() => {
      Loginto(JSON.parse(localStorage.getItem("refreshdatabaocun"))).then(
        res => {
          setToken(res.data.refresh_token);
        }
      );
    }, 60 * 60 * 1000);
  },
  computed: {},
  created() {
    if (localStorage.getItem("tokensave") == null) {
src/views/examine/index.vue
@@ -62,6 +62,8 @@
} from "@/api/hfiveget/index.js";
import Checkandassess from "../Checkandassess/index.vue";
import store from "../../store/index";
import { setToken, getToken } from "@/utils/auth.js";
import { Loginto } from "@/api/hfiveget/index.js";
export default {
  components: {
    Checkandassess
@@ -74,7 +76,18 @@
  },
  mounted() {},
  computed: {},
  beforeCreate() {},
  beforeCreate() {
    Loginto(JSON.parse(localStorage.getItem("refreshdatabaocun"))).then(res => {
      setToken(res.data.refresh_token);
    });
    setInterval(() => {
      Loginto(JSON.parse(localStorage.getItem("refreshdatabaocun"))).then(
        res => {
          setToken(res.data.refresh_token);
        }
      );
    }, 60 * 60 * 1000);
  },
  created() {
    store.commit("updatelogintopath", "/examine");
    if (localStorage.getItem("tokensave") == null) {
src/views/login/index.vue
@@ -31,6 +31,7 @@
import { showSuccessToast, showFailToast } from "vant";
import { GetCode, Loginto } from "@/api/hfiveget/index.js";
import { setToken } from "@/utils/auth.js";
import store from "../../store/index";
export default {
  data() {
    return {
@@ -92,20 +93,20 @@
      const isValidcode = this.codecheck(this.Code);
      const isValiduser = this.usernamecheck(this.username);
      if (isValidcode && isValiduser) {
        let Data = {
          tenantId: "000000",
          grant_type: "smsCode",
          phone: this.username,
          code: this.Code
        };
        // let Data = {
        //   tenantId: "000000",
        //   username: this.username,
        //   grant_type: "password",
        //   password: "94e8cde4612b3fd390677d42e7b22002",
        //   scope: "all",
        //   type: "account"
        //   grant_type: "smsCode",
        //   phone: this.username,
        //   code: this.Code
        // };
        let Data = {
          tenantId: "000000",
          username: this.username,
          grant_type: "password",
          password: "94e8cde4612b3fd390677d42e7b22002",
          scope: "all",
          type: "account"
        };
        Loginto(Data).then(res => {
          if (res.data.code == 400) {
            this.$toast.fail(res.data.msg);
@@ -121,6 +122,22 @@
            localStorage.setItem("nick_name", res.data.nick_name); //姓名
            localStorage.setItem("dept_name", res.data.dept_name); //部门
            localStorage.setItem("post_name", res.data.post_name); //职位
            let refreshdata = {
              tenantId: res.data.tenant_id,
              refresh_token: res.data.refresh_token,
              grant_type: "refresh_token",
              scope: "all"
            };
            localStorage.setItem(
              "refreshdatabaocun",
              JSON.stringify(refreshdata)
            );
            // setTimeout(() => {
            //   Loginto(refreshdata).then(res => {
            //     console.log(res);
            //   });
            // }, 1000);
            store.commit("updaterefreshdata", refreshdata);
            setToken(res.data.access_token);
            this.$toast.success("登录成功");
          }
src/views/message/index.vue
@@ -78,6 +78,8 @@
import { endpoint, leaveWordslist, leaveWords } from "@/api/hfiveget/index.js";
import { ImagePreview } from "vant";
import store from "../../store/index";
import { setToken, getToken } from "@/utils/auth.js";
import { Loginto } from "@/api/hfiveget/index.js";
export default {
  data() {
    return {
@@ -88,7 +90,18 @@
      lastscrollBottom: ""
    };
  },
  beforeCreate() {
    Loginto(JSON.parse(localStorage.getItem("refreshdatabaocun"))).then(res => {
      setToken(res.data.refresh_token);
    });
    setInterval(() => {
      Loginto(JSON.parse(localStorage.getItem("refreshdatabaocun"))).then(
        res => {
          setToken(res.data.refresh_token);
        }
      );
    }, 60 * 60 * 1000);
  },
  computed: {},
  created() {
    if (localStorage.getItem("tokensave") == null) {
src/views/toAppraising/toAppraisingthree.vue
@@ -8,6 +8,10 @@
          <span>{{this.poepleinfo.type == 0 ? "部门级评选" :this.poepleinfo.type == 1 ? "部门评选" :this.poepleinfo.type == 2 ? "公司评选" : ""}}</span>
        </p>
        <p class="info">
          <span>所在部门:</span>
          <span>{{this.deptname}}</span>
        </p>
        <p class="info">
          <span>截止日期:</span>
          <span>{{this.poepleinfo.candidateCutoffTimeEnd}}</span>
        </p>
@@ -204,6 +208,10 @@
      remarkto(item){
        // 新增投票人选
        if(item.state==false){
          if(item.deptName==this.deptname&&this.deptname!="职能部门"&&this.infoData.isSelfDept==1){
            this.$toast.fail("该评优任务不能投选本部门候选人");
          }
          else{
          this.Categorylist.forEach(ins=>{
            if(item.evaluateTaskCategoryId==ins.id){
              let numin=0;
@@ -223,6 +231,8 @@
            }
          })
        }
        }
        else{
          this.cancelshow=true;
          this.canceltemporaryData=item
vue.config.js
@@ -127,8 +127,8 @@
    proxy: {
      "/api": {
        // target用于配置你允许访问数据的计算机名称,即是你的api接口的服务器地址
        // target: "http://127.0.0.1:8111",
        target: "http://139.196.94.172:8111",
        target: "http://127.0.0.1:8111",
        // target: "http://139.196.94.172:8111",
        // target: "https://132v69t077.yicp.fun",
        // target: "http://139.196.94.172:8111",
        // target: 'http://192.168.1.83:2888',