Преглед изворни кода

第三项:一极两大三区可分配事项类别,完成

wanyuan пре 10 месеци
родитељ
комит
b2a825015b

+ 24 - 0
02-script/sql/v1.2_createTaskDeliverables.sql

@@ -0,0 +1,24 @@
+-- public.task_deliverables definition
+
+-- Drop table
+
+-- DROP TABLE public.task_deliverables;
+
+CREATE TABLE public.task_deliverables (
+	id int8 NOT NULL,
+	task_id int8 NOT NULL,
+	member_id int8 NULL,
+	title varchar NOT NULL,
+	template_id int8 NULL,
+	file_id int8 NULL,
+	create_user_id int8 NOT NULL,
+	create_time timestamp NOT NULL,
+	update_user_id int8 NULL,
+	update_time timestamp NULL,
+	status int4 NOT NULL DEFAULT 1,
+	reference_id int8 NULL,
+	CONSTRAINT task_deliverables_pk PRIMARY KEY (id)
+);
+
+INSERT INTO public.task_deliverables (id,task_id,member_id,title,template_id,file_id,create_user_id,create_time,update_user_id,update_time,status,reference_id) VALUES
+	 (-9110303016380514202,-479825051726099236,NULL,'交付物2',222,NULL,6514257066533602256,'2023-09-11 17:10:52.798',6514257066533602256,'2023-09-11 17:17:50.413',0,NULL);

+ 5 - 0
02-script/sql/v1.3_modifyTaskType.sql

@@ -0,0 +1,5 @@
+--增加字段:是否允许督办人员进行分配
+
+ALTER TABLE "public"."task_type" ADD COLUMN "can_share_task_type" int2 DEFAULT 0;
+
+COMMENT ON COLUMN "public"."task_type"."can_share_task_type" IS '是否允许督办人员进行分配';

+ 1 - 0
tc-service/tap-task/src/main/java/com/minto/app/task/beans/task_type.hbm.xml

@@ -100,6 +100,7 @@
         <property column="need_register_hide_phase" name="needRegisterHidePhase" not-null="false" type="java.lang.Integer"/>
         <property column="have_end_time_can_draft" name="haveEndTimeCanDraft" not-null="false" type="java.lang.Integer"/>
         <property column="show_org_tree" name="showOrgTree" not-null="false" type="java.lang.Integer"/>
+        <property column="can_share_task_type" name="canShareTaskType" not-null="false" type="java.lang.Integer"/>
         <property column="description" name="description" not-null="false" type="java.lang.String" length="2000" />
         <property column="specific_work" name="specificWork" not-null="true" type="java.lang.Integer"/>
         <property column="need_gather" name="needGather" not-null="true" type="java.lang.Integer"/>

+ 12 - 0
tc-service/tap-task/src/main/java/com/minto/app/task/manager/TaskByTypeManagerImpl.java

@@ -12227,6 +12227,9 @@ public class TaskByTypeManagerImpl implements ITaskByTypeManager{
                         case "sendVedio":
                             flag=BaseEnum.BooleanEnum.getBoolean(taskTypeBean.getNeedXiaoyuVideo());
                             break;
+                        case "shareTaskType":
+                            flag=BaseEnum.BooleanEnum.getBoolean(taskTypeBean.getCanShareTaskType());
+                            break;
                     }
                 }
             }
@@ -13222,6 +13225,15 @@ public class TaskByTypeManagerImpl implements ITaskByTypeManager{
         return null;
     }
 
+    @Override
+    public List<TaskTypeRelationBean> findTaskTypeRelByTaskId(Long taskId) throws BusinessException{
+        List<TaskTypeRelationBean> list = AppContext.getBean(ITaskTypeRelationDao.class).getTaskTypeRelations(taskId);
+        if(list == null){
+            list = new ArrayList<>();
+        }
+        return list;
+    }
+
     @Override
     public List<TaskTypeRelationBean> findTaskTypeRelByTypeId(Long typeId) throws BusinessException {
         List<TaskTypeRelationBean> list = AppContext.getBean(ITaskTypeRelationDao.class).getTaskTypeRelationsByTypeId(typeId);

+ 8 - 4
tc-service/tap-task/src/main/java/com/minto/app/task/manager/TaskListManagerImpl.java

@@ -101,7 +101,6 @@ import java.text.ParseException;
 import java.text.SimpleDateFormat;
 import java.util.*;
 import java.util.Map.Entry;
-import java.util.function.Function;
 import java.util.stream.Collectors;
 
 import static java.util.stream.Collectors.toList;
@@ -1359,6 +1358,7 @@ public class TaskListManagerImpl implements ITaskListManager {
 
 	/**
 	 * 组装事项数据
+	 *
 	 * @param pid
 	 * @param typeInfo
 	 * @param fromInfo
@@ -1366,6 +1366,7 @@ public class TaskListManagerImpl implements ITaskListManager {
 	 * @param mdIds
 	 * @param taskContents
 	 * @param cid
+	 * @param keyParam
 	 * @return
 	 * @throws ParseException
 	 */
@@ -1375,7 +1376,7 @@ public class TaskListManagerImpl implements ITaskListManager {
                                              Map<Long, Map<String,Object>> memberIdName,
                                              Collection<Long> mdIds,
                                              Map<Long, CommonContentBean> taskContents,
-                                             Long cid) throws BusinessException {
+                                             Long cid, Map<String, Object> keyParam) throws BusinessException {
 		Map<String,Object> data = new HashMap<>();
 
 		List<TaskMemberBean> memberBeans = taskListSummary.getTaskMembers();
@@ -1453,7 +1454,9 @@ public class TaskListManagerImpl implements ITaskListManager {
 		data.put("state", TaskEnum.TaskSummaryStateEnum.findDesByKey(summary.getTstate()));//状态
 		//移动端需要key,不需要文字 modify by huzy 2017/10/21 17:43
 		data.put("tstate", summary.getTstate());//状态
-		data.put("category",getKeyDes(summary.getTaskTypeId(),typeInfo));//事项类型
+		//事项类型
+		String currentTaskTypeId = ParameterUtil.getString(keyParam, "currentTaskTypeId");
+		data.put("category",getKeyDes(currentTaskTypeId,typeInfo));
 		data.put("from",getKeyDes(summary.getFromId(),fromInfo));//事项来源
 		data.put("startDate",summary.getStartDate());//开始时间
 		List<Map<String,Object>> participantNameList=(List<Map<String,Object>>)minfo.get(""+TaskMemberRelTypeEnum.Participant.getKey()).get("names");
@@ -2555,7 +2558,8 @@ public class TaskListManagerImpl implements ITaskListManager {
 				/** 青海处理事项的属性,标准产品没有进行注释*/
 				//data.put("typeOf710",taskBO.getSummaryBean().getTypeOf710());
 				/**封装承办单位等信息*/
-				data.putAll(getSummaryMap(taskListSummaryBO, pid, typeInfo, fromInfo, memberIdName, mdIds, commonContentBeanMap, cid));
+				data.putAll(getSummaryMap(taskListSummaryBO, pid, typeInfo, fromInfo, memberIdName, mdIds,
+						commonContentBeanMap, cid, keyParam));
 
 				//inspired 组装一个当前成员阶段汇报状态
 				Map<Long, Object> memberPhaseStateMap = pakTaskMemberPhaseState(taskId, managerMembers, reportConfigId);

+ 1 - 0
tc-service/tap-task/src/main/resources/META-INF/module/task/i18n/task_en.properties

@@ -506,6 +506,7 @@ task.allow.co.organizers.to.distribute=Whether to allow co-organizers to distrib
 task.allowed.to.postpone.the.approval=Whether the contractor is allowed to postpone the approval
 task.whether.it.is.a.key.task.type=Whether it is a key task type
 task.show.the.supervision.notice=Whether to show the supervision notice
+task.allow.superintendents.allocation=Whether to allow superintendents to be assigned
 task.whether.it.is.a.functional.target.section=Whether it is a functional target section
 task.need.a.co.organizer.plan=Do you need a co-organizer plan
 task.do.co.organizers.need.to.report=Do co-organizers need to report

+ 1 - 0
tc-service/tap-task/src/main/resources/META-INF/module/task/i18n/task_zh_CN.properties

@@ -507,6 +507,7 @@ task.allow.co.organizers.to.distribute=\u662F\u5426\u5141\u8BB8\u534F\u529E\u535
 task.allowed.to.postpone.the.approval=\u662F\u5426\u5141\u8BB8\u627F\u529E\uFF0C\u534F\u529E\u5355\u4F4D\u5EF6\u671F\u5BA1\u6279
 task.whether.it.is.a.key.task.type=\u662F\u5426\u5C5E\u4E8E\u91CD\u70B9\u4EFB\u52A1\u7C7B\u578B
 task.show.the.supervision.notice=\u662F\u5426\u663E\u793A\u7763\u529E\u901A\u77E5\u5355
+task.allow.superintendents.allocation=\u662F\u5426\u5141\u8BB8\u7763\u529E\u4EBA\u5458\u8FDB\u884C\u5206\u914D
 task.whether.it.is.a.functional.target.section=\u662F\u5426\u4E3A\u804C\u80FD\u76EE\u6807\u677F\u5757
 task.need.a.co.organizer.plan=\u662F\u5426\u9700\u8981\u534F\u529E\u5355\u4F4D\u8BA1\u5212
 task.do.co.organizers.need.to.report=\u662F\u5426\u9700\u8981\u534F\u529E\u5355\u4F4D\u6C47\u62A5

+ 7 - 5
tip-api/src/main/java/com/minto/app/task/beans/TaskTypeBean.java

@@ -251,7 +251,9 @@ public class TaskTypeBean extends BasePO {
 	//台账是否需要组织机构树
 	private Integer showOrgTree = BaseEnum.BooleanEnum.False.getKey();
 
-	private Integer canAllocation 	 = BaseEnum.BooleanEnum.False.getKey();//是否允许督办人员进行分配
+	//是否允许督办人员进行分配
+	private Integer canShareTaskType = BaseEnum.BooleanEnum.False.getKey();
+
 
 	public Integer getShowOrgTree() {
 		return showOrgTree;
@@ -1087,11 +1089,11 @@ public class TaskTypeBean extends BasePO {
 		this.needShowArchived = needShowArchived;
 	}
 
-	public Integer getCanAllocation(){
-		return canAllocation;
+	public Integer getCanShareTaskType(){
+		return canShareTaskType;
 	}
 
-	public void setCanAllocation(Integer canAllocation){
-		this.canAllocation = canAllocation;
+	public void setCanShareTaskType(Integer canShareTaskType){
+		this.canShareTaskType = canShareTaskType;
 	}
 }

+ 7 - 0
tip-api/src/main/java/com/minto/app/task/manager/ITaskByTypeManager.java

@@ -1219,6 +1219,13 @@ public interface ITaskByTypeManager {
     void addTaskTypeRel(List<TaskTypeRelationBean> taskTypeRels) throws BusinessException;
 
     TaskTypeRelationBean findTaskTypeRel(Long taskId) throws BusinessException;
+
+    /**
+     * 根据taskid查找TaskTypeRelationBean集合
+     * @param taskId
+     * @return
+     */
+    List<TaskTypeRelationBean> findTaskTypeRelByTaskId(Long taskId) throws BusinessException;
     
     /**
 	 * 根据type_id查询TaskTypeRelationBeans

+ 91 - 0
tip-front/src/main/java/com/minto/app/task/controller/TaskByTypeProcessController.java

@@ -2912,6 +2912,97 @@ public class TaskByTypeProcessController extends BaseController {
         return new ModelAndView(viewName,result);
     }
 
+    /**
+     * 分配任务类型
+     *
+     * @param request
+     * @param response
+     * @return
+     * @throws Exception
+     */
+    @RequestMapping(value = "/shareTaskType")
+    public ModelAndView shareTaskType(HttpServletRequest request, HttpServletResponse response) throws Exception{
+        Map<String, Object> result = new HashMap<String, Object>();
+        String viewName = "/tc_suite/taskmt/byType/shareTaskType.jsp";
+        try{
+            Long pid = AppContext.currentUserId();
+            Long cid = AppContext.currentLoginCorporation();
+            String idString = ReqUtil.getString(request, "ids");
+            if(StringUtil.isNotEmpty(idString)){
+                List<Long> idList = Arrays.asList(idString.split(",")).stream().map(Long::valueOf).collect(Collectors.toList());
+                List<TaskSummaryBean> beanByIds = taskManager.findTaskSummaryBeanByIds(idList);
+                result.put("beanByIds", JsonUtil.toJSONString(beanByIds));
+            }
+            result.put("taskIds", idString);
+            // 组织机构树
+            ITaskManager taskManager = AppContext.getBean(ITaskManager.class);
+            Long accountId = AppContext.currentLoginAccount();
+            List<TaskTypeBean> typeList = taskManager.findTaskTypes(cid, ResourceEnum.ResourceTypeEnum.Task.getKey(),
+                    TaskEnum.TaskTypeSub.Category.getKey(), accountId);
+            typeList.removeIf(taskTypeBean -> Objects.equals(taskTypeBean.getSubType(), TaskEnum.TaskTypeSub.Project.getKey()));
+            String typeJson = JsonUtil.toJSONString(typeList);
+            result.put("typeJson", typeJson);
+        } catch(Exception e){
+            log.error("分配任务类型页面加载错误:", e);
+        }
+        return new ModelAndView(viewName, result);
+    }
+
+    /**
+     * 保存分配任务类型
+     * @param request
+     * @param response
+     * @throws Exception
+     */
+    @RequestMapping(value = "/saveShareTaskType", method = RequestMethod.POST)
+    public void saveShareTaskType(HttpServletRequest request, HttpServletResponse response ) throws Exception {
+        Map<String, Object> result = new HashMap<String, Object>();
+        try {
+            Long pid = AppContext.currentUserId();
+            Long cid = AppContext.currentLoginCorporation();
+            User user = AppContext.getCurrentUser();
+            String taskIds = ReqUtil.getString(request,"taskId"); //任务id
+            String typeIds = ReqUtil.getString(request,"typeIds"); //分配的事项类型ids
+            Long deputyCountyId = ReqUtil.getLong(request,"deputyCountyId",null); //分管领导
+
+            List<Object> typeRelations = Lists.newArrayList();
+            if(StringUtil.isNotEmpty(taskIds)){
+                //每一个任务id都要分配所有的事项类型
+                String[] taskIdStr = taskIds.split(",");
+                for(String tid :taskIdStr){
+                    Long taskId = Long.valueOf(tid);
+                    List<TaskTypeRelationBean> taskTypeList = taskByTypeManager.findTaskTypeRelByTaskId(taskId);
+                    List<Long> listTypeIds = taskTypeList.stream().map(TaskTypeRelationBean::getTypeId).collect(Collectors.toList());
+
+                    if(StringUtil.isNotEmpty(typeIds)){
+                        String[] typeIdStr = typeIds.split(",") ;
+                        for(String typeId:typeIdStr){
+                            if(listTypeIds.contains(Long.valueOf(typeId))){ //如果已经存在关联关系就不加了
+                                continue;
+                            }
+                            //处理任务与类型的关联关系
+                            TaskTypeRelationBean typeRelationBean = new TaskTypeRelationBean();
+                            typeRelationBean.setId(UUIDUtil.UUIDLong());
+                            typeRelationBean.setTaskId(taskId);
+                            typeRelationBean.setTypeId(Long.valueOf(typeId));
+                            typeRelations.add(typeRelationBean);
+                        }
+                    }
+                }
+                taskManager.saveOrUpdateAll(typeRelations);
+            }
+
+
+            result.put("state","success");
+            result.put("message","任务类型分配成功!");
+        } catch (Exception e) {
+            log.error("分配事项类型错误:",e);
+            result.put("state","error");
+            result.put("message", "分配任务类型发送失败,请稍后重试。");
+        }
+        RespUtil.rendJson(response,result);
+    }
+
     /**
      * @author inspired (胡启林)
      * @param

+ 2 - 0
tip-front/src/main/java/com/minto/app/task/controller/TaskController.java

@@ -6343,6 +6343,7 @@ public class TaskController extends BaseController {
 
 
             Integer needShowNotice = ReqUtil.getInt(request, "needShowNotice", BaseEnum.BooleanEnum.False.getKey());
+            Integer canShareTaskType = ReqUtil.getInt(request, "canShareTaskType", BaseEnum.BooleanEnum.False.getKey());
 
             Integer needCollectWaite=ReqUtil.getInt(request,"needCollectWaite",BaseEnum.BooleanEnum.False.getKey());
 
@@ -6505,6 +6506,7 @@ public class TaskController extends BaseController {
                 taskType.setTerminatedTaskShow(terminatedTaskShow);
                 taskType.setIsKeyProject(iskeyProject);
                 taskType.setNeedShowNotice(needShowNotice);
+                taskType.setCanShareTaskType(canShareTaskType);
                 taskType.setNeedAssistToSign(needAssistToSign);
                 taskType.setNeedDefaultSign(needDefaultSign);
                 taskType.setSubTaskType(subTaskType);

+ 57 - 0
tip-front/src/main/webapp/tc_suite/minto/task/js/newListShow.js

@@ -188,6 +188,27 @@ var TaskSummaryListBusinessEnum = {
                     TaskSummaryListStatusEnum.Goal,
                 ]
             }]
+        },{
+            id:"shareTaskType",
+            name:"分配事项类型",//分配事项类型
+            serverCheck:true,
+            click:function(){
+                TC.task.table.invoke('shareTaskType',this);
+            },
+            scope:[{
+                type:[
+                    TaskSummaryListBusinessEnum.Supervise,
+                ],
+                status:[
+                    TaskSummaryListStatusEnum.All,
+                    TaskSummaryListStatusEnum.Draft,
+                    TaskSummaryListStatusEnum.Plan,
+                    TaskSummaryListStatusEnum.WaitSign,
+                    TaskSummaryListStatusEnum.Do,
+                    TaskSummaryListStatusEnum.UnReport,
+                    TaskSummaryListStatusEnum.Goal
+                ]
+            }]
         },{
             id:"",
             name:$.i18n("task.settle"),//办结
@@ -2233,6 +2254,42 @@ var TaskSummaryListBusinessEnum = {
                     cancel:function(){}
                 });
             },
+            // 分配事项类型
+            shareTaskType:function(type) {
+                var ids = TC.task.table.getTableChecked();
+                if (ids.length == 0){
+                    $.alert("请选中要分配任务类型的事项!");//"请选中要分配任务类型的事项!"
+                    return ;
+                }
+                $.dialog({
+                    title :"任务类型分配",//任务类型分配,
+                    max: false,
+                    min: false,
+                    content : "url:"+TC.config.baseUrl+"/taskByType/shareTaskType?ids="+ids,
+                    width: "1200px",
+                    height: "650px",
+                    lock : true,
+                    parent : this,
+                    button : [{
+                        "name":"确认",// "发送",
+                        callback:function(){
+                            var _this = this;
+                            this.content.window.sendShareTaskType(function(result,processBar){
+                                processBar.close();
+                                if (result.state=="success") {
+                                    $.ok(result.message);
+                                    _this.close();
+                                } else {
+                                    $.alert(result.message);
+                                }
+                            });
+                            return false;
+                        },
+                        focus:true
+                    }],
+                    cancel:function(){}
+                });
+            },
             // 视频会议
             sendVedio:function(type){
                 var ids = TC.task.table.getTableChecked();

+ 15 - 3
tip-front/src/main/webapp/tc_suite/task/taskTypeAdd.jsp

@@ -204,13 +204,13 @@
 
 
                     <tr style="${d}">
-                        <td>是否允许督办人员进行分配</td><!--是否允许督办人员进行分配-->
+                        <td>是否允许督办人员分配事项类型</td><!--是否允许督办人员分配事项类型-->
                         <td>
                             <label class="mt-radio">
-                                <input value="1" name="canAllocation" <c:if test="${taskType.canAllocation==1}">checked="checked"</c:if> type="radio">${tc:i18n("common.yes.label")}
+                                <input value="1" name="canShareTaskType" <c:if test="${taskType.canShareTaskType==1}">checked="checked"</c:if> type="radio">${tc:i18n("common.yes.label")}
                             </label>
                             <label class="mt-radio">
-                                <input value="0" name="canAllocation" <c:if test="${taskType.canAllocation==0 or empty taskType}">checked="checked"</c:if> type="radio">${tc:i18n("common.no.label")}
+                                <input value="0" name="canShareTaskType" <c:if test="${taskType.canShareTaskType==0 or empty taskType}">checked="checked"</c:if> type="radio">${tc:i18n("common.no.label")}
                             </label>
                         </td>
                     </tr>
@@ -612,6 +612,18 @@
                             </label>
                         </td>
                     </tr>
+                    <%-- 是否允许督办人员进行分配 --%>
+                    <tr style="${d}">
+                        <td>${tc:i18n("task.allow.superintendents.allocation")}</td><!--是否允许督办人员进行分配-->
+                        <td>
+                            <label class="mt-radio">
+                                <input value="1" name="canShareTaskType" <c:if test="${taskType.canShareTaskType==1}">checked="checked"</c:if> type="radio">${tc:i18n("common.yes.label")}
+                            </label>
+                            <label class="mt-radio">
+                                <input value="0" name="canShareTaskType" <c:if test="${taskType.canShareTaskType==0 or empty taskType}">checked="checked"</c:if> type="radio">${tc:i18n("common.no.label")}
+                            </label>
+                        </td>
+                    </tr>
 
 					<tr><td class="needPro" style="${d}" colspan="2">备用配置</td></tr>
 			

+ 257 - 0
tip-front/src/main/webapp/tc_suite/taskmt/byType/shareTaskType.jsp

@@ -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>