|
@@ -0,0 +1,257 @@
|
|
|
+<%--
|
|
|
+ ~ Copyright (c) 2014, 2023, Chengdu Minto Technology Co.,LTD. All rights reserved.
|
|
|
+ ~ DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
|
|
+ --%>
|
|
|
+
|
|
|
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
|
+<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
|
|
|
+<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
|
|
+<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
|
|
|
+<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
|
|
|
+<%@ taglib prefix="tc" uri="http://www.mingto.net/tip" %>
|
|
|
+<%@ page isELIgnored="false" %>
|
|
|
+<html xmlns="http://www.w3.org/1999/xhtml">
|
|
|
+<head>
|
|
|
+ <meta name="renderer" content="webkit|ie-stand|ie-comp">
|
|
|
+ <meta http-equiv="X-UA-Compatible" content="IE=11;IE=10;IE=9; IE=8; IE=7; IE=EDGE,chrome=1" />
|
|
|
+ <title>事项类型分配</title>
|
|
|
+ <style type="text/css">
|
|
|
+ .mt-form-item {
|
|
|
+ align-items: center;
|
|
|
+ }
|
|
|
+ </style>
|
|
|
+ <link rel="stylesheet" href="${path}/common/css/minto.icon.css${resSuffix}" type="text/css" />
|
|
|
+ <link rel="stylesheet" href="${path}/common/css/minto.comp.css${resSuffix}" type="text/css" />
|
|
|
+ <link href="${path}/tc_ttp/bootstrap/css/bootstrap.min.css${resSuffix}" media="screen" rel="stylesheet" type="text/css"/>
|
|
|
+ <link rel="Stylesheet" type="text/css" href="${path}/common/zTree/css/zTreeStyle/zTreeStyle.css${resSuffix}" />
|
|
|
+ <link href="${path}/tc_suite/taskmt/byType/css/byType.css${resSuffix}" media="screen" rel="stylesheet" type="text/css" />
|
|
|
+ <link href="${path}/tc_ttp/bootstrap-multiselect/bootstrap-multiselect.css${resSuffix}" media="screen" rel="stylesheet" type="text/css" />
|
|
|
+ <style type="text/css">
|
|
|
+ a, a:hover, a:focus{
|
|
|
+ color: #0c94ff;
|
|
|
+ }
|
|
|
+ .mt-content{
|
|
|
+ display: flex;
|
|
|
+ height: 100vh;
|
|
|
+ font-size: 16px;
|
|
|
+ padding: 20px;
|
|
|
+ }
|
|
|
+ .taskList{
|
|
|
+ width: 70%;
|
|
|
+ }
|
|
|
+ .origin-tree{
|
|
|
+ width: 30%;
|
|
|
+ }
|
|
|
+ .list-item{
|
|
|
+ display: flex;
|
|
|
+ }
|
|
|
+ #taskType{
|
|
|
+ width: 618px;
|
|
|
+ height: 120px;
|
|
|
+ resize: none;
|
|
|
+ padding: 10px;
|
|
|
+ }
|
|
|
+ .close-icon {
|
|
|
+ display: none;
|
|
|
+ cursor: pointer;
|
|
|
+ color: red;
|
|
|
+ font-size: 20px;
|
|
|
+ margin-left: 5px;
|
|
|
+ }
|
|
|
+ .flex-ac{
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ }
|
|
|
+ .list-name{
|
|
|
+ line-height: 22px;
|
|
|
+ margin-bottom: 10px;
|
|
|
+ width: fit-content;
|
|
|
+ }
|
|
|
+ .list-name:hover{
|
|
|
+ background-color: #f0f0f0;
|
|
|
+ }
|
|
|
+ .list-name:hover .close-icon{
|
|
|
+ display: block;
|
|
|
+ }
|
|
|
+ .text-ellipsis-1 {
|
|
|
+ overflow: hidden;
|
|
|
+ display: -webkit-box;
|
|
|
+ /*white-space: break-spaces;*/
|
|
|
+ word-break: break-all;
|
|
|
+ -webkit-box-orient: vertical;
|
|
|
+ -webkit-line-clamp: 1;
|
|
|
+ }
|
|
|
+ textarea[disabled] {
|
|
|
+ background: #fff !important;
|
|
|
+ cursor: not-allowed;
|
|
|
+ }
|
|
|
+ label{
|
|
|
+ font-weight: normal;
|
|
|
+ user-select: none;
|
|
|
+ }
|
|
|
+ .red-point{
|
|
|
+ color: red;
|
|
|
+ margin-right: 5px;
|
|
|
+ }
|
|
|
+ </style>
|
|
|
+ <script type="text/javascript" src="${path}/tc_ttp/jquery/jquery-1.12.4.min.js${resSuffix}"></script>
|
|
|
+ <script type="text/javascript" src="${path}/tc_ttp/common/jquery.json.js${resSuffix}"></script>
|
|
|
+ <script type="text/javascript" src="${path}/common/js/ui/icon/iconfont.js${resSuffix}"></script>
|
|
|
+ <script type="text/javascript" src="${path}/common/js/ui/minto.comp.js${resSuffix}"></script>
|
|
|
+ <script type="text/javascript" src="${path}/tc_ttp/common/tc.js${resSuffix}"></script>
|
|
|
+ <script type="text/javascript" src="${path}/common/zTree/js/jquery.ztree.core.min.js${resSuffix}"></script>
|
|
|
+ <script type="text/javascript" src="${path}/common/zTree/js/jquery.ztree.exhide.min.js${resSuffix}"></script>
|
|
|
+ <script type="text/javascript" src="${path}/common/zTree/js/jquery.ztree.excheck.min.js${resSuffix}"></script>
|
|
|
+ <script type="text/javascript" src="${path}/tc_ttp/bootstrap/js/bootstrap.js${resSuffix}"></script>
|
|
|
+ <script type="text/javascript" src="${path}/tc_ttp/bootstrap-multiselect/bootstrap-multiselect.js${resSuffix}"></script>
|
|
|
+ <script type="text/javascript" src="${path}/tc_ttp/lhgdialog4.2.0/lhgdialog.js${resSuffix}"></script>
|
|
|
+ <script type="text/javascript" src="${path}/tc_ttp/common/function.js${resSuffix}"></script>
|
|
|
+ <script type="text/javascript" src="${path}/common/vue/vue.min.js"></script>
|
|
|
+ <script type="text/javascript" src="${path}/tc_tap/space/js/upload.js${resSuffix}"></script>
|
|
|
+ <script type="text/javascript" src="${path}/tc_tap/relResource/js/relResource.js${resSuffix}"></script>
|
|
|
+ <script type="text/javascript" src="${path}/tc_ttp/dummyPhotoView/dummyPhotoView.js${resSuffix}"></script>
|
|
|
+
|
|
|
+</head>
|
|
|
+<body>
|
|
|
+<form class="mt-content" id="app">
|
|
|
+ <div class="taskList">
|
|
|
+ <div class="list-item">
|
|
|
+ <div><span class="red-point">*</span>任务名称:</div>
|
|
|
+ <ul style="width: 618px;">
|
|
|
+ <li v-for="(item,index) in beanByIds" :key="item.id" class="flex-ac list-name" style="line-height: 22px">
|
|
|
+ <span :title="item.title" class="text-ellipsis-1">{{ index + 1 }}.{{ item.title }}</span>
|
|
|
+ <span id="closeBtn" class="close-icon" title="删除" @click="deleteRow(index)">×</span>
|
|
|
+ </li>
|
|
|
+ </ul>
|
|
|
+ </div>
|
|
|
+ <div class="list-item">
|
|
|
+ <div><span class="red-point">*</span>任务类型:</div>
|
|
|
+ <textarea name="" id="taskType" placeholder="请在右侧任务类型树中选择" disabled title="请在右侧任务类型树中选择"></textarea>
|
|
|
+ </div>
|
|
|
+
|
|
|
+ </div>
|
|
|
+ <div class="origin-tree">
|
|
|
+ <div id="tabs" class="tab-content" style="width: 100%;height:600px; overflow:auto;">
|
|
|
+ <div id="menuTree" name="menuTree" class="ztree"></div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+</form>
|
|
|
+<input type="hidden" id="prefixMsg" value="${smsInfo.prefixMsg}">
|
|
|
+<input type="hidden" id="suffixMsg" value="${smsInfo.suffixMsg}">
|
|
|
+</body>
|
|
|
+<script>
|
|
|
+ var app = new Vue({
|
|
|
+ el: '#app',
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ beanByIds:${beanByIds},
|
|
|
+ leaderTypeId:"${leaderTypeId}",//副县长id
|
|
|
+ //deputyCountyList:${deputyCountyList},
|
|
|
+ isLeader:false
|
|
|
+ }
|
|
|
+ },
|
|
|
+ methods:{
|
|
|
+ deleteRow(i){
|
|
|
+ if(this.beanByIds.length > 1){
|
|
|
+ this.beanByIds.splice(i,1);
|
|
|
+ }else{
|
|
|
+ $.alert("至少有一个任务分配");
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ created() {
|
|
|
+ },
|
|
|
+ mounted() {
|
|
|
+ }
|
|
|
+ })
|
|
|
+</script>
|
|
|
+<script>
|
|
|
+ var treeObj = null
|
|
|
+ var typeIds = null
|
|
|
+ $(function(){
|
|
|
+ initTree()
|
|
|
+ })
|
|
|
+ //初始化树
|
|
|
+ function initTree(){
|
|
|
+ var treeData = ${typeJson};
|
|
|
+ var setting = {
|
|
|
+ check: {
|
|
|
+ enable: true,
|
|
|
+ chkStyle: "checkbox",
|
|
|
+ },
|
|
|
+ view: {
|
|
|
+ dblClickExpand: true,
|
|
|
+ selectedMulti : true,//可以多选
|
|
|
+ showLine: true
|
|
|
+ },
|
|
|
+ data: {
|
|
|
+ simpleData: {
|
|
|
+ enable: true,
|
|
|
+ idKey:"id",
|
|
|
+ pIdKey:"parentId",
|
|
|
+ }
|
|
|
+ },
|
|
|
+ callback:{
|
|
|
+ onCheck: function(event, treeId, treeNode){
|
|
|
+ var checkedNodes = $.fn.zTree.getZTreeObj(treeId).getCheckedNodes(true); // 获取所有勾选节点
|
|
|
+ var checkedValues = checkedNodes.map(function(node) {
|
|
|
+ if(!node.children || node.children.length === 0){
|
|
|
+ return node.name;
|
|
|
+ }
|
|
|
+ }).filter(item => item !== undefined); // 提取节点的 name 属性值
|
|
|
+
|
|
|
+ typeIds = checkedNodes.map(function(node) {
|
|
|
+ if(!node.children || node.children.length === 0){
|
|
|
+ return node.id;
|
|
|
+ }
|
|
|
+ }).filter(item => item !== undefined); // 提取节点的 id 属性值
|
|
|
+
|
|
|
+ $("#taskType").val(checkedValues.join("、"));
|
|
|
+ app.isLeader = false
|
|
|
+ // 判断是否选中副县长清单
|
|
|
+ if(typeIds.includes(app.leaderTypeId)){
|
|
|
+ app.isLeader = true
|
|
|
+ }
|
|
|
+ },
|
|
|
+ onClick:function (event,treeId, treeNode){
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+ };
|
|
|
+
|
|
|
+ treeObj = $.fn.zTree.init($("#menuTree"), setting, treeData);
|
|
|
+ treeObj.expandAll(true);
|
|
|
+ }
|
|
|
+ //发送
|
|
|
+ function sendShareTaskType(callback){
|
|
|
+ let taskNameList = app.beanByIds;
|
|
|
+ let taskId = taskNameList.map((item) => item.id).join();
|
|
|
+ let deputyCountyId = $('input[name="deputyId"]:checked').val();
|
|
|
+
|
|
|
+ if(typeIds == null || typeIds == undefined || typeIds.length == 0){
|
|
|
+ $.alert("请选择任务类型");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ typeIds = typeIds.join();
|
|
|
+ var progressBar = $.startProc("正在保存,请稍后...")
|
|
|
+ var result = {result:"error",message:"保存失败,请重新发送。"};
|
|
|
+
|
|
|
+ $.ajax({
|
|
|
+ url:TC.config.baseUrl+"/taskByType/saveShareTaskType/",
|
|
|
+ data:{"taskId":taskId,"typeIds":typeIds,"deputyCountyId":deputyCountyId},
|
|
|
+ async:true,
|
|
|
+ dataType:"json",
|
|
|
+ type:"POST",
|
|
|
+ success:function (res) {
|
|
|
+ $.extend(result,res);
|
|
|
+ if ($.isFunction(callback)) {
|
|
|
+ callback(result,progressBar);
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ }
|
|
|
+</script>
|
|
|
+</html>
|