|
@@ -9,22 +9,11 @@
|
|
|
content="width=device-width,user-scalable=yes, initial-scale=1, maximum-scale=0.5"
|
|
|
name="viewport"
|
|
|
/>
|
|
|
- <link
|
|
|
- rel="stylesheet"
|
|
|
- type="text/css"
|
|
|
- th:href="@{/common/zTree/css/zTreeStyle/zTreeStyle.css}"
|
|
|
- href="../../../../../common/zTree/css/zTreeStyle/zTreeStyle.css"
|
|
|
- />
|
|
|
<link
|
|
|
rel="stylesheet"
|
|
|
th:href="@{/common/bootstrap-v4/css/bootstrap.min.css}"
|
|
|
href="../../../../../common/bootstrap-v4/css/bootstrap.min.css"
|
|
|
/>
|
|
|
- <link
|
|
|
- rel="stylesheet"
|
|
|
- th:href="@{/common/bootstrap-table/bootstrap-table.min.css}"
|
|
|
- href="../../../../../common/bootstrap-table/bootstrap-table.min.css"
|
|
|
- />
|
|
|
<link
|
|
|
rel="stylesheet"
|
|
|
type="text/css"
|
|
@@ -61,176 +50,15 @@
|
|
|
href="../../../../../common/css/minto.layout.css"
|
|
|
/>
|
|
|
<style>
|
|
|
- .mt-center {
|
|
|
- overflow-y: auto;
|
|
|
- }
|
|
|
-
|
|
|
- .tableInfo {
|
|
|
- width: 100%;
|
|
|
- height: 100%;
|
|
|
- }
|
|
|
-
|
|
|
- .mt-content {
|
|
|
- height: auto;
|
|
|
- min-height: 100%;
|
|
|
- padding-top: 0 !important;
|
|
|
- }
|
|
|
-
|
|
|
- .mt-content-left {
|
|
|
- width: 235px;
|
|
|
- min-width: 235px;
|
|
|
- height: auto;
|
|
|
- background: #fff;
|
|
|
- padding-top: 10px;
|
|
|
- }
|
|
|
-
|
|
|
- .mt-content-right {
|
|
|
- background: #fff;
|
|
|
- padding: 20px;
|
|
|
- position: relative;
|
|
|
- }
|
|
|
-
|
|
|
- .infoTitle {
|
|
|
- text-align: center;
|
|
|
- font-size: 28px;
|
|
|
- margin-bottom: 20px;
|
|
|
- }
|
|
|
-
|
|
|
- .infoCount,
|
|
|
- .ranking {
|
|
|
- font-size: 16px;
|
|
|
- line-height: 30px;
|
|
|
- text-indent: 50px;
|
|
|
- }
|
|
|
-
|
|
|
- .countNum {
|
|
|
- font-size: 18px;
|
|
|
- color: #0c94ff;
|
|
|
- }
|
|
|
-
|
|
|
- .infoLabel {
|
|
|
- font-size: 20px;
|
|
|
- font-weight: bold;
|
|
|
- margin: 20px 0;
|
|
|
- }
|
|
|
-
|
|
|
- .mt-table {
|
|
|
- margin-top: 20px;
|
|
|
- }
|
|
|
-
|
|
|
- table thead th,
|
|
|
- table tbody td {
|
|
|
- text-align: center;
|
|
|
- }
|
|
|
-
|
|
|
- .searchLi {
|
|
|
- padding: 5px;
|
|
|
- display: flex;
|
|
|
- position: relative;
|
|
|
- }
|
|
|
-
|
|
|
- .searchLi input {
|
|
|
- height: 30px;
|
|
|
- margin-right: 5px;
|
|
|
- width: 100px;
|
|
|
- }
|
|
|
-
|
|
|
- .searchLi .mt-btn {
|
|
|
- margin-right: 0;
|
|
|
- }
|
|
|
-
|
|
|
- .searchTips {
|
|
|
- width: 100%;
|
|
|
- padding: 10px;
|
|
|
- font-size: 14px;
|
|
|
- color: #666;
|
|
|
- position: absolute;
|
|
|
- top: 45px;
|
|
|
- background: #fff;
|
|
|
- box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
|
|
|
- display: none;
|
|
|
- }
|
|
|
-
|
|
|
- .tipsLi {
|
|
|
- height: 30px;
|
|
|
- line-height: 30px;
|
|
|
- }
|
|
|
-
|
|
|
- .triangle {
|
|
|
- width: 0;
|
|
|
- height: 0;
|
|
|
- border-left: 5px solid transparent;
|
|
|
- border-right: 5px solid transparent;
|
|
|
- border-bottom: 10px solid #fff;
|
|
|
- position: absolute;
|
|
|
- top: -10px;
|
|
|
- }
|
|
|
-
|
|
|
- .example {
|
|
|
- color: #0c94ff;
|
|
|
- }
|
|
|
-
|
|
|
- #Key {
|
|
|
- display: none;
|
|
|
- }
|
|
|
-
|
|
|
- .monthTxt {
|
|
|
- display: none;
|
|
|
- }
|
|
|
-
|
|
|
- @media (max-width: 1600px) {
|
|
|
- .mt-content-right {
|
|
|
- padding: 15px;
|
|
|
- }
|
|
|
-
|
|
|
- .infoTitle {
|
|
|
- font-size: 22px;
|
|
|
- margin-bottom: 15px;
|
|
|
- }
|
|
|
-
|
|
|
- .infoCount,
|
|
|
- .ranking {
|
|
|
- font-size: 14px;
|
|
|
- line-height: 24px;
|
|
|
- text-indent: 40px;
|
|
|
- }
|
|
|
-
|
|
|
- .countNum {
|
|
|
- font-size: 16px;
|
|
|
- }
|
|
|
-
|
|
|
- .infoLabel {
|
|
|
- font-size: 18px;
|
|
|
- margin: 15px 0;
|
|
|
- }
|
|
|
-
|
|
|
- .mt-table {
|
|
|
- margin-top: 15px;
|
|
|
- }
|
|
|
-
|
|
|
- .searchLi input {
|
|
|
- height: 25px;
|
|
|
- margin-right: 5px;
|
|
|
- width: 80px;
|
|
|
- }
|
|
|
-
|
|
|
- .searchTips {
|
|
|
- font-size: 12px;
|
|
|
- top: 40px;
|
|
|
- }
|
|
|
-
|
|
|
- .tipsLi {
|
|
|
- height: 25px;
|
|
|
- line-height: 24px;
|
|
|
- }
|
|
|
+ .pj-body{
|
|
|
+ padding: 15px;
|
|
|
}
|
|
|
-
|
|
|
- .byType {
|
|
|
- display: none;
|
|
|
+ .pj-head{
|
|
|
+ margin-bottom: 15px;
|
|
|
}
|
|
|
-
|
|
|
- .mt-content-right {
|
|
|
- border-right: 0;
|
|
|
+ .pj-table{
|
|
|
+ background-color: #fff;
|
|
|
+ padding: 15px;
|
|
|
}
|
|
|
|
|
|
::-webkit-scrollbar,
|
|
@@ -242,114 +70,66 @@
|
|
|
</style>
|
|
|
</head>
|
|
|
<body>
|
|
|
- <div class="mt-body mt-vertical">
|
|
|
- <div class="mt-center">
|
|
|
- <div class="mt-content">
|
|
|
- <div class="mt-btn-region">
|
|
|
- <div class="mt-btn-group">
|
|
|
- <input id="year" name="year" type="hidden" value="" />
|
|
|
- <button class="mt-btn">
|
|
|
- <span class="mt-selTxt year-text"></span>
|
|
|
- <i class="caret"></i>
|
|
|
- </button>
|
|
|
- <ul id="years" class="mt-dropdown-menu"></ul>
|
|
|
- </div>
|
|
|
-
|
|
|
- <div class="mt-btn-group">
|
|
|
- <input id="currentTaskTypes" name="year" type="hidden" value="" />
|
|
|
- <button class="mt-btn">
|
|
|
- <span class="mt-selTxt taskType-text"></span>
|
|
|
- <i class="caret"></i>
|
|
|
- </button>
|
|
|
- <ul id="pageTaskTypes" class="mt-dropdown-menu"></ul>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
-
|
|
|
- <div class="mt-horizontal tableInfo">
|
|
|
- <div class="mt-content-right">
|
|
|
- <table
|
|
|
- id="byManager"
|
|
|
- class="mt-table mt-table-border"
|
|
|
- border="0"
|
|
|
- cellspacing="0"
|
|
|
- cellpadding="0"
|
|
|
- >
|
|
|
- <thead>
|
|
|
- <tr>
|
|
|
- <th>序号</th>
|
|
|
- <th>人员</th>
|
|
|
- <th>所属部门</th>
|
|
|
- <th>总得分</th>
|
|
|
- <th>基础分</th>
|
|
|
- <th>评价得分</th>
|
|
|
- <th>平均事项完成时长</th>
|
|
|
- </tr>
|
|
|
- </thead>
|
|
|
- <tbody id="byManagerTrs">
|
|
|
- <tr>
|
|
|
- <td colspan="6">暂无数据</td>
|
|
|
- </tr>
|
|
|
- </tbody>
|
|
|
- </table>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
+ <div class="pj-body" id="pjApp" v-cloak>
|
|
|
+ <div class="pj-head">
|
|
|
+ <button @click="updateItem('add')" class="mt-btn">新增</button>
|
|
|
+ <button @click="updateItem('up')" class="mt-btn">修改</button>
|
|
|
+ <button @click="deleteItem" class="mt-btn">删除</button>
|
|
|
+ </div>
|
|
|
+ <div class="mt-horizontal pj-table">
|
|
|
+ <div class="mt-content-right">
|
|
|
+ <table class="mt-table mt-table-border" >
|
|
|
+ <thead>
|
|
|
+ <tr>
|
|
|
+ <th width="40px" align="center"></th>
|
|
|
+ <th>名称</th>
|
|
|
+ <th>枚举值</th>
|
|
|
+ <th>排序号</th>
|
|
|
+ <th>基础分</th>
|
|
|
+ <th>评价得分</th>
|
|
|
+ <th>创建时间</th>
|
|
|
+ <th>更新时间</th>
|
|
|
+ </tr>
|
|
|
+ </thead>
|
|
|
+ <tbody v-if="!enumDataList.length">
|
|
|
+ <tr>
|
|
|
+ <td colspan="6">暂无数据</td>
|
|
|
+ </tr>
|
|
|
+ </tbody>
|
|
|
+
|
|
|
+ <tbody v-else>
|
|
|
+ <tr v-for="(item,index) in enumDataList" :key="index">
|
|
|
+ <td><input v-model="checked" type="radio" name="radio" :value="item.id"></td>
|
|
|
+ <td>{{item.value}}</td>
|
|
|
+ <td>{{item.key}}</td>
|
|
|
+ <td>{{item.sort}}</td>
|
|
|
+ <td>{{item.basicScore}}</td>
|
|
|
+ <td>{{item.evalScore}}</td>
|
|
|
+ <td>{{dateFormat(item.createDate)}}</td>
|
|
|
+ <td>{{dateFormat(item.updateDate)}}</td>
|
|
|
+ </tr>
|
|
|
+ </tbody>
|
|
|
+ </table>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
-
|
|
|
- <form
|
|
|
- id="exportForm"
|
|
|
- style="display: none"
|
|
|
- th:action="@{/gradeAnalysis/exportTaskAnalysis}"
|
|
|
- method="post"
|
|
|
- >
|
|
|
- <input type="hidden" id="managerRemind" name="managerRemind" value="" />
|
|
|
- <input type="hidden" id="taskTypeRemind" name="taskTypeRemind" value="" />
|
|
|
- <input type="hidden" id="exportYear" name="year" value="" />
|
|
|
- <input type="hidden" id="exportTaskTypeId" name="taskTypeId" value="" />
|
|
|
- <input type="hidden" id="exportOrgName" name="orgName" value="" />
|
|
|
- </form>
|
|
|
</body>
|
|
|
<script
|
|
|
type="text/javascript"
|
|
|
th:src="@{/common/jquery/jquery.min.js}"
|
|
|
src="../../../../../common/jquery/jquery.min.js"
|
|
|
></script>
|
|
|
- <script
|
|
|
- type="text/javascript"
|
|
|
- th:src="@{/common/zTree/js/jquery.ztree.core.js}"
|
|
|
- src="../../../../../common/zTree/js/jquery.ztree.core.js"
|
|
|
- ></script>
|
|
|
<script
|
|
|
type="text/javascript"
|
|
|
th:src="@{/common/js/ui/icon/iconfont.js}"
|
|
|
src="../../../../../common/js/ui/icon/iconfont.js"
|
|
|
></script>
|
|
|
- <script
|
|
|
- type="text/javascript"
|
|
|
- th:src="@{/common/bootstrap-table/bootstrap-table.min.js}"
|
|
|
- src="../../../../../common/bootstrap-table/bootstrap-table.min.js"
|
|
|
- ></script>
|
|
|
- <script
|
|
|
- type="text/javascript"
|
|
|
- th:src="@{/common/bootstrap-table/extensions/fixed-columns/bootstrap-table-fixed-columns.js}"
|
|
|
- src="../../../../../common/bootstrap-table/extensions/fixed-columns/bootstrap-table-fixed-columns.js"
|
|
|
- ></script>
|
|
|
- <script
|
|
|
- type="text/javascript"
|
|
|
- th:src="@{/common/bootstrap-table/locale/bootstrap-table-zh-CN.js}"
|
|
|
- src="../../../../../common/bootstrap-table/locale/bootstrap-table-zh-CN.js"
|
|
|
- ></script>
|
|
|
+ <script type="text/javascript" th:src="@{/common/vue/vue.min.js}"></script>
|
|
|
<script
|
|
|
type="text/javascript"
|
|
|
th:src="@{/common/js/ui/minto.comp.js}"
|
|
|
src="../../../../../common/js/ui/minto.comp.js"
|
|
|
></script>
|
|
|
- <script
|
|
|
- type="text/javascript"
|
|
|
- th:src="@{/common/js/ui/minto.table.js}"
|
|
|
- src="../../../../../common/js/ui/minto.table.js"
|
|
|
- ></script>
|
|
|
<script
|
|
|
type="text/javascript"
|
|
|
th:src="@{/tc_ttp/common/tc.js}"
|
|
@@ -365,128 +145,118 @@
|
|
|
th:src="@{/tc_ttp/common/ajax.js}"
|
|
|
src="../../../../../common/ajax.js"
|
|
|
></script>
|
|
|
- <script
|
|
|
- type="text/javascript"
|
|
|
- th:src="@{/tc_ttp/art-template/template-web.js}"
|
|
|
- src="../../../../tc_ttp/art-template/template-web.js"
|
|
|
- ></script>
|
|
|
<script
|
|
|
th:src="@{/common/mCustomScrollbar/js/jquery.mCustomScrollbar.concat.min.js}"
|
|
|
src="../../../../common/mCustomScrollbar/js/jquery.mCustomScrollbar.concat.min.js"
|
|
|
></script>
|
|
|
|
|
|
- <script id="responUnitTableBody" type="text/html">
|
|
|
- {{if data.length==0}}
|
|
|
- <tr>
|
|
|
- <td colspan="6">暂无数据</td>
|
|
|
- </tr>
|
|
|
- {{else if data.length>0}} {{each data obj index}}
|
|
|
- <tr>
|
|
|
- <td>{{index+1}}</td>
|
|
|
- <td>{{obj.pname}}</td>
|
|
|
- <td>{{obj.dname}}</td>
|
|
|
- <td>{{obj.score}}</td>
|
|
|
- <td>{{obj.score1}}</td>
|
|
|
- <td>{{obj.score2}}</td>
|
|
|
- <td>{{obj.avgtime}}</td>
|
|
|
- </tr>
|
|
|
- {{/each}} {{/if}}
|
|
|
- </script>
|
|
|
<script th:inline="javascript">
|
|
|
- $(function () {
|
|
|
- initYears();
|
|
|
- initTableByManager(new Date().getFullYear(), '');
|
|
|
- initPageTaskTypes();
|
|
|
- });
|
|
|
-
|
|
|
- function initTableByManager(year, id) {
|
|
|
- var param = {
|
|
|
- year: year,
|
|
|
- taskTypeId: '0',
|
|
|
- orgName: '',
|
|
|
- gbTaskTypeId: id + '',
|
|
|
- };
|
|
|
- callAjaxRequest(
|
|
|
- 'taskAnalysisWebService',
|
|
|
- 'findEvaluateAnalysis',
|
|
|
- param,
|
|
|
- function (result) {
|
|
|
- var html;
|
|
|
- if (!!result) {
|
|
|
- //扩展字段个数 + table写死的字段个数
|
|
|
- var objs = {
|
|
|
- data: result,
|
|
|
- };
|
|
|
- html = template('responUnitTableBody', objs);
|
|
|
- } else {
|
|
|
- html = '<tr> <td colspan="6">暂无数据</td></tr>';
|
|
|
- }
|
|
|
- $('#byManagerTrs').html('');
|
|
|
- $('#byManagerTrs').append(html);
|
|
|
+ new Vue({
|
|
|
+ el: '#pjApp',
|
|
|
+ data() {
|
|
|
+ return{
|
|
|
+ enumDataList:[],
|
|
|
+ checked:""
|
|
|
}
|
|
|
- );
|
|
|
- }
|
|
|
-
|
|
|
- function initPageTaskTypes() {
|
|
|
- let showListData = [{ id: '', name: '全部', parent_id: 0 }];
|
|
|
- let renderStr = '';
|
|
|
- callAjaxRequest('taskAnalysisWebService', 'findTaskTypes', {}, function (result) {
|
|
|
- result = result || [];
|
|
|
- showListData = showListData.concat(result);
|
|
|
- for (let i = 0, len = showListData.length; i < len; i++) {
|
|
|
- let item = showListData[i];
|
|
|
- renderStr +=
|
|
|
- '<li><a class="mt-dropdown-txt taskType-txt" onclick="filterByType(\'' +
|
|
|
- item.id +
|
|
|
- '\')" value="' +
|
|
|
- item.id +
|
|
|
- '' +
|
|
|
- '">' +
|
|
|
- item.name +
|
|
|
- '</a></li>';
|
|
|
+ },
|
|
|
+ methods:{
|
|
|
+ updateItem(type){
|
|
|
+ let _this = this;
|
|
|
+ let item = null;
|
|
|
+ if(type !== 'add'){
|
|
|
+ if(!this.checked){
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ item = this.enumDataList.find(v => v.id === this.checked);
|
|
|
+ }
|
|
|
+ $.dialog({
|
|
|
+ title: type==='add' ? '新增类型' :'修改类型',//使用节点名称
|
|
|
+ max: false,
|
|
|
+ min: false,
|
|
|
+ width: "360px",
|
|
|
+ height: "240px",
|
|
|
+ content:'url:' + TC.config.baseUrl + '/task/settingModal',
|
|
|
+ lock: true,
|
|
|
+ data: item ? JSON.parse(JSON.stringify(item)) : {},
|
|
|
+ button : [
|
|
|
+ {
|
|
|
+ "name":"关闭",
|
|
|
+ callback:function(){
|
|
|
+ this.close();
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "name":"确定",
|
|
|
+ callback:function(){
|
|
|
+ let vm = this.content.vm;
|
|
|
+ if(!vm.checkValue()){
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ let params = vm.formData;
|
|
|
+ if(type !== 'add'){
|
|
|
+ params.id = item.id;
|
|
|
+ }
|
|
|
+
|
|
|
+ callAjaxRequest(
|
|
|
+ 'taskAnalysisWebService',
|
|
|
+ 'saveMatterTypeSettings', params,
|
|
|
+ function () {
|
|
|
+ _this.initData()
|
|
|
+ }
|
|
|
+ );
|
|
|
+
|
|
|
+ return true;
|
|
|
+ },
|
|
|
+ focus:true
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ });
|
|
|
+ },
|
|
|
+ deleteItem(){
|
|
|
+ if(!this.checked){
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ let _this = this;
|
|
|
+ $.confirm("是否确认删除?",function(){
|
|
|
+ callAjaxRequest(
|
|
|
+ 'taskAnalysisWebService',
|
|
|
+ 'deleteMatterTypeSettings', {id: _this.checked},
|
|
|
+ function () {
|
|
|
+ _this.initData()
|
|
|
+ }
|
|
|
+ );
|
|
|
+ })
|
|
|
+ },
|
|
|
+ // 时间戳转换成日期
|
|
|
+ dateFormat(date) {
|
|
|
+ // 字符串转换成数字
|
|
|
+ let dateObj = new Date(Number(date));
|
|
|
+ let year = dateObj.getFullYear();
|
|
|
+ let month = dateObj.getMonth() + 1;
|
|
|
+ let day = dateObj.getDate();
|
|
|
+ if (month < 10) {
|
|
|
+ month = '0' + month;
|
|
|
+ }
|
|
|
+ if (day < 10) {
|
|
|
+ day = '0' + day;
|
|
|
+ }
|
|
|
+ return year + '-' + month + '-' + day;
|
|
|
+ },
|
|
|
+ initData(){
|
|
|
+ let _this = this;
|
|
|
+ callAjaxRequest(
|
|
|
+ 'taskAnalysisWebService',
|
|
|
+ 'findMatterTypeSettings', {param: {}},
|
|
|
+ function (result) {
|
|
|
+ _this.enumDataList = result || []
|
|
|
+ }
|
|
|
+ );
|
|
|
}
|
|
|
- $('#pageTaskTypes').html(renderStr);
|
|
|
- $('#currentTaskTypes').val('');
|
|
|
- });
|
|
|
- $('.taskType-text').text('全部');
|
|
|
- }
|
|
|
-
|
|
|
- // 根据类型加载列表
|
|
|
- function filterByType(id) {
|
|
|
- $.startProc();
|
|
|
- $('#currentTaskTypes').val(id);
|
|
|
- initTableByManager($('#year').val(), id);
|
|
|
- }
|
|
|
-
|
|
|
- function initYears() {
|
|
|
- var uls = '';
|
|
|
- var year = new Date().getFullYear();
|
|
|
- for (var i = 0; i <= 2; i++) {
|
|
|
- var thatYear = year - i;
|
|
|
- uls +=
|
|
|
- '<li><a class="mt-dropdown-txt year-txt" onclick="setYear(' +
|
|
|
- thatYear +
|
|
|
- ')" value="' +
|
|
|
- thatYear +
|
|
|
- '">' +
|
|
|
- thatYear +
|
|
|
- '年</a></li>';
|
|
|
+ },
|
|
|
+ created() {
|
|
|
+ this.initData();
|
|
|
}
|
|
|
- $('#years').html(uls);
|
|
|
- $('#year').val(year);
|
|
|
- $('.year-text').text(year + '年');
|
|
|
- }
|
|
|
-
|
|
|
- //根据年份筛选
|
|
|
- function setYear(year) {
|
|
|
- $.startProc();
|
|
|
- $('#year').val(year);
|
|
|
- //刷新列表
|
|
|
- initTableByManager(year, $('#currentTaskTypes').val());
|
|
|
- }
|
|
|
-
|
|
|
- $('body').on('click', '.mt-btn-group .mt-dropdown-txt', function (e) {
|
|
|
- $('.yearTxt').html($(this).html());
|
|
|
- });
|
|
|
+ })
|
|
|
</script>
|
|
|
</html>
|