Selaa lähdekoodia

Merge branch 'static-static' of http://10.1.235.20:3000/core/static into static-static

guohh 5 vuotta sitten
vanhempi
commit
c765f44e30

+ 47 - 0
2019/bj-zqzt/biz/css/base.css

@ -257,6 +257,13 @@
257 257
  color:#1BCDB9;
258 258
  background:rgba(243,255,254,1);
259 259
}
260
.location-type .type-edit {
261
  color:#67ACFF;
262
  padding-left: .1rem;
263
  padding-right: .1rem;
264
  background:rgba(247,250,255,1);
265
  border: 1px dashed #67ACFF;
266
}
260 267
.location-address{
261 268
  margin: .08rem 0 0 .2rem;
262 269
  color: rgba(92, 96, 102, 1);
@ -7050,3 +7057,43 @@ ul li .details-info {
7050 7057
.product-search-item.active{
7051 7058
  color: #3F93F8;
7052 7059
}
7060
.upload-board-area {
7061
  margin:.18rem .2rem;
7062
}
7063
.sign-upload-area.upload-board-area ul li {
7064
  width: 46.7%;
7065
  margin-top: .2rem;
7066
  margin-right: 6.6%;
7067
}
7068
.sign-upload-area.upload-board-area ul li:nth-child(2n) {
7069
  margin-right: 0;
7070
}
7071
.sign-upload-area.upload-board-area ul li:nth-child(1),.sign-upload-area.upload-board-area ul li:nth-child(2) {
7072
  margin-top: 0;
7073
}
7074
.contract-pic {
7075
  object-fit:cover;
7076
}
7077
.upload-sign-pic .add-pic {
7078
  width: 36%;
7079
  height: 36%;
7080
  background: url(../img/add-pic.png) center center no-repeat;
7081
  background-size: contain;
7082
}
7083
.pages-board-detail .ipu-btn:not(:first-child) {
7084
  margin-left:3.7%;
7085
}
7086
.board-pic-area {
7087
  background-color: #FFFFFF;
7088
  padding:.2rem;
7089
  overflow: hidden;
7090
}
7091
.board-pic {
7092
  width:100%;
7093
  height:100%;
7094
  object-fit:contain;
7095
  position:relative;
7096
  top:50%;
7097
  left:50%;
7098
  transform:translate(-50%,-50%);
7099
}

BIN
2019/bj-zqzt/biz/img/add-pic.png


+ 50 - 0
2019/bj-zqzt/biz/js/board-detail.js

@ -0,0 +1,50 @@
1
require(['jquery', 'ipuUI'], function ($, ipuUI) {
2
  $.sizeReady(function () {
3
4
    // 工具栏取消
5
    $("#cancel").click(function () {
6
      console.log("返回");
7
    });
8
9
    // 操作
10
    $('.form-btn').on('click', '.ipu-btn', function () {
11
      let text = $(this).text();
12
      ipuUI.toast(text)
13
      if (text === "删除") {
14
15
      } else if (text === "重新上传") {
16
        $(".upload-pic-popup-slide").addClass("active");
17
      } else if (text === "水牌识别") {
18
19
      }
20
    })
21
22
    // 拍照
23
    $(".take-photo").click(function () {
24
      // TODO 拍照
25
      $(".upload-pic-popup-slide").removeClass("active");
26
    });
27
28
    // 从手机相册选择
29
    $(".pic-from-file").click(function () {
30
      // TODO 从手机相册选择
31
      $(".upload-pic-popup-slide").removeClass("active");
32
    });
33
34
    // 取消上传证件照片
35
    $(".take-photo-cancel").click(function () {
36
      $(".upload-pic-popup-slide").removeClass("active");
37
    });
38
39
    // 点空白区域关闭上传界面
40
    $(".upload-pic-popup-slide").click(function () {
41
      $(this).removeClass("active");
42
    });
43
44
    // 点击其他地方不做处理
45
    $(".upload-pic-popup-slide .option-area").click(function () {
46
      return false;
47
    });
48
49
  });
50
});

+ 58 - 0
2019/bj-zqzt/biz/js/board-management.js

@ -0,0 +1,58 @@
1
require(['jquery', 'ipuUI'], function ($, ipuUI) {
2
  $.sizeReady(function () {
3
    var liWidth =parseFloat($(".sign-upload-area ul li").css("width"));
4
    init();
5
6
    // 页面初始化
7
    function init() {
8
      // 页面自适应初始化,加载图片列表后调用
9
      $(".contract-pic").css("width", liWidth).css("height", liWidth*1.33);
10
    }
11
12
13
    // 工具栏取消
14
    $("#cancel").click(function () {
15
      console.log("返回");
16
    });
17
18
    // 点击图片
19
    $(".upload-board-area").on("click", ".contract-pic", function () {
20
      if (!$(this).hasClass("upload-sign-pic")) {
21
        location.href="board-detail.html"
22
      }
23
    });
24
25
    // 上传图片
26
    $(".upload-board-area").on("click", ".upload-sign-pic", function () {
27
      $(".upload-pic-popup-slide").addClass("active");
28
    });
29
30
    // 拍照
31
    $(".take-photo").click(function () {
32
      // TODO 拍照
33
      $(".upload-pic-popup-slide").removeClass("active");
34
    });
35
36
    // 从手机相册选择
37
    $(".pic-from-file").click(function () {
38
      // TODO 从手机相册选择
39
      $(".upload-pic-popup-slide").removeClass("active");
40
    });
41
42
    // 取消上传证件照片
43
    $(".take-photo-cancel").click(function () {
44
      $(".upload-pic-popup-slide").removeClass("active");
45
    });
46
47
    // 点空白区域关闭上传界面
48
    $(".upload-pic-popup-slide").click(function () {
49
      $(this).removeClass("active");
50
    });
51
52
    // 点击其他地方不做处理
53
    $(".upload-pic-popup-slide .option-area").click(function () {
54
      return false;
55
    });
56
57
  });
58
});

+ 41 - 0
2019/bj-zqzt/biz/js/building-tag.js

@ -0,0 +1,41 @@
1
require(['jquery', 'ipuUI'], function ($, ipuUI) {
2
  $(function () {
3
    // 页面类型:1新增;2删除
4
    var pageType = 2;
5
6
7
    init();
8
9
    // 页面初始化
10
    function init() {
11
      if (pageType == 1) { // 新增
12
        $(".ipu-toolbar-title").text("新增楼宇标签");
13
      } else if (pageType == 2) { // 删除
14
        $(".ipu-toolbar-title").text("删除楼宇标签");
15
      }
16
    }
17
18
    // 保存
19
    $(".common-btn").click(function () {
20
      if (pageType == 1) { // 新增
21
22
      } else if (pageType == 2) { // 删除
23
        $(".normal-tips-popup-slide").addClass("active");
24
      }
25
    });
26
27
    // 普通提示弹层
28
    // 取消
29
    $(".normal-tips-btn-cancel").click(function () {
30
      $(".normal-tips-popup-slide").removeClass("active");
31
    });
32
33
    // 确认
34
    $(".normal-tips-btn-confirm").click(function () {
35
      $(".normal-tips-popup-slide").removeClass("active");
36
      // 删除
37
    });
38
39
40
  });
41
});

+ 55 - 0
2019/bj-zqzt/board-detail.html

@ -0,0 +1,55 @@
1
<!DOCTYPE html>
2
<html lang="en">
3
<head>
4
  <title>查看水牌</title>
5
  <meta charset="utf-8">
6
  <!-- 宽度自动适配 -->
7
  <meta name="viewport"
8
        content="width=device-width, initial-scale=1.0,maximum-scale=1.0,minimum-scale=1.0, user-scalable=no"/>
9
  <!-- 不识别页面上的数字为可拨打号码 -->
10
  <meta content="telephone=no" name="format-detection"/>
11
  <link rel="stylesheet" type="text/css" href="ipu/ui/css/ipuUI.css">
12
  <link rel="stylesheet" type="text/css" href="biz/css/base.css">
13
  <link rel="stylesheet" type="text/css" href="biz/css/iconfont/iconfont.css">
14
15
  <script src="ipu/lib/requirejs/require.min.js"></script>
16
  <script src="biz/js/require-config.js"></script>
17
  <script src="biz/js/board-detail.js"></script>
18
</head>
19
<body class="pages-board-detail main-body-bg-grey">
20
<div class="ipu-flex-row ipu-flex-vertical">
21
  <div class="ipu-flex-col common-border-bottom">
22
    <div class="ipu-toolbar">
23
      <a class="ipu-fn-left link-back ipu-flex ipu-flex-align-center" href="javascript:history.back(-1);" id="back">
24
        <div class="left-back"></div>
25
      </a>
26
      <h1 class="ipu-toolbar-title">查看水牌</h1>
27
      <div class="tool-bar-edit main-blue" id="cancel">取消</div>
28
    </div>
29
  </div>
30
31
  <div class="ipu-flex-col ipu-flex-col-auto board-pic-area">
32
    <img class="board-pic" src="temp/img/business-license.png">
33
  </div>
34
  <div class="ipu-flex-col form-btn ipu-flex" style="margin-top:.2rem">
35
    <button class="ipu-btn common-btn-white">删除</button>
36
    <button class="ipu-btn common-btn">重新上传</button>
37
    <button class="ipu-btn common-btn">水牌识别</button>
38
  </div>
39
40
  <!--上传图片-->
41
  <div class="upload-pic-popup-slide">
42
    <div class="ipu-flex-row ipu-flex-vertical">
43
      <div class="ipu-flex-col ipu-flex-col-auto"></div>
44
      <div class="option-area ipu-flex-col ipu-flex ipu-flex-vertical ipu-flex-justify-end ipu-flex-align-center">
45
        <div class="take-photo">拍照</div>
46
        <div class="pic-from-file">从手机相册选择</div>
47
        <div class="divide-area"></div>
48
        <div class="take-photo-cancel">取消</div>
49
      </div>
50
    </div>
51
  </div>
52
53
</div>
54
</body>
55
</html>

+ 76 - 0
2019/bj-zqzt/board-management.html

@ -0,0 +1,76 @@
1
<!DOCTYPE html>
2
<html lang="en">
3
<head>
4
  <title>水牌列表</title>
5
  <meta charset="utf-8">
6
  <!-- 宽度自动适配 -->
7
  <meta name="viewport"
8
        content="width=device-width, initial-scale=1.0,maximum-scale=1.0,minimum-scale=1.0, user-scalable=no"/>
9
  <!-- 不识别页面上的数字为可拨打号码 -->
10
  <meta content="telephone=no" name="format-detection"/>
11
  <link rel="stylesheet" type="text/css" href="ipu/ui/css/ipuUI.css">
12
  <link rel="stylesheet" type="text/css" href="biz/css/base.css">
13
  <link rel="stylesheet" type="text/css" href="biz/css/iconfont/iconfont.css">
14
15
  <script src="ipu/lib/requirejs/require.min.js"></script>
16
  <script src="biz/js/require-config.js"></script>
17
  <script src="biz/js/board-management.js"></script>
18
</head>
19
<body class="pages-board-management">
20
<div class="ipu-flex-row ipu-flex-vertical">
21
  <div class="ipu-flex-col">
22
    <div class="ipu-toolbar common-border-bottom">
23
      <a class="ipu-fn-left link-back ipu-flex ipu-flex-align-center" href="javascript:;" id="back">
24
        <div class="left-back"></div>
25
      </a>
26
      <h1 class="ipu-toolbar-title">水牌列表</h1>
27
      <div class="tool-bar-edit main-blue" id="cancel">取消</div>
28
    </div>
29
  </div>
30
31
  <div class="ipu-flex-col ipu-flex-col-auto ">
32
    <div class="sign-upload-area upload-board-area">
33
      <ul>
34
        <li>
35
          <img class="contract-pic tip-pic" src="temp/img/business-license.png"/>
36
        </li>
37
        <li>
38
          <img class="contract-pic" src="temp/img/board1.png"/>
39
        </li>
40
        <li>
41
          <img class="contract-pic" src="temp/img/01.png"/>
42
        </li>
43
        <li>
44
          <img class="contract-pic" src="temp/img/02.jpg"/>
45
        </li>
46
        <li>
47
          <img class="contract-pic" src="temp/img/03.jpg"/>
48
        </li>
49
        <li>
50
          <div class="contract-pic upload-sign-pic ipu-flex ipu-flex-justify-center ipu-flex-align-center">
51
            <div class="add-pic"></div>
52
          </div>
53
        </li>
54
      </ul>
55
    </div>
56
57
58
  </div>
59
60
</div>
61
62
<!--上传图片-->
63
<div class="upload-pic-popup-slide">
64
  <div class="ipu-flex-row ipu-flex-vertical">
65
    <div class="ipu-flex-col ipu-flex-col-auto"></div>
66
    <div class="option-area ipu-flex-col ipu-flex ipu-flex-vertical ipu-flex-justify-end ipu-flex-align-center">
67
      <div class="take-photo">拍照</div>
68
      <div class="pic-from-file">从手机相册选择</div>
69
      <div class="divide-area"></div>
70
      <div class="take-photo-cancel">取消</div>
71
    </div>
72
  </div>
73
</div>
74
75
</body>
76
</html>

+ 1 - 0
2019/bj-zqzt/building-details.html

@ -49,6 +49,7 @@
49 49
            <span class="type-warning">TOP300</span>
50 50
            <span class="type-normal">已覆盖</span>
51 51
            <span class="type-normal">可营销</span>
52
            <span class="type-edit">编辑</span>
52 53
          </div>
53 54
        </div>
54 55
        <div class="location-address">北京市东城区东中街58号</div>

+ 100 - 0
2019/bj-zqzt/building-tag.html

@ -0,0 +1,100 @@
1
<!DOCTYPE html>
2
<html lang="en">
3
<head>
4
  <title>新增/删除楼宇标签</title>
5
  <meta charset="utf-8">
6
  <!-- 宽度自动适配 -->
7
  <meta name="viewport"
8
        content="width=device-width, initial-scale=1.0,maximum-scale=1.0,minimum-scale=1.0, user-scalable=no"/>
9
  <!-- 不识别页面上的数字为可拨打号码 -->
10
  <meta content="telephone=no" name="format-detection"/>
11
  <link rel="stylesheet" type="text/css" href="ipu/ui/css/ipuUI.css">
12
  <link rel="stylesheet" type="text/css" href="biz/css/base.css">
13
  <link rel="stylesheet" type="text/css" href="biz/css/iconfont/iconfont.css">
14
15
  <script src="ipu/lib/requirejs/require.min.js"></script>
16
  <script src="biz/js/require-config.js"></script>
17
  <script src="biz/js/building-tag.js"></script>
18
</head>
19
<body class="pages-building-tag">
20
<div class="ipu-pages">
21
  <div class="ipu-page">
22
    <div class="ipu-flex-row ipu-flex-vertical">
23
      <div class="ipu-flex-col common-border-bottom">
24
        <div class="ipu-toolbar">
25
          <a class="ipu-fn-left link-back ipu-flex ipu-flex-align-center" href="javascript:;" id="back-ext">
26
            <div class="left-back"></div>
27
          </a>
28
          <h1 class="ipu-toolbar-title">新增/删除楼宇标签</h1>
29
          <div class="tool-bar-edit main-blue">取消</div>
30
        </div>
31
      </div>
32
33
      <div class="tag-form ipu-flex-col ipu-flex-col-auto">
34
        <div class="ipu-form-item" max-length="">
35
          <div class="ipu-flex common-border-bottom">
36
            <div class="item-key">楼宇编码:</div>
37
            <div class="item-value ipu-flex-col-auto">
38
              <input id="BUILD_ID" type="text" placeholder="楼宇详情带入,不可编辑" value="" readonly/>
39
            </div>
40
          </div>
41
          <div class="check-tips"></div>
42
        </div>
43
        <div class="ipu-form-item" max-length="">
44
          <div class="ipu-flex common-border-bottom">
45
            <div class="item-key">楼宇名称:</div>
46
            <div class="item-value ipu-flex-col-auto">
47
              <input id="BUILD_NAME" type="text" placeholder="楼宇详情带入,不可编辑" value="" readonly/>
48
            </div>
49
          </div>
50
          <div class="check-tips"></div>
51
        </div>
52
        <div class="ipu-form-item" max-length="" readonly>
53
          <div class="ipu-flex common-border-bottom">
54
            <div class="item-key">标签:</div>
55
            <div class="item-value ipu-flex-col-auto">
56
              <input type="text" value="可营销" style="color:#67ACFF;font-size:  .1rem"/>
57
            </div>
58
          </div>
59
          <div class="check-tips"></div>
60
        </div>
61
        <div class="ipu-form-item" max-length="">
62
          <div class="common-border-bottom">
63
            <div class="ipu-flex ipu-flex-justify-space">
64
              <div class="item-key">操作原因:</div>
65
              <div class="voice-input-btn ipu-flex ipu-flex-align-center">
66
                <div class="voice-pic"></div>
67
                <div class="voice-text">语音输入</div>
68
              </div>
69
            </div>
70
            <div class="item-value">
71
              <textarea id="reason" class="contact-content" maxlength="300" placeholder="请输入原因"></textarea>
72
              <div class="item-value-textarea">
73
                <div class="text-statistic ipu-fn-hide"><span class="text-number">0</span>/300</div>
74
              </div>
75
            </div>
76
          </div>
77
          <div class="check-tips"></div>
78
        </div>
79
      </div>
80
81
      <div class="ipu-flex-col form-btn" style="margin-top: .2rem">
82
        <button class="ipu-btn common-btn">保存</button>
83
      </div>
84
85
    </div>
86
87
    <!--普通提示弹层-->
88
    <div class="normal-tips-popup-slide">
89
      <div class="normal-tips-popup-wrap">
90
        <div class="normal-tips-content">确定删除该楼宇标签吗?</div>
91
        <div class="normal-tips-btn ipu-flex ipu-flex-align-center">
92
          <div class="normal-tips-btn-cancel">取消</div>
93
          <div class="normal-tips-btn-confirm">确定</div>
94
        </div>
95
      </div>
96
    </div>
97
  </div>
98
</div>
99
</body>
100
</html>

+ 517 - 0
vue-project/hn-kq/src/components/manage/ManageEndDepartmentAdd.vue

@ -0,0 +1,517 @@
1
<template>
2
  <div class="ipu-flex-row ipu-flex-vertical">
3
    <div class="ipu-flex-col">
4
      <header class="ipu-toolbar">
5
        <h1 class="ipu-toolbar-title">{{isUpdate?'修改部门':'新增部门'}}</h1>
6
        <a class="ipu-fn-left common-page-back" href="javascript:;" @click="back"></a>
7
      </header>
8
    </div>
9
    
10
      
11
      <div class="ipu-flex-col ipu-flex-col-auto">
12
         <div class="page-content">
13
          <div class="ipu-list ipu-list-high ipu-list-form">
14
            <ul>
15
              <li class="ipu-list-item">
16
                <div class="ipu-list-item-inner">
17
                  <div class="ipu-list-item-label">
18
                    名称
19
                  </div>
20
                  <div class="ipu-list-item-input-wrap">
21
                     <input v-model="name" class="input-right" placeholder="请填写名称"/>
22
                  </div>
23
                </div>
24
              </li>
25
              <li class="ipu-list-item">
26
                <div class="ipu-list-item-inner" @click="showPicker">
27
                  <div class="ipu-list-item-label">
28
                    类型
29
                  </div>
30
                  <div class="ipu-list-item-input-wrap">
31
                   {{type}}
32
                  </div>
33
                </div>
34
              </li>
35
              <li class="ipu-list-item">
36
                <div class="ipu-list-item-inner">
37
                  <div class="ipu-list-item-label">
38
                    地址
39
                  </div>
40
                  <div class="ipu-list-item-input-wrap">
41
                     <input class="" v-model="address" class="input-right" placeholder="请填写地址"/>
42
                  </div>
43
                </div>
44
              </li>
45
              <!-- <li class="ipu-list-item">
46
                <div class="ipu-list-item-inner">
47
                  <div class="ipu-list-item-label">
48
                    描述
49
                  </div>
50
                  <div class="ipu-list-item-input-wrap">
51
                   {{leaveApply.MANAGE_NAME}}
52
                  </div>
53
                </div>
54
              </li> -->
55
             
56
              <li class="ipu-list-item">
57
                <div class="ipu-list-item-inner" @click="showDepartmentPicker">
58
                  <div class="ipu-list-item-label">
59
                    上级部门
60
                  </div>
61
                  <div class="ipu-list-item-input-wrap">
62
                    {{superiorDepartment}}
63
                  </div>
64
                </div>
65
              </li>
66
              <li class="ipu-list-item">
67
                <div class="ipu-list-item-inner"  @click="showPersonPicker">
68
                  <div class="ipu-list-item-label">
69
                    部门成员
70
                  </div>
71
                  <div class="ipu-list-item-input-wrap">
72
                    {{person }}
73
                  </div>
74
                </div>
75
                <cube-popup type="extend-popup" position="bottom" ref="popup">
76
                  <div class="cube-extend-popup-content">
77
                    <div class="ipu-flex ipu-flex-justify-space">
78
                      <div class="cancel" @click="hide">取消</div>
79
                      <div class="value-checked" @click="checkPerson">确定</div>
80
                    </div>
81
                    <div class="horizontal-scroll-list-wrap">
82
                      <div
83
                        v-for="(value, key) in personlist"
84
                        :key="key"
85
                        class="ipu-flex ipu-flex-justify-space"
86
                        :class="{'value-checked':value.checked}"
87
                      >
88
                        <div>{{value.ATD_OBJ_NAME}}</div>
89
                        <div class="ipu-flex">
90
                          <div @click="changeAdmin(key)" class="ipu-flex">管理员<div :class="{'unmarked-circle':!value.adminChecked,'marked-circle':value.adminChecked}"></div></div>
91
                          <div @click="change(key)" class="ipu-flex">成员<div :class="{'unmarked-circle':!value.checked,'marked-circle':value.checked}"></div></div>
92
                        </div>
93
                      </div>
94
                    </div>
95
                  </div>
96
                </cube-popup>
97
              </li>
98
              <li class="ipu-list-item desc" >
99
                <div>
100
                  <div class="ipu-list-item-label">
101
                    部门简介
102
                  </div>
103
                  <div class="">
104
                    <cube-textarea class="remark-content" placeholder="请输入" v-model="desc"></cube-textarea>
105
                  </div>
106
                </div>
107
              </li>
108
              
109
            </ul>
110
            <div class="submit-container">
111
              <cube-button @click="submit">{{isUpdate?'提交修改':'提交'}}</cube-button>
112
            </div>
113
          </div>
114
        </div>
115
      </div>
116
117
    
118
  </div>
119
</template>
120
121
<script>
122
import TypeUtil from "../../util/TypeUtil"
123
import EventBus from "../common/EventBus.js";
124
export default {
125
  name: "ClockSuccess",
126
  props: {
127
    msg: String
128
  },
129
  data() {
130
    return {
131
      name: '',
132
      address: '',
133
      nextPage: false,
134
      superiorDepartment: '请选择',
135
      departmentAtaLowerLevel: '',
136
      leaveApply:{
137
        name:"CRM",
138
        headquarters:'金水区经三路广电南路金印现代城',
139
        departmentManager:'黄玉娟',
140
        superiorDepartment:'CRM',
141
        departmentMember:3,
142
        departmentAtaLowerLevel:12,
143
        DepartmentOfIntroduction:'简介',
144
        }
145
      ,
146
      queryCount:1,
147
      type: '请选择',
148
      leaveType: '',
149
      departmentList: [],
150
      desc: '',
151
      personlist:[],
152
      isUpdate: false,
153
      show: false,
154
      person: '请选择',
155
      isUpdate: false,
156
    }
157
  },
158
  mounted(){
159
    if(this.$route.query.info){
160
      console.log(this.$route.query.info)
161
      this.isUpdate = true
162
      this.name = this.$route.query.info.TEAM_NAME
163
      this.address = this.$route.query.info.TEAM_ADDRESS
164
      this.desc = this.$route.query.info.TEAM_DESC
165
      this.leaveType = this.$route.query.info.TEAM_TYPE
166
      this.superiorDepartment = this.$route.query.info.superiorDepartment
167
      if(this.$route.query.info.TEAM_TYPE == "A"){
168
        this.type = '实体团队'
169
      } else {
170
        this.type = '虚拟组织'
171
      }
172
    }
173
    // this.leaveApply = this.$route.query.info
174
    // var params = {}
175
    // params.teamId = this.$route.query.info.TEAM_ID
176
    // this.$http
177
    //   .post("/teamManage/getTeamDetail", params)
178
    //   .then(response => {
179
    //     if (response.respCode == "0000") {
180
    //       this.departmentAtaLowerLevel = response.childTeamCount
181
    //       this.superiorDepartment = response.parentTeamName=='null'?'无':response.parentTeamName
182
    //       console.log(this.leaveApply)
183
    //     }
184
    //   })
185
    //   .catch(error => {
186
    //     console.log(error);
187
    // });
188
    var params = {}
189
    this.$http
190
      .post("/teamManage/getTeamList", params)
191
      .then(response => {
192
        if (response.respCode == "0000") {
193
          // console.log(response);
194
          // var param = {}
195
          // param.title = '修改申请成功'
196
          // param.content = '将来的你一定会感谢现在的自己'
197
          // param.className = 'flag-blue-pass'
198
          // this.$router.push({ path: "/reissueClockSuccess",query:param  });
199
          this.departmentList = response.list
200
          this.departmentList.push({"TEAM_ID":0,"TEAM_NAME":'无'})
201
        }
202
      })
203
      .catch(error => {
204
        console.log(error);
205
    });
206
    if(this.$route.query.info){
207
      params.teamId = this.$route.query.info.TEAM_ID
208
    }
209
    this.$http
210
      .post("/userInfo/getOrgUserList", params)
211
      .then(response => {
212
        if (response.respCode == "0000") {
213
          // console.log(response);
214
          // var param = {}
215
          // param.title = '修改申请成功'
216
          // param.content = '将来的你一定会感谢现在的自己'
217
          // param.className = 'flag-blue-pass'
218
          // this.$router.push({ path: "/reissueClockSuccess",query:param  });
219
          response.list.forEach((e,index)=>{
220
            if(this.$route.query.info){
221
              if(this.$route.query.info.manageIds){
222
            this.$route.query.info.manageIds.split(",").forEach((id,indexId)=>{
223
              if(e.ATD_OBJ_ID == id){
224
                e.adminChecked = true
225
                 if(this.person == '请选择'){
226
                  this.person = ''
227
                }
228
                this.person += e.ATD_OBJ_NAME+' ' 
229
              }
230
              
231
            })
232
            }
233
            if(this.$route.query.info.atdObjIdList){
234
            this.$route.query.info.atdObjIdList.split(",").forEach((id,indexId)=>{
235
              if(e.ATD_OBJ_ID == id){
236
                if(!e.adminChecked){
237
                  e.checked = true
238
                }
239
                if(this.person == '请选择'){
240
                  this.person = ''
241
                }
242
                this.person += e.ATD_OBJ_NAME+' ' 
243
              }
244
            })
245
            }
246
            }
247
          })
248
          this.personlist = response.list
249
        }
250
      })
251
      .catch(error => {
252
        console.log(error);
253
    });
254
  },
255
  computed: {
256
      
257
    },
258
  methods: {
259
      unique(arr) { // 根据唯一标识no来对数组进行过滤
260
    const res = new Map();  //定义常量 res,值为一个Map对象实例
261
    //返回arr数组过滤后的结果,结果为一个数组   过滤条件是,如果res中没有某个键,就设置这个键的值为1
262
    return arr.filter((arr) => !res.has(arr.no) && res.set(arr.no, 1)) 
263
      },
264
     showPersonPicker(){
265
      this.$refs.popup.show();
266
     },
267
     hide(){
268
      this.$refs.popup.hide();
269
      this.$emit("hide");
270
     },
271
     checkPerson(){
272
       this.person = ''
273
      this.personlist.forEach((e,index)=>{
274
        if(e.checked){
275
          this.person += e.ATD_OBJ_NAME+' '
276
        }
277
      })
278
      this.hide()
279
     },
280
    change(key) {
281
      console.log(this.personlist[key].checked)
282
      if(!this.personlist[key].checked){
283
        
284
        this.personlist[key].checked = true
285
         this.personlist[key].adminChecked = false
286
        this.$set(this.personlist, key, this.personlist[key])
287
      }else{
288
        this.personlist[key].checked = false
289
        this.personlist[key].adminChecked = false
290
        this.$set(this.personlist, key, this.personlist[key])
291
      }
292
      
293
    },
294
     changeAdmin(key) {
295
      //  if(!this.personlist[key].checked){
296
      //    const toast = this.$createToast({
297
      //     type: "txt",
298
      //     txt: "人员首先必须是成员",
299
      //     time: 2000
300
      //   });
301
      //   toast.show();
302
      //    return
303
      //  }
304
      console.log(this.personlist[key].adminChecked)
305
      if(!this.personlist[key].adminChecked){
306
        
307
        this.personlist[key].adminChecked = true
308
        this.personlist[key].checked = false
309
        this.$set(this.personlist, key, this.personlist[key])
310
      }else{
311
        this.personlist[key].adminChecked = false;
312
        this.personlist[key].checked = false
313
        this.$set(this.personlist, key, this.personlist[key])
314
      }
315
      
316
    },
317
    back() {
318
      this.$router.back(-1);
319
    },
320
    showPicker() {
321
      if (!this.picker) {
322
        this.picker = this.$createPicker({
323
          title: "选择部门类型",
324
          data: [
325
            [
326
              { state: "V", name: "虚拟组织" },
327
              { state: "A", name: "实体团队" },
328
            ]
329
          ],
330
          alias: {
331
            value: "state",
332
            text: "name"
333
          },
334
          onSelect: this.selectPickerHandle,
335
          onCancel: this.cancelHandle
336
        });
337
      }
338
      this.picker.show();
339
    },
340
    selectPickerHandle(selectedVal, selectedIndex, selectedText) {
341
      console.log(selectedVal);
342
      this.leaveType = selectedVal[0];
343
      this.type = selectedText.join(" ");
344
    },
345
    showDepartmentPicker() {
346
      console.log( this.departmentList)
347
      if (!this.pickerDepartment) {
348
        this.pickerDepartment = this.$createPicker({
349
          title: "选择上级部门",
350
          data: [
351
           this.departmentList
352
          ],
353
          alias: {
354
            value: "TEAM_ID",
355
            text: "TEAM_NAME"
356
          },
357
          onSelect: (selectedVal, selectedIndex, selectedText) =>{
358
              this.superiorDepartmentId = selectedVal[0];
359
              this.superiorDepartment = selectedText.join(" ");
360
          },
361
          onCancel: this.cancelHandle
362
        });
363
      }
364
      this.pickerDepartment.show();
365
    },
366
    submit(){
367
      var params = {}
368
      if (!this.name) {
369
        const toast = this.$createToast({
370
          type: "txt",
371
          txt: "请填写名称",
372
          time: 2000
373
        });
374
        toast.show();
375
        return;
376
      }
377
      params.teamName = this.name
378
      if (!this.leaveType) {
379
        const toast = this.$createToast({
380
          type: "txt",
381
          txt: "请选择类型",
382
          time: 2000
383
        });
384
        toast.show();
385
        return;
386
      }
387
      params.teamType = this.leaveType
388
     
389
      if (!this.address) {
390
        const toast = this.$createToast({
391
          type: "txt",
392
          txt: "请填写地址",
393
          time: 2000
394
        });
395
        toast.show();
396
        return;
397
      }
398
      params.teamAddress = this.address
399
      // if (!this.superiorDepartmentId) {
400
      //   const toast = this.$createToast({
401
      //     type: "txt",
402
      //     txt: "请选择上级部门",
403
      //     time: 2000
404
      //   });
405
      //   toast.show();
406
      //   return;
407
      // }
408
      params.parentTeamId = this.superiorDepartmentId
409
      params.teamDesc = this.desc
410
      var personIdList = []
411
      var manageId = []
412
      this.personlist.forEach((e,indexId)=>{
413
        if(e.checked){
414
          personIdList.push(e.ATD_OBJ_ID)
415
        }
416
        if(e.adminChecked){
417
          manageId.push(e.ATD_OBJ_ID)
418
        }
419
      })
420
      params.personIdList = personIdList.join(',')
421
      params.manageIdList = manageId.join(',')
422
      if(this.$route.query.info){
423
        params.teamId = this.$route.query.info.TEAM_ID
424
        this.$http
425
        .post("/teamManage/updateTeam", params)
426
        .then(response => {
427
          if (response.respCode == "0000") {
428
            // console.log(response);
429
            var param = {}
430
            param.title = '修改成功'
431
            param.content =
432
             '将来的你一定会感谢现在的自己'
433
            param.className = 'flag-blue-pass'
434
            this.$router.push({ path: "/reissueClockSuccess",query:param  });
435
          }
436
        })
437
        .catch(error => {
438
          console.log(error);
439
      });
440
      }else{
441
      this.$http
442
        .post("/teamManage/addTeam", params)
443
        .then(response => {
444
          if (response.respCode == "0000") {
445
            // console.log(response);
446
            var param = {}
447
            param.title = '新增成功'
448
            param.content =
449
             '将来的你一定会感谢现在的自己'
450
            param.className = 'flag-blue-pass'
451
            this.$router.push({ path: "/reissueClockSuccess",query:param  });
452
          }
453
        })
454
        .catch(error => {
455
          console.log(error);
456
      });
457
      }
458
      
459
    }
460
  }
461
};
462
</script>
463
464
<style lang="stylus" rel="stylesheet/stylus">
465
@import '../../style/variable.styl';
466
467
468
.gray-backgroud {
469
  background-color: #eee;
470
}
471
.horizontal-scroll-list-wrap{
472
  max-height 400px
473
  min-height 100px
474
  overflow-y auto
475
}
476
.input-right
477
  text-align right 
478
  width 100%
479
.cube-extend-popup-content {
480
  background-color: #fff;
481
  font-size: 14px;
482
  line-height: 42px;
483
  padding: 0 14px;
484
  // max-height 400px
485
  // max-height 100px
486
}
487
.cube-extend-popup-content > div {
488
  border-bottom: 1px solid rgba(0, 0, 0, 0.09); /*no*/
489
}
490
491
.cube-extend-popup-content div {
492
  font-weight: 600;
493
}
494
.cube-extend-popup-content i {
495
  font-size: 17px;
496
}
497
.unmarked-circle {
498
  height: 17px;
499
  width: 17px;
500
  border: 1px solid rgba(0, 0, 0, 0.15); /*no*/
501
  border-radius: 50%;
502
  margin: 12px 0 0 0;
503
}
504
.marked-circle {
505
  background-image: url("../../assets/checkbox-circle.png");
506
  background-size: 100% 100%;
507
  height: 17px;
508
  width: 17px;
509
  margin: 12px 0 0 0;
510
}
511
.desc
512
  div
513
    width 100%
514
    .ipu-list-item-label
515
      line-height 60px
516
517
</style>

+ 376 - 0
vue-project/hn-kq/src/components/manage/ManageTheEndPersonAdd.vue

@ -0,0 +1,376 @@
1
<template>
2
  <div class="ipu-flex-row ipu-flex-vertical">
3
    <div class="ipu-flex-col">
4
      <header class="ipu-toolbar">
5
        <h1 class="ipu-toolbar-title">人员新增</h1>
6
        <a class="ipu-fn-left common-page-back" href="javascript:;" @click="back"></a>
7
      </header>
8
    </div>
9
    
10
      
11
      <div class="ipu-flex-col ipu-flex-col-auto">
12
  <div class="page-content">
13
          <div class="ipu-list ipu-list-high ipu-list-form">
14
            <ul>
15
              <li class="ipu-list-item">
16
                <div class="ipu-list-item-inner">
17
                  <div class="ipu-list-item-label">
18
                    名称
19
                  </div>
20
                  <div class="ipu-list-item-input-wrap">
21
                     <input v-model="name" class="input-right" placeholder="请填写名称"/>
22
                  </div>
23
                </div>
24
              </li>
25
              <li class="ipu-list-item">
26
                <div class="ipu-list-item-inner" @click="showGenderPicker">
27
                  <div class="ipu-list-item-label">
28
                    性别
29
                  </div>
30
                  <div class="ipu-list-item-input-wrap">
31
                    {{gender}}
32
                  </div>
33
                </div>
34
              </li>
35
              <li class="ipu-list-item">
36
                <div class="ipu-list-item-inner" @click="showDatePicker()">
37
                  <div class="ipu-list-item-label">
38
                    出生年月
39
                  </div>
40
                  <div class="ipu-list-item-input-wrap">
41
                    {{brithDate}}
42
                  </div>
43
                </div>
44
              </li>
45
              <li class="ipu-list-item">
46
                <div class="ipu-list-item-inner" @click="showTypePicker">
47
                  <div class="ipu-list-item-label">
48
                    类别
49
                  </div>
50
                  <div class="ipu-list-item-input-wrap">
51
                    {{type}}
52
                  </div>
53
                </div>
54
              </li>
55
              <li class="ipu-list-item">
56
                <div class="ipu-list-item-inner">
57
                  <div class="ipu-list-item-label">
58
                    提醒开关
59
                  </div>
60
                  <div class="ipu-list-item-input-wrap ipu-flex ipu-flex-justify-end">
61
                     <cube-switch v-model="remind"></cube-switch>
62
                  </div>
63
                </div>
64
              </li>
65
              <li class="ipu-list-item">
66
                <div class="ipu-list-item-inner">
67
                  <div class="ipu-list-item-label">
68
                    外部系统id
69
                  </div>
70
                  <div class="ipu-list-item-input-wrap">
71
                     <input v-model="outId" class="input-right" placeholder="请填写描述"/>
72
                  </div>
73
                </div>
74
              </li>
75
              <li class="ipu-list-item">
76
                <div class="ipu-list-item-inner">
77
                  <div class="ipu-list-item-label">
78
                    描述
79
                  </div>
80
                  <div class="ipu-list-item-input-wrap">
81
                    <cube-textarea :maxlength=70 class="remark-content" placeholder="请输入" v-model="desc"></cube-textarea>
82
                     <!-- <input v-model="desc" class="input-right" placeholder="请填写描述"/> -->
83
                  </div>
84
                </div>
85
              </li>
86
               <li class="ipu-list-item">
87
                  <div class="ipu-list-item-inner">
88
                    <div class="ipu-list-item-label">
89
                      图片
90
                    </div>
91
                    <div class="ipu-list-item-input-wrap">
92
                     <div class="pic-content">
93
                    <div class="ipu-flex remark-upload">
94
                      <div class="ipu-flex attendance-detail-imgs">
95
                        <div v-for="(img, index) in imgs" :key="index">
96
                          <img :src="img" alt=""  @click="showImagePreview(index)">
97
                          <i class="cubeic-wrong" @click="deleteImg(index)"></i>
98
                        </div>
99
                      </div>
100
                      <i class="cubeic-add" v-if="imgs.length<1" @click="showCameraPhoto"></i>
101
                    </div>
102
                  </div>
103
                    </div>
104
                  </div>
105
               </li>
106
              
107
              <!-- <li class="ipu-list-item">
108
                <div class="ipu-list-item-inner">
109
                  <div class="ipu-list-item-label">
110
                    NT账号
111
                  </div>
112
                  <div class="ipu-list-item-input-wrap">
113
                     <input v-model="ntId" class="input-right" placeholder="请填写描述"/>
114
                  </div>
115
                </div>
116
              </li>
117
              <li class="ipu-list-item">
118
                <div class="ipu-list-item-inner">
119
                  <div class="ipu-list-item-label">
120
                    密码
121
                  </div>
122
                  <div class="ipu-list-item-input-wrap">
123
                     <input v-model="ntPwd" class="input-right" placeholder="请填写描述"/>
124
                  </div>
125
                </div>
126
              </li> -->
127
              
128
            </ul>
129
            <div class="submit-container">
130
              <cube-button @click="submit">提交</cube-button>
131
            </div>
132
          </div>
133
        </div>
134
      </div>
135
136
    
137
  </div>
138
</template>
139
140
<script>
141
import TypeUtil from "../../util/TypeUtil"
142
export default {
143
  name: "ClockSuccess",
144
  props: {
145
    msg: String
146
  },
147
  data() {
148
    return {
149
      name:'',
150
      desc:'',
151
      files: [],
152
      imgs:[],
153
      remind: true,
154
      type: '员工',
155
      typeValue: 'P',
156
      gender: '男',
157
      genderValue: 'M',
158
      outId: '',
159
      brithDate: ''
160
    };
161
  },
162
  mounted(){
163
    
164
  },
165
  computed: {
166
     
167
    },
168
  methods: {
169
    showCameraPhoto(){
170
      this.$createActionSheet({
171
         title: '选择照片类型',
172
         data: [
173
          {
174
            content: '拍照'
175
          },
176
          {
177
            content: '相册'
178
          }
179
        ],
180
        onSelect: (item, index) => {
181
          if(index==0){
182
            WadeMobile.getPhoto(path=>{
183
              this.submittedHandler('data:image/jpeg;base64,'+path)
184
            },0)
185
          }else if(index ==1){
186
             WadeMobile.getPicture(path=>{
187
              this.submittedHandler('data:image/jpeg;base64,'+path)
188
            },0)
189
          }
190
        },
191
        onCancel: () => {
192
         
193
        }
194
      }).show()
195
    },
196
    deleteImg(index){
197
      this.imgs.splice(index,1)
198
      this.files.splice(index,1)
199
    },
200
    dataURLtoFile(dataurl) {
201
      var filename = new Date().getTime()
202
      var arr = dataurl.split(','), mime = arr[0].match(/:(.*?);/)[1],  
203
      bstr = atob(arr[1]), n = bstr.length, u8arr = new Uint8Array(n);  
204
      while(n--){  
205
          u8arr[n] = bstr.charCodeAt(n);  
206
      }  
207
      return new File([u8arr], filename, {type:mime});
208
    },
209
     submittedHandler(base64) {
210
      if(this.files.length>=1){
211
        const toast = this.$createToast({
212
          type: "txt",
213
          txt: "最多上传1张图片",
214
          time: 2000
215
        });
216
        toast.show();
217
        return;
218
      }
219
      var params = new FormData();
220
      params.append("file", this.dataURLtoFile(base64));
221
      this.$http
222
        .post("/uploadFile", params)
223
        .then(response => {
224
          if (response.respCode == "0000") {
225
            this.imgs.push(base64)
226
            this.files.push(response.respMsg);
227
          }
228
        })
229
        .catch(error => {
230
          console.log(error);
231
        });
232
    },
233
    showImagePreview(index) {
234
        this.$createImagePreview({
235
          initialIndex: index,
236
          imgs: this.imgs
237
        }).show()
238
      },
239
      showTypePicker(){
240
        if (!this.typePicker) {
241
        this.typePicker = this.$createPicker({
242
          title: "选择类型",
243
          data: [
244
            [
245
              { state: "P", name: "员工" },
246
              { state: "E", name: "设备" },
247
            ]
248
          ],
249
          alias: {
250
            value: "state",
251
            text: "name"
252
          },
253
          onSelect: (selectedVal, selectedIndex, selectedText)=>{
254
            this.typeValue = selectedVal[0]
255
            this.type = selectedText.join(" ");
256
          },
257
          onCancel: this.cancelHandle
258
        });
259
      }
260
      this.typePicker.show();
261
      },
262
      showImagePreview(index) {
263
        this.$createImagePreview({
264
          initialIndex: index,
265
          imgs: this.imgs
266
        }).show()
267
      },
268
      showGenderPicker(){
269
        if (!this.picker) {
270
        this.picker = this.$createPicker({
271
          title: "选择性别",
272
          data: [
273
            [
274
              { state: "F", name: "女" },
275
              { state: "M", name: "男" },
276
            ]
277
          ],
278
          alias: {
279
            value: "state",
280
            text: "name"
281
          },
282
          onSelect: (selectedVal, selectedIndex, selectedText)=>{
283
            this.genderValue = selectedVal[0]
284
            this.gender = selectedText.join(" ");
285
          },
286
          onCancel: this.cancelHandle
287
        });
288
      }
289
      this.picker.show();
290
      },
291
       showDatePicker(){
292
      if (!this.datePicker) {
293
        var year = new Date().getFullYear();
294
        this.datePicker = this.$createDatePicker({
295
          title: "选择日期",
296
          min: new Date(1900, 1,1),
297
          max: new Date(),
298
          value: new Date(),
299
          onSelect: (date, selectedVal, selectedText) => {
300
            console.log(selectedText)
301
            this.brithDate = selectedText[0]+ "-" +
302
              (selectedVal[1]<10?"0"+selectedVal[1]:selectedVal[1]) +
303
              "-" +
304
              (selectedVal[2] < 10 ? "0" + selectedVal[2] : selectedVal[2]);
305
          },
306
          onCancel: () =>{}
307
        });
308
      }
309
      this.datePicker.show();
310
    },
311
    back() {
312
      this.$router.back(-1);
313
    },
314
    
315
    submit(){
316
     
317
      var params = {}
318
      if (!this.name) {
319
        const toast = this.$createToast({
320
          type: "txt",
321
          txt: "请填写名称",
322
          time: 2000
323
        });
324
        toast.show();
325
        return;
326
      }
327
      params.atdObjName = this.name
328
      params.atdObjDesc = this.desc
329
      if(this.files.length>0){
330
        params.atdObjPic = this.files[0]
331
      }
332
      params.objInstId = this.outId
333
      params.atdObjSex = this.genderValue
334
      params.atdObjType = this.typeValue
335
      params.atdObjNotifyFlag = this.remind?'A':'N'
336
      params.atdObjBirthday = this.brithDate
337
      console.log(params)
338
      this.$http
339
        .post("/remind/addAtdObj", params)
340
        .then(response => {
341
          if (response.respCode == "0000") {
342
             var param = {}
343
            param.title = '新增成功'
344
            param.content = '将来的你一定会感谢现在的自己'
345
            param.className = 'flag-blue-pass'
346
            this.$router.push({ path: "/reissueClockSuccess",query:param  });
347
          }
348
        })
349
        .catch(error => {
350
          console.log(error);
351
      });
352
    }
353
  }
354
};
355
</script>
356
357
<style lang="stylus" rel="stylesheet/stylus">
358
@import '../../style/variable.styl';
359
360
361
.gray-backgroud {
362
  background-color: #eee;
363
}
364
.member-icon{
365
  margin-right:10px;  
366
  background-color: #eee;
367
  border-radius:100px;
368
  width:1.2rem;
369
  height:1.2rem;
370
  overflow:hidden;
371
  img{
372
    width:100%;
373
    height:100%;
374
  }
375
}
376
</style>

+ 303 - 0
vue-project/hn-kq/src/components/manage/ManageTheEndPersonEdit.vue

@ -0,0 +1,303 @@
1
<template>
2
  <div class="ipu-flex-row ipu-flex-vertical">
3
    <div class="ipu-flex-col">
4
      <header class="ipu-toolbar">
5
        <h1 class="ipu-toolbar-title">人员详情修改</h1>
6
        <a class="ipu-fn-left common-page-back" href="javascript:;" @click="back"></a>
7
      </header>
8
    </div>
9
    
10
      
11
      <div class="ipu-flex-col ipu-flex-col-auto">
12
        <div class="leaveapply-list">
13
              <div class="ipu-flex ipu-flex-align-center leaveapply-list-item-wrap leaveapply-list-item" >
14
                <div class="member-icon">
15
                  <img :src="ATD_OBJ_PIC" alt="">
16
                </div>
17
                <div class="ipu-flex-grow-1 " >
18
                  <div class="ipu-flex leavaapply-list-item-head">
19
                    <div class="ipu-flex-grow-1 leavaapply-list-item-title " >
20
                     {{ATD_OBJ_NAME}}
21
                    </div>
22
                    <!-- <div class="ipu-flwx-grow-0 leavaapply-list-item-type" >
23
                       {{item.atdObjName}}岁
24
                    </div> -->
25
                     
26
                  </div>
27
                  <div class="leaveapply-list-item-body">
28
                    <div class="leaveapply-list-item-note">
29
                      {{ATD_OBJ_SEX=='M'?'帅哥':'美女'}}
30
                    </div>
31
                    
32
                  </div>
33
                </div>
34
              </div>
35
36
              <div class="ipu-list ipu-list-high ipu-list-form">
37
            <ul>
38
              <!-- <li class="ipu-list-item">
39
                <div class="ipu-list-item-inner">
40
                  <div class="ipu-list-item-label">
41
                    工龄
42
                  </div>
43
                  <div class="ipu-list-item-input-wrap">
44
                    {{item.lengthOfService }}
45
                  </div>
46
                </div>
47
              </li> -->
48
              <li class="ipu-list-item">
49
                <div class="ipu-list-item-inner" @click="showAdminPicker">
50
                  <div class="ipu-list-item-label">
51
                    管理员
52
                  </div>
53
                  <div class="ipu-list-item-input-wrap">
54
                    {{IS_ADMIN_LIST=='Y'?'是':'否' }}
55
                  </div>
56
                </div>
57
              </li>
58
              <!-- <li class="ipu-list-item"j
59
                <div class="ipu-list-item-inner">
60
                  <div class="ipu-list-item-label">
61
                    部门
62
                  </div>
63
                  <div class="ipu-list-item-input-wrap">
64
                    {{item.ATD_OBJ_DESC}}
65
                  </div>
66
                </div>
67
              </li> -->
68
              <li class="ipu-list-item">
69
                <div class="ipu-list-item-inner"  @click="showDepartmentPicker">
70
                  <div class="ipu-list-item-label">
71
                    组织部门
72
                  </div>
73
                  <div class="ipu-list-item-input-wrap">
74
                    {{TEAM_NAME_LIST}}
75
                  </div>
76
                </div>
77
              </li>
78
              
79
             
80
             
81
              
82
              <!-- <li class="">
83
                <a class="ipu-list-item ipu-list-item-link" @click="toDetail(item)">
84
                <div class="ipu-list-item-inner ">
85
                  <div class="ipu-list-item-label">
86
                    出勤报表
87
                  </div>
88
                  <div class="ipu-list-item-input-wrap">
89
                    
90
                  </div>
91
                </div>
92
                </a>
93
              </li> -->
94
              <!-- <li class="ipu-list-item">
95
                <div class="ipu-list-item-inner">
96
                  <div class="ipu-list-item-label">
97
                    人物简介
98
                  </div>
99
                  <div class="ipu-list-item-input-wrap">
100
                    {{item.TEAM_ADDRESS}}
101
                  </div>
102
                </div>
103
              </li> -->
104
              
105
            </ul>
106
            <div class="submit-container">
107
              <cube-button @click="submit">提交修改</cube-button>
108
            </div>
109
          </div>
110
            </div>
111
112
      </div>
113
114
    
115
  </div>
116
</template>
117
118
<script>
119
import TypeUtil from "../../util/TypeUtil"
120
import EventBus from "../common/EventBus.js";
121
import {Toast, Dialog} from 'cube-ui'
122
export default {
123
  name: "ClockSuccess",
124
  props: {
125
    msg: String
126
  },
127
  data() {
128
    return {
129
     
130
      item:{
131
      },
132
      ATD_OBJ_PIC: '',
133
      ATD_OBJ_NAME: '',
134
      ATD_OBJ_SEX: '',
135
      IS_ADMIN_LIST: '',
136
      TEAM_NAME_LIST: '',
137
      queryCount:1,
138
      departmentList:[]
139
    };
140
  },
141
  mounted(){
142
    console.log(this.$route.query.info)
143
    this.ATD_OBJ_PIC = this.$route.query.info.ATD_OBJ_PIC
144
    this.ATD_OBJ_NAME = this.$route.query.info.ATD_OBJ_NAME
145
    this.ATD_OBJ_SEX = this.$route.query.info.ATD_OBJ_SEX
146
    this.IS_ADMIN_LIST = this.$route.query.info.IS_ADMIN_LIST?this.$route.query.info.IS_ADMIN_LIST:'N'
147
    this.TEAM_NAME_LIST = this.$route.query.info.TEAM_NAME_LIST
148
    var params = {}
149
    params.atdObjId = this.$route.query.info.ATD_OBJ_ID
150
    this.$http
151
      .post("/userInfo/getUserInfoDetail", params)
152
      .then(response => {
153
        if (response.respCode == "0000") {
154
          // this.departmentAtaLowerLevel = response.childTeamCount
155
          // this.superiorDepartment = response.parentTeamName=='null'?'无':response.parentTeamName
156
          // console.log(this.leaveApply)
157
          // this.item = response
158
        }
159
      })
160
      .catch(error => {
161
        console.log(error);
162
    });
163
    var teamParams = {}
164
    this.$http
165
      .post("/teamManage/getTeamList", teamParams)
166
      .then(response => {
167
        if (response.respCode == "0000") {
168
          // console.log(response);
169
          // var param = {}
170
          // param.title = '修改申请成功'
171
          // param.content = '将来的你一定会感谢现在的自己'
172
          // param.className = 'flag-blue-pass'
173
          // this.$router.push({ path: "/reissueClockSuccess",query:param  });
174
          this.departmentList = response.list
175
        }
176
      })
177
      .catch(error => {
178
        console.log(error);
179
    });
180
  },
181
  computed: {
182
     
183
    },
184
  methods: {
185
    showAdminPicker() {
186
      if (!this.pickerAdmin) {
187
        this.pickerAdmin = this.$createPicker({
188
          title: "选择是否管理员",
189
          data: [
190
           [{
191
             id:'Y',
192
             name:'是'
193
           },{
194
             id:'N',
195
             name: '否'
196
           }]
197
          ],
198
          alias: {
199
            value: "id",
200
            text: "name"
201
          },
202
          onSelect: (selectedVal, selectedIndex, selectedText) =>{
203
            console.log(this.$route.query.info)
204
              this.IS_ADMIN_LIST = selectedVal[0];
205
          },
206
          onCancel: this.cancelHandle
207
        });
208
      }
209
      this.pickerAdmin.show();
210
    },
211
     showDepartmentPicker() {
212
      if (!this.pickerDepartment) {
213
        this.pickerDepartment = this.$createPicker({
214
          title: "选择组织部门",
215
          data: [
216
           this.departmentList
217
          ],
218
          alias: {
219
            value: "TEAM_ID",
220
            text: "TEAM_NAME"
221
          },
222
          onSelect: (selectedVal, selectedIndex, selectedText) =>{
223
              this.superiorDepartmentId = selectedVal[0];
224
              this.TEAM_NAME_LIST = selectedText.join(" ");
225
              console.log(this.item)
226
          },
227
          onCancel: this.cancelHandle
228
        });
229
      }
230
      this.pickerDepartment.show();
231
    },
232
    back() {
233
      this.$router.back(-1);
234
    },
235
    
236
      
237
    toDetail(applyItem){  // attendanceList
238
      // this.$router.push({name: 'ManageTheEndPersonDetails', query: {id: applyItem.leaveInstId}})
239
240
       this.$router.push({
241
        name: "AttendanceList",
242
      });
243
    },
244
    submit(){
245
      var params = {}
246
      console.log(this.$route.query.info)
247
      params.atdObjId = this.$route.query.info.ATD_OBJ_ID
248
      params.teamId = this.$route.query.info.TEAM_ID_LIST
249
      if(this.$route.query.info.TEAM_ID_LIST == this.superiorDepartmentId&&this.IS_ADMIN_LIST==this.$route.query.info.IS_ADMIN_LIST){
250
        const toast = this.$createToast({
251
          type: "txt",
252
          txt: "该员工信息并无改动,无需提交",
253
          time: 2000
254
        });
255
        toast.show();
256
         return
257
      }
258
      params.newTeamId = this.superiorDepartmentId
259
      params.isAdmin = this.IS_ADMIN_LIST
260
      console.log(params)
261
      this.$http
262
        .post("/userInfo/modifyUserTeamInfo", params)
263
        .then(response => {
264
          if (response.respCode == "0000") {
265
            //  var param = {}
266
            // param.title = '修改成功'
267
            // param.content = '将来的你一定会感谢现在的自己'
268
            // param.className = 'flag-blue-pass'
269
            // this.$router.push({ path: "/reissueClockSuccess",query:param  });
270
             Dialog.$create({type: 'alert', title: '提示', content: '修改成功!',onConfirm: () => {
271
                 EventBus.$emit('to-persondetails', 'back');
272
              this.back();
273
            }}).show()
274
          }
275
        })
276
        .catch(error => {
277
          console.log(error);
278
      });
279
    }
280
  }
281
};
282
</script>
283
284
<style lang="stylus" rel="stylesheet/stylus">
285
@import '../../style/variable.styl';
286
287
288
.gray-backgroud {
289
  background-color: #eee;
290
}
291
.member-icon{
292
  margin-right:10px;  
293
  background-color: #eee;
294
  border-radius:100px;
295
  width:1.2rem;
296
  height:1.2rem;
297
  overflow:hidden;
298
  img{
299
    width:100%;
300
    height:100%;
301
  }
302
}
303
</style>