Merge branch 'apps_dev' of https://e.coding.net/yilidev/yilipalkaifa/apps into apps_dev

This commit is contained in:
3120626891@qq.com 2022-07-19 18:37:05 +08:00
commit 6830304a99
54 changed files with 14169 additions and 14169 deletions

View File

@ -3,7 +3,7 @@
<app xmlns="http://www.actionsoft.com.cn/app"> <app xmlns="http://www.actionsoft.com.cn/app">
<name>流程发布</name> <name>流程发布</name>
<version>1.0</version> <version>1.0</version>
<buildNo>49</buildNo> <buildNo>50</buildNo>
<developer id="776cca9a287c8b4d63b9cad216aa3859" tablePrefix="ACT" url="http://www.actionsoft.com.cn">北京炎黄盈动科技发展有限责任公司</developer> <developer id="776cca9a287c8b4d63b9cad216aa3859" tablePrefix="ACT" url="http://www.actionsoft.com.cn">北京炎黄盈动科技发展有限责任公司</developer>
<productId>2d48c93d3dc26d493c6735c962fc9df6</productId> <productId>2d48c93d3dc26d493c6735c962fc9df6</productId>
<categoryVisible>true</categoryVisible> <categoryVisible>true</categoryVisible>
@ -28,10 +28,10 @@
<uninstallListener/> <uninstallListener/>
<reloadable>true</reloadable> <reloadable>true</reloadable>
<requires> <requires>
<require appId="com.actionsoft.apps.coe.pal.cooperation" notActiveHandler="none" res="false"/> <require appId="com.actionsoft.apps.coe.pal.cooperation" notActiveHandler="none" res="false"/>
<require appId="com.actionsoft.apps.addons.xpages" notActiveHandler="none" res="false"/> <require appId="com.actionsoft.apps.addons.xpages" notActiveHandler="none" res="false"/>
<require appId="com.actionsoft.apps.notification" notActiveHandler="none" res="false"/> <require appId="com.actionsoft.apps.notification" notActiveHandler="none" res="false"/>
<require appId="com.actionsoft.apps.dict" notActiveHandler="warning" res="false"/> <require appId="com.actionsoft.apps.dict" notActiveHandler="warning" res="false"/>
</requires> </requires>
<depend versions="6.3,6.4,6.5" env="6.3.3">com.actionsoft.apps.coe.pal</depend> <depend versions="6.3,6.4,6.5" env="6.3.3">com.actionsoft.apps.coe.pal</depend>
<properties> <properties>

View File

@ -2,68 +2,68 @@
<!--AWS 字典描述文件,适用于6.0以上版本 \n--> <!--AWS 字典描述文件,适用于6.0以上版本 \n-->
<dictionary> <dictionary>
<id>8ce080c6-a411-4cae-81a1-8a04c076b901</id> <id>8ce080c6-a411-4cae-81a1-8a04c076b901</id>
<!--App分类--> <!--App分类-->
<categoryName>资产库周期管理</categoryName> <categoryName>资产库周期管理</categoryName>
<!--字典显示的标题--> <!--字典显示的标题-->
<title>L2流程列表</title> <title>L2流程列表</title>
<!--要显示的SQL记录 \n 1.where条件支持所有@命令 \n 2.这个SQL应该是一个完整的,经过调试的SQL,除@命令外 \n--> <!--要显示的SQL记录 \n 1.where条件支持所有@命令 \n 2.这个SQL应该是一个完整的,经过调试的SQL,除@命令外 \n-->
<data><![CDATA[select PROCESSCODE,PROCESSNAME from BO_ACT_PROCESSINFO where LEVEL='L2']]></data> <data><![CDATA[select PROCESSCODE,PROCESSNAME from BO_ACT_PROCESSINFO where LEVEL='L2']]></data>
<!--每页显示行数--> <!--每页显示行数-->
<page>10</page> <page>10</page>
<!--是否换行显示--> <!--是否换行显示-->
<wordWrap>false</wordWrap> <wordWrap>false</wordWrap>
<!--插入前保存表单--> <!--插入前保存表单-->
<saveForm>false</saveForm> <saveForm>false</saveForm>
<!--插入前非空校验--> <!--插入前非空校验-->
<checkNotNull>true</checkNotNull> <checkNotNull>true</checkNotNull>
<!--插入后非空提示--> <!--插入后非空提示-->
<aftersaveAlert>false</aftersaveAlert> <aftersaveAlert>false</aftersaveAlert>
<!--数据字典多选时是否显示已选中项--> <!--数据字典多选时是否显示已选中项-->
<showChoose>false</showChoose> <showChoose>false</showChoose>
<!--字典模型是否受管--> <!--字典模型是否受管-->
<managed>false</managed> <managed>false</managed>
<configParam><![CDATA[{}]]></configParam> <configParam><![CDATA[{}]]></configParam>
<!--管理员--> <!--管理员-->
<administrator>admin</administrator> <administrator>admin</administrator>
<!--创建人--> <!--创建人-->
<createUser>admin</createUser> <createUser>admin</createUser>
<!--参与显示的字段定义--> <!--参与显示的字段定义-->
<field> <field>
<!--字段名称--> <!--字段名称-->
<name>PROCESSCODE</name> <name>PROCESSCODE</name>
<!--该字段是否用来返回给父级窗口的控件,targetName为控件名--> <!--该字段是否用来返回给父级窗口的控件,targetName为控件名-->
<targetName>LEVEL_2_PROCESS_ID</targetName> <targetName>LEVEL_2_PROCESS_ID</targetName>
<nameType>文本</nameType> <nameType>文本</nameType>
<uicomponent>文本</uicomponent> <uicomponent>文本</uicomponent>
<!--列表显示的标题--> <!--列表显示的标题-->
<title>流程编码</title> <title>流程编码</title>
<!--列表显示宽度,支持象素单位和百分比宽度--> <!--列表显示宽度,支持象素单位和百分比宽度-->
<width>100</width> <width>100</width>
<!--是否该字段参与模糊检索,目前只允许为字符类型的字段支持模糊检索--> <!--是否该字段参与模糊检索,目前只允许为字符类型的字段支持模糊检索-->
<filter>false</filter> <filter>false</filter>
<exact>false</exact> <exact>false</exact>
<hidden>false</hidden> <hidden>false</hidden>
<!--DW查询条件的searchID数据字典时回填策略需要targetName+DWID组合来进行回填--> <!--DW查询条件的searchID数据字典时回填策略需要targetName+DWID组合来进行回填-->
</field> </field>
<field> <field>
<!--字段名称--> <!--字段名称-->
<name>PROCESSNAME</name> <name>PROCESSNAME</name>
<!--该字段是否用来返回给父级窗口的控件,targetName为控件名--> <!--该字段是否用来返回给父级窗口的控件,targetName为控件名-->
<targetName>LEVEL_2_PROCESS_NAME</targetName> <targetName>LEVEL_2_PROCESS_NAME</targetName>
<nameType>文本</nameType> <nameType>文本</nameType>
<uicomponent>文本</uicomponent> <uicomponent>文本</uicomponent>
<!--列表显示的标题--> <!--列表显示的标题-->
<title>流程名称</title> <title>流程名称</title>
<!--列表显示宽度,支持象素单位和百分比宽度--> <!--列表显示宽度,支持象素单位和百分比宽度-->
<width>100</width> <width>100</width>
<!--是否该字段参与模糊检索,目前只允许为字符类型的字段支持模糊检索--> <!--是否该字段参与模糊检索,目前只允许为字符类型的字段支持模糊检索-->
<filter>false</filter> <filter>false</filter>
<exact>false</exact> <exact>false</exact>
<hidden>false</hidden> <hidden>false</hidden>
<!--DW查询条件的searchID数据字典时回填策略需要targetName+DWID组合来进行回填--> <!--DW查询条件的searchID数据字典时回填策略需要targetName+DWID组合来进行回填-->
</field> </field>
<!--连接数据源--> <!--连接数据源-->
<dataAdapter class="com.actionsoft.bpms.commons.dictionary.core.datasource.local.AWSDBData"/> <dataAdapter class="com.actionsoft.bpms.commons.dictionary.core.datasource.local.AWSDBData"/>
</dictionary> </dictionary>
<!--AWS 字典描述UUID--> <!--AWS 字典描述UUID-->

View File

@ -2,68 +2,68 @@
<!--AWS 字典描述文件,适用于6.0以上版本 \n--> <!--AWS 字典描述文件,适用于6.0以上版本 \n-->
<dictionary> <dictionary>
<id>8baf0fb9-d239-488e-b1ce-c284e892c6fb</id> <id>8baf0fb9-d239-488e-b1ce-c284e892c6fb</id>
<!--App分类--> <!--App分类-->
<categoryName>资产库周期管理</categoryName> <categoryName>资产库周期管理</categoryName>
<!--字典显示的标题--> <!--字典显示的标题-->
<title>L1流程列表</title> <title>L1流程列表</title>
<!--要显示的SQL记录 \n 1.where条件支持所有@命令 \n 2.这个SQL应该是一个完整的,经过调试的SQL,除@命令外 \n--> <!--要显示的SQL记录 \n 1.where条件支持所有@命令 \n 2.这个SQL应该是一个完整的,经过调试的SQL,除@命令外 \n-->
<data><![CDATA[select PROCESSCODE,PROCESSNAME from BO_ACT_PROCESSINFO where LEVEL='L1']]></data> <data><![CDATA[select PROCESSCODE,PROCESSNAME from BO_ACT_PROCESSINFO where LEVEL='L1']]></data>
<!--每页显示行数--> <!--每页显示行数-->
<page>10</page> <page>10</page>
<!--是否换行显示--> <!--是否换行显示-->
<wordWrap>false</wordWrap> <wordWrap>false</wordWrap>
<!--插入前保存表单--> <!--插入前保存表单-->
<saveForm>false</saveForm> <saveForm>false</saveForm>
<!--插入前非空校验--> <!--插入前非空校验-->
<checkNotNull>true</checkNotNull> <checkNotNull>true</checkNotNull>
<!--插入后非空提示--> <!--插入后非空提示-->
<aftersaveAlert>false</aftersaveAlert> <aftersaveAlert>false</aftersaveAlert>
<!--数据字典多选时是否显示已选中项--> <!--数据字典多选时是否显示已选中项-->
<showChoose>false</showChoose> <showChoose>false</showChoose>
<!--字典模型是否受管--> <!--字典模型是否受管-->
<managed>false</managed> <managed>false</managed>
<configParam><![CDATA[{}]]></configParam> <configParam><![CDATA[{}]]></configParam>
<!--管理员--> <!--管理员-->
<administrator>admin</administrator> <administrator>admin</administrator>
<!--创建人--> <!--创建人-->
<createUser>admin</createUser> <createUser>admin</createUser>
<!--参与显示的字段定义--> <!--参与显示的字段定义-->
<field> <field>
<!--字段名称--> <!--字段名称-->
<name>PROCESSCODE</name> <name>PROCESSCODE</name>
<!--该字段是否用来返回给父级窗口的控件,targetName为控件名--> <!--该字段是否用来返回给父级窗口的控件,targetName为控件名-->
<targetName>LEVEL_1_PROCESS_ID</targetName> <targetName>LEVEL_1_PROCESS_ID</targetName>
<nameType>文本</nameType> <nameType>文本</nameType>
<uicomponent>文本</uicomponent> <uicomponent>文本</uicomponent>
<!--列表显示的标题--> <!--列表显示的标题-->
<title>流程编码</title> <title>流程编码</title>
<!--列表显示宽度,支持象素单位和百分比宽度--> <!--列表显示宽度,支持象素单位和百分比宽度-->
<width>100</width> <width>100</width>
<!--是否该字段参与模糊检索,目前只允许为字符类型的字段支持模糊检索--> <!--是否该字段参与模糊检索,目前只允许为字符类型的字段支持模糊检索-->
<filter>false</filter> <filter>false</filter>
<exact>false</exact> <exact>false</exact>
<hidden>false</hidden> <hidden>false</hidden>
<!--DW查询条件的searchID数据字典时回填策略需要targetName+DWID组合来进行回填--> <!--DW查询条件的searchID数据字典时回填策略需要targetName+DWID组合来进行回填-->
</field> </field>
<field> <field>
<!--字段名称--> <!--字段名称-->
<name>PROCESSNAME</name> <name>PROCESSNAME</name>
<!--该字段是否用来返回给父级窗口的控件,targetName为控件名--> <!--该字段是否用来返回给父级窗口的控件,targetName为控件名-->
<targetName>LEVEL_1_PROCESS_NAME</targetName> <targetName>LEVEL_1_PROCESS_NAME</targetName>
<nameType>文本</nameType> <nameType>文本</nameType>
<uicomponent>文本</uicomponent> <uicomponent>文本</uicomponent>
<!--列表显示的标题--> <!--列表显示的标题-->
<title>流程名称</title> <title>流程名称</title>
<!--列表显示宽度,支持象素单位和百分比宽度--> <!--列表显示宽度,支持象素单位和百分比宽度-->
<width>100</width> <width>100</width>
<!--是否该字段参与模糊检索,目前只允许为字符类型的字段支持模糊检索--> <!--是否该字段参与模糊检索,目前只允许为字符类型的字段支持模糊检索-->
<filter>false</filter> <filter>false</filter>
<exact>false</exact> <exact>false</exact>
<hidden>false</hidden> <hidden>false</hidden>
<!--DW查询条件的searchID数据字典时回填策略需要targetName+DWID组合来进行回填--> <!--DW查询条件的searchID数据字典时回填策略需要targetName+DWID组合来进行回填-->
</field> </field>
<!--连接数据源--> <!--连接数据源-->
<dataAdapter class="com.actionsoft.bpms.commons.dictionary.core.datasource.local.AWSDBData"/> <dataAdapter class="com.actionsoft.bpms.commons.dictionary.core.datasource.local.AWSDBData"/>
</dictionary> </dictionary>
<!--AWS 字典描述UUID--> <!--AWS 字典描述UUID-->

View File

@ -2,68 +2,68 @@
<!--AWS 字典描述文件,适用于6.0以上版本 \n--> <!--AWS 字典描述文件,适用于6.0以上版本 \n-->
<dictionary> <dictionary>
<id>765921e7-2abb-4780-a68e-4cfbf940a41f</id> <id>765921e7-2abb-4780-a68e-4cfbf940a41f</id>
<!--App分类--> <!--App分类-->
<categoryName>资产库周期管理</categoryName> <categoryName>资产库周期管理</categoryName>
<!--字典显示的标题--> <!--字典显示的标题-->
<title>L3流程列表</title> <title>L3流程列表</title>
<!--要显示的SQL记录 \n 1.where条件支持所有@命令 \n 2.这个SQL应该是一个完整的,经过调试的SQL,除@命令外 \n--> <!--要显示的SQL记录 \n 1.where条件支持所有@命令 \n 2.这个SQL应该是一个完整的,经过调试的SQL,除@命令外 \n-->
<data><![CDATA[select PROCESSCODE,PROCESSNAME from BO_ACT_PROCESSINFO where LEVEL='L3']]></data> <data><![CDATA[select PROCESSCODE,PROCESSNAME from BO_ACT_PROCESSINFO where LEVEL='L3']]></data>
<!--每页显示行数--> <!--每页显示行数-->
<page>10</page> <page>10</page>
<!--是否换行显示--> <!--是否换行显示-->
<wordWrap>false</wordWrap> <wordWrap>false</wordWrap>
<!--插入前保存表单--> <!--插入前保存表单-->
<saveForm>false</saveForm> <saveForm>false</saveForm>
<!--插入前非空校验--> <!--插入前非空校验-->
<checkNotNull>true</checkNotNull> <checkNotNull>true</checkNotNull>
<!--插入后非空提示--> <!--插入后非空提示-->
<aftersaveAlert>false</aftersaveAlert> <aftersaveAlert>false</aftersaveAlert>
<!--数据字典多选时是否显示已选中项--> <!--数据字典多选时是否显示已选中项-->
<showChoose>false</showChoose> <showChoose>false</showChoose>
<!--字典模型是否受管--> <!--字典模型是否受管-->
<managed>false</managed> <managed>false</managed>
<configParam><![CDATA[{}]]></configParam> <configParam><![CDATA[{}]]></configParam>
<!--管理员--> <!--管理员-->
<administrator>admin</administrator> <administrator>admin</administrator>
<!--创建人--> <!--创建人-->
<createUser>admin</createUser> <createUser>admin</createUser>
<!--参与显示的字段定义--> <!--参与显示的字段定义-->
<field> <field>
<!--字段名称--> <!--字段名称-->
<name>PROCESSCODE</name> <name>PROCESSCODE</name>
<!--该字段是否用来返回给父级窗口的控件,targetName为控件名--> <!--该字段是否用来返回给父级窗口的控件,targetName为控件名-->
<targetName>LEVEL_3_PROCESS_ID</targetName> <targetName>LEVEL_3_PROCESS_ID</targetName>
<nameType>文本</nameType> <nameType>文本</nameType>
<uicomponent>文本</uicomponent> <uicomponent>文本</uicomponent>
<!--列表显示的标题--> <!--列表显示的标题-->
<title>流程编码</title> <title>流程编码</title>
<!--列表显示宽度,支持象素单位和百分比宽度--> <!--列表显示宽度,支持象素单位和百分比宽度-->
<width>100</width> <width>100</width>
<!--是否该字段参与模糊检索,目前只允许为字符类型的字段支持模糊检索--> <!--是否该字段参与模糊检索,目前只允许为字符类型的字段支持模糊检索-->
<filter>false</filter> <filter>false</filter>
<exact>false</exact> <exact>false</exact>
<hidden>false</hidden> <hidden>false</hidden>
<!--DW查询条件的searchID数据字典时回填策略需要targetName+DWID组合来进行回填--> <!--DW查询条件的searchID数据字典时回填策略需要targetName+DWID组合来进行回填-->
</field> </field>
<field> <field>
<!--字段名称--> <!--字段名称-->
<name>PROCESSNAME</name> <name>PROCESSNAME</name>
<!--该字段是否用来返回给父级窗口的控件,targetName为控件名--> <!--该字段是否用来返回给父级窗口的控件,targetName为控件名-->
<targetName>LEVEL_3_PROCESS_NAME</targetName> <targetName>LEVEL_3_PROCESS_NAME</targetName>
<nameType>文本</nameType> <nameType>文本</nameType>
<uicomponent>文本</uicomponent> <uicomponent>文本</uicomponent>
<!--列表显示的标题--> <!--列表显示的标题-->
<title>流程名称</title> <title>流程名称</title>
<!--列表显示宽度,支持象素单位和百分比宽度--> <!--列表显示宽度,支持象素单位和百分比宽度-->
<width>100</width> <width>100</width>
<!--是否该字段参与模糊检索,目前只允许为字符类型的字段支持模糊检索--> <!--是否该字段参与模糊检索,目前只允许为字符类型的字段支持模糊检索-->
<filter>false</filter> <filter>false</filter>
<exact>false</exact> <exact>false</exact>
<hidden>false</hidden> <hidden>false</hidden>
<!--DW查询条件的searchID数据字典时回填策略需要targetName+DWID组合来进行回填--> <!--DW查询条件的searchID数据字典时回填策略需要targetName+DWID组合来进行回填-->
</field> </field>
<!--连接数据源--> <!--连接数据源-->
<dataAdapter class="com.actionsoft.bpms.commons.dictionary.core.datasource.local.AWSDBData"/> <dataAdapter class="com.actionsoft.bpms.commons.dictionary.core.datasource.local.AWSDBData"/>
</dictionary> </dictionary>
<!--AWS 字典描述UUID--> <!--AWS 字典描述UUID-->

View File

@ -2,15 +2,15 @@
<!--AWS 字典描述文件,适用于3.0以上版本--> <!--AWS 字典描述文件,适用于3.0以上版本-->
<dictionary> <dictionary>
<id>0dbcd2ef-52f6-4879-a04b-13c93e1e0913</id> <id>0dbcd2ef-52f6-4879-a04b-13c93e1e0913</id>
<!--app分类--> <!--app分类-->
<!--字典显示的标题--> <!--字典显示的标题-->
<!--要显示的SQL记录 <!--要显示的SQL记录
1.where条件支持所有@命令,@命令与其他SQL字符串连接使用+,参见+语法 1.where条件支持所有@命令,@命令与其他SQL字符串连接使用+,参见+语法
2.这个SQL应该是一个完整的,经过调试的SQL,除@命令外 2.这个SQL应该是一个完整的,经过调试的SQL,除@命令外
--> -->
<!--每页显示行数--> <!--每页显示行数-->
<page>10</page> <page>10</page>
<!--连接数据源--> <!--连接数据源-->
</dictionary> </dictionary>
<!--AWS 字典描述UUID--> <!--AWS 字典描述UUID-->

View File

@ -20,321 +20,321 @@ import com.actionsoft.bpms.server.conf.server.AWSServerConf;
import com.actionsoft.bpms.util.DBSql; import com.actionsoft.bpms.util.DBSql;
public class PublisherClientDao { public class PublisherClientDao {
/** /**
* 获取模型关联的模型Id * 获取模型关联的模型Id
* *
* @param id * @param id
* @return * @return
* @author zhangming * @author zhangming
*/ */
public List<Map<String, String>> getFileIdsByRelationFileId(String id) { public List<Map<String, String>> getFileIdsByRelationFileId(String id) {
String sql = "SELECT DISTINCT(r.FILEID), pal.PLNAME, MODIFYDATE FROM APP_ACT_COE_PAL_SHAPE_RLAT r, APP_ACT_COE_PAL_REPOSITORY pal WHERE r.RELATIONFILEID in (" + id + ") AND r.FILEID = pal.ID AND pal.PLCATEGORY='process' ORDER BY MODIFYDATE DESC"; String sql = "SELECT DISTINCT(r.FILEID), pal.PLNAME, MODIFYDATE FROM APP_ACT_COE_PAL_SHAPE_RLAT r, APP_ACT_COE_PAL_REPOSITORY pal WHERE r.RELATIONFILEID in (" + id + ") AND r.FILEID = pal.ID AND pal.PLCATEGORY='process' ORDER BY MODIFYDATE DESC";
List<Map<String, String>> list = DBSql.query(sql, new RowMapper<Map<String, String>>() { List<Map<String, String>> list = DBSql.query(sql, new RowMapper<Map<String, String>>() {
@Override @Override
public Map<String, String> mapRow(ResultSet rs, int arg1) throws SQLException { public Map<String, String> mapRow(ResultSet rs, int arg1) throws SQLException {
Map<String, String> map = new HashMap<String, String>(); Map<String, String> map = new HashMap<String, String>();
map.put("id", rs.getString(1)); map.put("id", rs.getString(1));
map.put("name", rs.getString(2)); map.put("name", rs.getString(2));
return map; return map;
} }
}); });
return list; return list;
} }
/**
* 获取模型关联的模型Id(只有文件属性关联)
*
* @param id
* @return
* @author zhangming
*/
public List<Map<String, String>> getFileIdsByRelationFileId1(String id) {
String sql = "SELECT DISTINCT(r.FILEID), pal.PLNAME, MODIFYDATE FROM APP_ACT_COE_PAL_SHAPE_RLAT r, APP_ACT_COE_PAL_REPOSITORY pal WHERE r.RELATIONFILEID in (" + id + ") AND r.FILEID = pal.ID AND r.SHAPEID='' AND pal.PLCATEGORY='process' ORDER BY MODIFYDATE DESC";
List<Map<String, String>> list = DBSql.query(sql, new RowMapper<Map<String, String>>() {
@Override
public Map<String, String> mapRow(ResultSet rs, int arg1) throws SQLException {
Map<String, String> map = new HashMap<String, String>();
map.put("id", rs.getString(1));
map.put("name", rs.getString(2));
return map;
}
});
return list;
}
/**
* 获取管理标准技术标准和工作标准的Id
*
* @return
* @author zhangming
*/
public Map<String, String> getControlPolicyId(String wsId) {
Map<String, String> resultMap = new HashMap<String, String>();
String sql = "SELECT ID, PLNAME FROM APP_ACT_COE_PAL_REPOSITORY WHERE PLNAME IN (?,?,?) AND WSID=? AND PLMETHODID='control.policy'";
List<Map<String, String>> listMap = DBSql.query(sql, new RowMapper<Map<String, String>>() {
@Override
public Map<String, String> mapRow(ResultSet rs, int arg1) throws SQLException {
Map<String, String> map = new HashMap<String, String>();
map.put(rs.getString(2), rs.getString(1));
return map;
}
}, new Object[]{PublisherConstant.ORG_RELATION_MANAGEMENT_STANDARD, PublisherConstant.ORG_RELATION_TECHNICAL_STANDARD, PublisherConstant.ORG_RELATION_WORK_STANDARD, wsId});
for (Map<String, String> map : listMap) {
Set<String> set = map.keySet();
for (String key : set) {
resultMap.put(key, map.get(key));
}
}
return resultMap;
}
/**
* 获取某个范围内的关联模型Id
*
* @param relationFileIds
* @return
* @author zhangming
*/
public List<Map<String, String>> getFileIdsByRelation(String relationFileIds) {
if (relationFileIds == null || "".equals(relationFileIds)) {
return new ArrayList<Map<String, String>>();
}
String sql = "SELECT pal.ID, pal.PLNAME, p.PUBLISHDATE FROM APP_ACT_COE_PAL_REPOSITORY pal, ("
+ " SELECT r.FILEID, MAX(p.PUBLISHDATE) PUBLISHDATE"
+ " FROM APP_ACT_COE_PAL_SHAPE_RLAT r, APP_ACT_COE_PAL_PUBLISH p, APP_ACT_COE_PAL_PUBLISH_LIST pl"
+ " WHERE r.FILEID = pl.PALREPOSITORYID AND r.RELATIONFILEID IN (" + relationFileIds + ") AND p.ID=pl.PID AND pl.ACTIONTYPE='N'"
+ " GROUP BY r.FILEID) p"
+ " WHERE pal.ID = p.FILEID and pal.ISPUBLISH=1"
+ " ORDER BY p.PUBLISHDATE DESC";
List<Map<String, String>> list = DBSql.query(sql, new RowMapper<Map<String, String>>() {
@Override
public Map<String, String> mapRow(ResultSet rs, int arg1) throws SQLException {
Map<String, String> map = new HashMap<String, String>();
if (rs.getString(1) == null) {
return null;
}
map.put("id", rs.getString(1));
map.put("name", rs.getString(2));
Timestamp publishDate = rs.getTimestamp(3);
DateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
map.put("publishDate", sdf.format(publishDate));
return map;
}
});
return list;
}
/**
* 获取某个范围内的关联模型Id(只有文件属性关联)
*
* @param relationFileIds
* @return
* @author zhangming
*/
public List<Map<String, String>> getFileIdsByRelation1(String relationFileIds) {
if (relationFileIds == null || "".equals(relationFileIds)) {
return new ArrayList<Map<String, String>>();
}
String sql = "SELECT pal.ID, pal.PLNAME, p.PUBLISHDATE FROM APP_ACT_COE_PAL_REPOSITORY pal, ("
+ " SELECT r.FILEID, MAX(p.PUBLISHDATE) PUBLISHDATE"
+ " FROM APP_ACT_COE_PAL_SHAPE_RLAT r, APP_ACT_COE_PAL_PUBLISH p, APP_ACT_COE_PAL_PUBLISH_LIST pl"
+ " WHERE r.FILEID = pl.PALREPOSITORYID AND r.RELATIONFILEID IN (" + relationFileIds + ") AND r.SHAPEID='' AND p.ID=pl.PID AND pl.ACTIONTYPE='N'"
+ " GROUP BY r.FILEID) p"
+ " WHERE pal.ID = p.FILEID and pal.ISPUBLISH=1"
+ " ORDER BY p.PUBLISHDATE DESC";
List<Map<String, String>> list = DBSql.query(sql, new RowMapper<Map<String, String>>() {
@Override
public Map<String, String> mapRow(ResultSet rs, int arg1) throws SQLException {
Map<String, String> map = new HashMap<String, String>();
if (rs.getString(1) == null) {
return null;
}
map.put("id", rs.getString(1));
map.put("name", rs.getString(2));
Timestamp publishDate = rs.getTimestamp(3);
DateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
map.put("publishDate", sdf.format(publishDate));
return map;
}
});
return list;
}
/**
* 获取某个范围内的被关联模型Id
*
* @param fileIds
* @param relationFileIds
* @return
* @author zhangming
*/
public List<Map<String, String>> getRelationFileIds(String fileIds, String relationFileIds) {
if (fileIds == null || "".equals(fileIds) || relationFileIds == null || "".equals(relationFileIds)) {
return new ArrayList<Map<String, String>>();
}
String sql = "SELECT pal.ID, pal.PLNAME, p.PUBLISHDATE from APP_ACT_COE_PAL_REPOSITORY pal, ("
+ " SELECT r.RELATIONFILEID, MAX(p.PUBLISHDATE) PUBLISHDATE"
+ " FROM APP_ACT_COE_PAL_SHAPE_RLAT r, APP_ACT_COE_PAL_PUBLISH p, APP_ACT_COE_PAL_PUBLISH_LIST pl"
+ " WHERE r.RELATIONFILEID = pl.PALREPOSITORYID AND r.FILEID IN (" + fileIds + ") AND r.RELATIONFILEID IN (" + relationFileIds + ") AND p.ID=pl.PID AND pl.ACTIONTYPE='N'"
+ " GROUP BY r.RELATIONFILEID) p"
+ " WHERE pal.ID=p.RELATIONFILEID and pal.ISPUBLISH=1"
+ " ORDER BY p.PUBLISHDATE DESC";
List<Map<String, String>> list = DBSql.query(sql, new RowMapper<Map<String, String>>() {
@Override
public Map<String, String> mapRow(ResultSet rs, int arg1) throws SQLException {
Map<String, String> map = new HashMap<String, String>();
if (rs.getString(1) == null) {
return null;
}
map.put("id", rs.getString(1));
map.put("name", rs.getString(2));
Timestamp publishDate = rs.getTimestamp(3);
DateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
map.put("publishDate", sdf.format(publishDate));
return map;
}
});
return list;
}
/**
* 发布历史
*
* @param ids
* @return
* @author zhangming
*/
public List<Map<String, String>> getPublishListData(String ids, String category, String wsId, String methodId) {
if (ids == null || "".equals(ids)) {
return new ArrayList<Map<String, String>>();
}
String sql = "SELECT r.ID, r.PLNAME, p.PUBLISHDATE from APP_ACT_COE_PAL_REPOSITORY r, ("
+ " SELECT pl.PALREPOSITORYID, MAX(p.PUBLISHDATE) publishdate "
+ " FROM APP_ACT_COE_PAL_PUBLISH p, APP_ACT_COE_PAL_PUBLISH_LIST pl"
+ " WHERE p.ID=pl.PID AND pl.PALREPOSITORYID IN (" + ids + ")"
+ " GROUP BY pl.PALREPOSITORYID ) p"
+ " WHERE r.ID = p.PALREPOSITORYID AND r.PLCATEGORY='" + category + "' AND r.PLMETHODID <> 'default' AND r.WSID='" + wsId + "'";
if (methodId != null && !"".equals(methodId)) {
sql += " AND r.PLMETHODID='" + methodId + "'";
}
sql += " ORDER BY p.PUBLISHDATE DESC";
List<Map<String, String>> list = DBSql.query(sql, new RowMapper<Map<String, String>>() {
@Override
public Map<String, String> mapRow(ResultSet rs, int arg1) throws SQLException {
Map<String, String> map = new HashMap<String, String>();
if (rs.getString(1) == null) {
return null;
}
map.put("id", rs.getString(1));
map.put("name", rs.getString(2));
Timestamp publishDate = rs.getTimestamp(3);
DateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
map.put("publishDate", sdf.format(publishDate));
return map;
}
});
return list;
}
/**
* 根据name获取未发布的流程文件
* @param name
* @param wsId
* @param methodId
* @return
*/
public List<PALRepositoryModel> getCoeProcessLevelByNamen(String name, String wsId, String methodId) {
String namelike = "";
if (StringUtil.containSpecialChar(name)) {
namelike = "'%" + StringUtil.replaceSqlStr(name, AWSServerConf.isMySQL()) + "%'" + (AWSServerConf.isMySQL() ? "ESCAPE '\\\\'" : " ESCAPE '\\'");
} else {
namelike = "'%" + name + "%'";
}
StringBuilder sql = new StringBuilder("select * from " + PALRepositoryModelImpl.DATABASE_ENTITY + " where " + PALRepositoryModelImpl.FIELD_WS_ID + "='" + wsId + "' and " + PALRepositoryModelImpl.FIELD_PL_NAME + " like " + namelike + " and ISPUBLISH = '0'");
if (methodId != null && !"".equals(methodId)) {
sql.append(" and PLMETHODID = '" + methodId + "' ");
}
sql.append(" ORDER BY " + PALRepositoryModelImpl.FIELD_PL_ORDERINDEX + " ASC");
return DBSql.query(sql.toString(), new PALRespositoryModelMapper());
}
/**
* 根据name获取有多个版本的流程文件
* @param name
* @param wsId
* @param methodId
* @return
*/
public List<PALRepositoryModel> getCoeProcessLevelByNamec(String name, String wsId, String methodId) {
String namelike = "";
if (StringUtil.containSpecialChar(name)) {
namelike = "'%" + StringUtil.replaceSqlStr(name, AWSServerConf.isMySQL()) + "%'" + (AWSServerConf.isMySQL() ? "ESCAPE '\\\\'" : " ESCAPE '\\'");
} else {
namelike = "'%" + name + "%'";
}
StringBuilder sql = new StringBuilder("select * from " + PALRepositoryModelImpl.DATABASE_ENTITY + " where " + PALRepositoryModelImpl.FIELD_WS_ID + "='" + wsId + "' and " + PALRepositoryModelImpl.FIELD_PL_NAME + " like " + namelike + " and ISPUBLISH = '1'");
String sqlcount = "select count(*) from " + PALRepositoryModelImpl.DATABASE_ENTITY + " where " + PALRepositoryModelImpl.FIELD_WS_ID + "='" + wsId + "' and " + PALRepositoryModelImpl.FIELD_PL_NAME + " like " + namelike + "";
/** if (methodId != null && !"".equals(methodId)) {
* 获取模型关联的模型Id(只有文件属性关联) sql.append(" and PLMETHODID = '" + methodId + "' ");
* }
* @param id sql.append(" ORDER BY " + PALRepositoryModelImpl.FIELD_PL_ORDERINDEX + " ASC");
* @return sqlcount+=" ORDER BY " + PALRepositoryModelImpl.FIELD_PL_ORDERINDEX + " ASC";
* @author zhangming String num = DBSql.getString(sqlcount);
*/ int number = Integer.parseInt(num);
public List<Map<String, String>> getFileIdsByRelationFileId1(String id) { if(number <= 1) {
String sql = "SELECT DISTINCT(r.FILEID), pal.PLNAME, MODIFYDATE FROM APP_ACT_COE_PAL_SHAPE_RLAT r, APP_ACT_COE_PAL_REPOSITORY pal WHERE r.RELATIONFILEID in (" + id + ") AND r.FILEID = pal.ID AND r.SHAPEID='' AND pal.PLCATEGORY='process' ORDER BY MODIFYDATE DESC"; List<PALRepositoryModel> data = null;
List<Map<String, String>> list = DBSql.query(sql, new RowMapper<Map<String, String>>() { return data;
@Override }
public Map<String, String> mapRow(ResultSet rs, int arg1) throws SQLException { return DBSql.query(sql.toString(), new PALRespositoryModelMapper());
Map<String, String> map = new HashMap<String, String>(); }
map.put("id", rs.getString(1)); /**
map.put("name", rs.getString(2)); * 根据name获取停用的流程文件
return map; * @param name
} * @param wsId
}); * @param category
return list; * @return
} */
public List<PALRepositoryModel> getCoeProcessLevelByNameAndCategorys(String name, String wsId, String category) {
String namelike = "";
if (StringUtil.containSpecialChar(name)) {
namelike = "'%" + StringUtil.replaceSqlStr(name, AWSServerConf.isMySQL()) + "%'" + (AWSServerConf.isMySQL() ? "ESCAPE '\\\\'" : " ESCAPE '\\'");
} else {
namelike = "'%" + name + "%'";
}
StringBuilder sql = new StringBuilder("select * from " + PALRepositoryModelImpl.DATABASE_ENTITY + " where " + PALRepositoryModelImpl.FIELD_WS_ID + "='" + wsId + "' and " + PALRepositoryModelImpl.FIELD_PL_NAME + " like " + namelike + " and " + PALRepositoryModelImpl.FIELD_IS_USE + "='1' and ISPUBLISH = '1'");
/** if (category != null && !"".equals(category)) {
* 获取管理标准技术标准和工作标准的Id sql.append(" and PLCATEGORY = '" + category + "' ");
* }
* @return sql.append(" ORDER BY " + PALRepositoryModelImpl.FIELD_PL_ORDERINDEX + " ASC");
* @author zhangming return DBSql.query(sql.toString(), new PALRespositoryModelMapper());
*/ }
public Map<String, String> getControlPolicyId(String wsId) { private class PALRespositoryModelMapper implements RowMapper<PALRepositoryModel> {
Map<String, String> resultMap = new HashMap<String, String>(); PALRepository pal = new PALRepository();
String sql = "SELECT ID, PLNAME FROM APP_ACT_COE_PAL_REPOSITORY WHERE PLNAME IN (?,?,?) AND WSID=? AND PLMETHODID='control.policy'"; public PALRepositoryModel mapRow(ResultSet rs, int arg1) throws SQLException {
List<Map<String, String>> listMap = DBSql.query(sql, new RowMapper<Map<String, String>>() { return (PALRepositoryModel) pal.record2Model(rs);
@Override }
public Map<String, String> mapRow(ResultSet rs, int arg1) throws SQLException { }
Map<String, String> map = new HashMap<String, String>(); /**
map.put(rs.getString(2), rs.getString(1)); * 根据userId获取资源Id列表
return map; * @param userId
} * @return
}, new Object[]{PublisherConstant.ORG_RELATION_MANAGEMENT_STANDARD, PublisherConstant.ORG_RELATION_TECHNICAL_STANDARD, PublisherConstant.ORG_RELATION_WORK_STANDARD, wsId}); */
for (Map<String, String> map : listMap) { public List<String> getTeamUserPerms(String userId) {
Set<String> set = map.keySet(); String sql = " select distinct perm.RESOURCEID from APP_ACT_NETWORK_TEAM_MEMBER tm , APP_ACT_COE_TEAM_PERM perm " +
for (String key : set) { "where tm.TEAMID=perm.TEAMID and tm.MEMBERSTATUS='1' and tm.USERID=? ";
resultMap.put(key, map.get(key)); List<String> resourceIdList = DBSql.query(sql.toString(), new RowMapper<String>() {
} @Override
} public String mapRow(ResultSet rs, int arg1) throws SQLException {
return resultMap; return rs.getString(1);
} }
}, new Object[] { userId });
if(resourceIdList == null) {
/** resourceIdList = new ArrayList<String>();
* 获取某个范围内的关联模型Id }
* return resourceIdList;
* @param relationFileIds }
* @return
* @author zhangming
*/
public List<Map<String, String>> getFileIdsByRelation(String relationFileIds) {
if (relationFileIds == null || "".equals(relationFileIds)) {
return new ArrayList<Map<String, String>>();
}
String sql = "SELECT pal.ID, pal.PLNAME, p.PUBLISHDATE FROM APP_ACT_COE_PAL_REPOSITORY pal, ("
+ " SELECT r.FILEID, MAX(p.PUBLISHDATE) PUBLISHDATE"
+ " FROM APP_ACT_COE_PAL_SHAPE_RLAT r, APP_ACT_COE_PAL_PUBLISH p, APP_ACT_COE_PAL_PUBLISH_LIST pl"
+ " WHERE r.FILEID = pl.PALREPOSITORYID AND r.RELATIONFILEID IN (" + relationFileIds + ") AND p.ID=pl.PID AND pl.ACTIONTYPE='N'"
+ " GROUP BY r.FILEID) p"
+ " WHERE pal.ID = p.FILEID and pal.ISPUBLISH=1"
+ " ORDER BY p.PUBLISHDATE DESC";
List<Map<String, String>> list = DBSql.query(sql, new RowMapper<Map<String, String>>() {
@Override
public Map<String, String> mapRow(ResultSet rs, int arg1) throws SQLException {
Map<String, String> map = new HashMap<String, String>();
if (rs.getString(1) == null) {
return null;
}
map.put("id", rs.getString(1));
map.put("name", rs.getString(2));
Timestamp publishDate = rs.getTimestamp(3);
DateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
map.put("publishDate", sdf.format(publishDate));
return map;
}
});
return list;
}
/**
* 获取某个范围内的关联模型Id(只有文件属性关联)
*
* @param relationFileIds
* @return
* @author zhangming
*/
public List<Map<String, String>> getFileIdsByRelation1(String relationFileIds) {
if (relationFileIds == null || "".equals(relationFileIds)) {
return new ArrayList<Map<String, String>>();
}
String sql = "SELECT pal.ID, pal.PLNAME, p.PUBLISHDATE FROM APP_ACT_COE_PAL_REPOSITORY pal, ("
+ " SELECT r.FILEID, MAX(p.PUBLISHDATE) PUBLISHDATE"
+ " FROM APP_ACT_COE_PAL_SHAPE_RLAT r, APP_ACT_COE_PAL_PUBLISH p, APP_ACT_COE_PAL_PUBLISH_LIST pl"
+ " WHERE r.FILEID = pl.PALREPOSITORYID AND r.RELATIONFILEID IN (" + relationFileIds + ") AND r.SHAPEID='' AND p.ID=pl.PID AND pl.ACTIONTYPE='N'"
+ " GROUP BY r.FILEID) p"
+ " WHERE pal.ID = p.FILEID and pal.ISPUBLISH=1"
+ " ORDER BY p.PUBLISHDATE DESC";
List<Map<String, String>> list = DBSql.query(sql, new RowMapper<Map<String, String>>() {
@Override
public Map<String, String> mapRow(ResultSet rs, int arg1) throws SQLException {
Map<String, String> map = new HashMap<String, String>();
if (rs.getString(1) == null) {
return null;
}
map.put("id", rs.getString(1));
map.put("name", rs.getString(2));
Timestamp publishDate = rs.getTimestamp(3);
DateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
map.put("publishDate", sdf.format(publishDate));
return map;
}
});
return list;
}
/**
* 获取某个范围内的被关联模型Id
*
* @param fileIds
* @param relationFileIds
* @return
* @author zhangming
*/
public List<Map<String, String>> getRelationFileIds(String fileIds, String relationFileIds) {
if (fileIds == null || "".equals(fileIds) || relationFileIds == null || "".equals(relationFileIds)) {
return new ArrayList<Map<String, String>>();
}
String sql = "SELECT pal.ID, pal.PLNAME, p.PUBLISHDATE from APP_ACT_COE_PAL_REPOSITORY pal, ("
+ " SELECT r.RELATIONFILEID, MAX(p.PUBLISHDATE) PUBLISHDATE"
+ " FROM APP_ACT_COE_PAL_SHAPE_RLAT r, APP_ACT_COE_PAL_PUBLISH p, APP_ACT_COE_PAL_PUBLISH_LIST pl"
+ " WHERE r.RELATIONFILEID = pl.PALREPOSITORYID AND r.FILEID IN (" + fileIds + ") AND r.RELATIONFILEID IN (" + relationFileIds + ") AND p.ID=pl.PID AND pl.ACTIONTYPE='N'"
+ " GROUP BY r.RELATIONFILEID) p"
+ " WHERE pal.ID=p.RELATIONFILEID and pal.ISPUBLISH=1"
+ " ORDER BY p.PUBLISHDATE DESC";
List<Map<String, String>> list = DBSql.query(sql, new RowMapper<Map<String, String>>() {
@Override
public Map<String, String> mapRow(ResultSet rs, int arg1) throws SQLException {
Map<String, String> map = new HashMap<String, String>();
if (rs.getString(1) == null) {
return null;
}
map.put("id", rs.getString(1));
map.put("name", rs.getString(2));
Timestamp publishDate = rs.getTimestamp(3);
DateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
map.put("publishDate", sdf.format(publishDate));
return map;
}
});
return list;
}
/**
* 发布历史
*
* @param ids
* @return
* @author zhangming
*/
public List<Map<String, String>> getPublishListData(String ids, String category, String wsId, String methodId) {
if (ids == null || "".equals(ids)) {
return new ArrayList<Map<String, String>>();
}
String sql = "SELECT r.ID, r.PLNAME, p.PUBLISHDATE from APP_ACT_COE_PAL_REPOSITORY r, ("
+ " SELECT pl.PALREPOSITORYID, MAX(p.PUBLISHDATE) publishdate "
+ " FROM APP_ACT_COE_PAL_PUBLISH p, APP_ACT_COE_PAL_PUBLISH_LIST pl"
+ " WHERE p.ID=pl.PID AND pl.PALREPOSITORYID IN (" + ids + ")"
+ " GROUP BY pl.PALREPOSITORYID ) p"
+ " WHERE r.ID = p.PALREPOSITORYID AND r.PLCATEGORY='" + category + "' AND r.PLMETHODID <> 'default' AND r.WSID='" + wsId + "'";
if (methodId != null && !"".equals(methodId)) {
sql += " AND r.PLMETHODID='" + methodId + "'";
}
sql += " ORDER BY p.PUBLISHDATE DESC";
List<Map<String, String>> list = DBSql.query(sql, new RowMapper<Map<String, String>>() {
@Override
public Map<String, String> mapRow(ResultSet rs, int arg1) throws SQLException {
Map<String, String> map = new HashMap<String, String>();
if (rs.getString(1) == null) {
return null;
}
map.put("id", rs.getString(1));
map.put("name", rs.getString(2));
Timestamp publishDate = rs.getTimestamp(3);
DateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
map.put("publishDate", sdf.format(publishDate));
return map;
}
});
return list;
}
/**
* 根据name获取未发布的流程文件
* @param name
* @param wsId
* @param methodId
* @return
*/
public List<PALRepositoryModel> getCoeProcessLevelByNamen(String name, String wsId, String methodId) {
String namelike = "";
if (StringUtil.containSpecialChar(name)) {
namelike = "'%" + StringUtil.replaceSqlStr(name, AWSServerConf.isMySQL()) + "%'" + (AWSServerConf.isMySQL() ? "ESCAPE '\\\\'" : " ESCAPE '\\'");
} else {
namelike = "'%" + name + "%'";
}
StringBuilder sql = new StringBuilder("select * from " + PALRepositoryModelImpl.DATABASE_ENTITY + " where " + PALRepositoryModelImpl.FIELD_WS_ID + "='" + wsId + "' and " + PALRepositoryModelImpl.FIELD_PL_NAME + " like " + namelike + " and ISPUBLISH = '0'");
if (methodId != null && !"".equals(methodId)) {
sql.append(" and PLMETHODID = '" + methodId + "' ");
}
sql.append(" ORDER BY " + PALRepositoryModelImpl.FIELD_PL_ORDERINDEX + " ASC");
return DBSql.query(sql.toString(), new PALRespositoryModelMapper());
}
/**
* 根据name获取有多个版本的流程文件
* @param name
* @param wsId
* @param methodId
* @return
*/
public List<PALRepositoryModel> getCoeProcessLevelByNamec(String name, String wsId, String methodId) {
String namelike = "";
if (StringUtil.containSpecialChar(name)) {
namelike = "'%" + StringUtil.replaceSqlStr(name, AWSServerConf.isMySQL()) + "%'" + (AWSServerConf.isMySQL() ? "ESCAPE '\\\\'" : " ESCAPE '\\'");
} else {
namelike = "'%" + name + "%'";
}
StringBuilder sql = new StringBuilder("select * from " + PALRepositoryModelImpl.DATABASE_ENTITY + " where " + PALRepositoryModelImpl.FIELD_WS_ID + "='" + wsId + "' and " + PALRepositoryModelImpl.FIELD_PL_NAME + " like " + namelike + " and ISPUBLISH = '1'");
String sqlcount = "select count(*) from " + PALRepositoryModelImpl.DATABASE_ENTITY + " where " + PALRepositoryModelImpl.FIELD_WS_ID + "='" + wsId + "' and " + PALRepositoryModelImpl.FIELD_PL_NAME + " like " + namelike + "";
if (methodId != null && !"".equals(methodId)) {
sql.append(" and PLMETHODID = '" + methodId + "' ");
}
sql.append(" ORDER BY " + PALRepositoryModelImpl.FIELD_PL_ORDERINDEX + " ASC");
sqlcount+=" ORDER BY " + PALRepositoryModelImpl.FIELD_PL_ORDERINDEX + " ASC";
String num = DBSql.getString(sqlcount);
int number = Integer.parseInt(num);
if(number <= 1) {
List<PALRepositoryModel> data = null;
return data;
}
return DBSql.query(sql.toString(), new PALRespositoryModelMapper());
}
/**
* 根据name获取停用的流程文件
* @param name
* @param wsId
* @param category
* @return
*/
public List<PALRepositoryModel> getCoeProcessLevelByNameAndCategorys(String name, String wsId, String category) {
String namelike = "";
if (StringUtil.containSpecialChar(name)) {
namelike = "'%" + StringUtil.replaceSqlStr(name, AWSServerConf.isMySQL()) + "%'" + (AWSServerConf.isMySQL() ? "ESCAPE '\\\\'" : " ESCAPE '\\'");
} else {
namelike = "'%" + name + "%'";
}
StringBuilder sql = new StringBuilder("select * from " + PALRepositoryModelImpl.DATABASE_ENTITY + " where " + PALRepositoryModelImpl.FIELD_WS_ID + "='" + wsId + "' and " + PALRepositoryModelImpl.FIELD_PL_NAME + " like " + namelike + " and " + PALRepositoryModelImpl.FIELD_IS_USE + "='1' and ISPUBLISH = '1'");
if (category != null && !"".equals(category)) {
sql.append(" and PLCATEGORY = '" + category + "' ");
}
sql.append(" ORDER BY " + PALRepositoryModelImpl.FIELD_PL_ORDERINDEX + " ASC");
return DBSql.query(sql.toString(), new PALRespositoryModelMapper());
}
private class PALRespositoryModelMapper implements RowMapper<PALRepositoryModel> {
PALRepository pal = new PALRepository();
public PALRepositoryModel mapRow(ResultSet rs, int arg1) throws SQLException {
return (PALRepositoryModel) pal.record2Model(rs);
}
}
/**
* 根据userId获取资源Id列表
* @param userId
* @return
*/
public List<String> getTeamUserPerms(String userId) {
String sql = " select distinct perm.RESOURCEID from APP_ACT_NETWORK_TEAM_MEMBER tm , APP_ACT_COE_TEAM_PERM perm " +
"where tm.TEAMID=perm.TEAMID and tm.MEMBERSTATUS='1' and tm.USERID=? ";
List<String> resourceIdList = DBSql.query(sql.toString(), new RowMapper<String>() {
@Override
public String mapRow(ResultSet rs, int arg1) throws SQLException {
return rs.getString(1);
}
}, new Object[] { userId });
if(resourceIdList == null) {
resourceIdList = new ArrayList<String>();
}
return resourceIdList;
}
} }

View File

@ -10,23 +10,23 @@ import com.actionsoft.bpms.util.DBSql;
/** /**
* 导航处理类 * 导航处理类
* *
* @author ZZ * @author ZZ
* *
*/ */
public class PublisherSkinsDao { public class PublisherSkinsDao {
public long getPrevLoginTime(String userId) { public long getPrevLoginTime(String userId) {
long prevLoginTime = 0; long prevLoginTime = 0;
String sql = " select * from SYS_SESSION s where s.userid = '" + userId + "' order by s.STARTTIME desc "; String sql = " select * from SYS_SESSION s where s.userid = '" + userId + "' order by s.STARTTIME desc ";
List<Long> list = DBSql.query(SQLPagination.getPaginitionSQL(sql, 0, 2), new RowMapper<Long>() { List<Long> list = DBSql.query(SQLPagination.getPaginitionSQL(sql, 0, 2), new RowMapper<Long>() {
public Long mapRow(ResultSet rs, int paramInt) throws SQLException { public Long mapRow(ResultSet rs, int paramInt) throws SQLException {
return rs.getLong("starttime"); return rs.getLong("starttime");
} }
}); });
if (list != null && list.size() > 0) { if (list != null && list.size() > 0) {
prevLoginTime = list.get(list.size() - 1); prevLoginTime = list.get(list.size() - 1);
} }
return prevLoginTime; return prevLoginTime;
} }
} }

View File

@ -5,231 +5,231 @@ import com.actionsoft.sdk.local.SDK;
import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONArray;
public final class PublisherConf { public final class PublisherConf {
public static final String APPID = "com.actionsoft.apps.coe.pal.publisher"; public static final String APPID = "com.actionsoft.apps.coe.pal.publisher";
public static final String RELATION_SEARCH_ID = "com.actionsoft.apps.coe.pal.relationsearch";
public static final String RELATION_SEARCH_NAME = "关联查询";
public static final String PORTAL_TREE_ICON_FOLDER = "../apps/com.actionsoft.apps.coe.pal.publisher/img/tree-folder.png";
public static final String PORTAL_TREE_ICON_FOLDER1 = "../apps/com.actionsoft.apps.coe.pal.publisher/img/tree-folder1.png";
public static String PUBLISH_PORTAL_VERSION = "v1";
public static String XPAGES_ID = "";
public static JSONArray PORTAL_TABS = null;
/**
* 页底信息如客户流程管理部联系信息
*
* @return
*/
public static String getFotter() {
String value = SDK.getAppAPI().getProperty(APPID, "fotter");
if (UtilString.isEmpty(value)) {
value = "炎黄盈动";
}
return value;
}
public static void setFotter(String fotter) {
fotter = fotter == null ? "" : fotter;
SDK.getAppAPI().setProperty(APPID, "fotter", fotter);
}
public static final String RELATION_SEARCH_ID = "com.actionsoft.apps.coe.pal.relationsearch"; /**
public static final String RELATION_SEARCH_NAME = "关联查询"; * 门户标题
*
* @return
*/
public static String getTitle() {
String value = SDK.getAppAPI().getProperty(APPID, "title");
if (UtilString.isEmpty(value)) {
value = "CoE Process Portal";
}
return value;
}
public static void setTitle(String title) {
title = title == null ? "" : title;
SDK.getAppAPI().setProperty(APPID, "title", title);
}
public static final String PORTAL_TREE_ICON_FOLDER = "../apps/com.actionsoft.apps.coe.pal.publisher/img/tree-folder.png"; /**
public static final String PORTAL_TREE_ICON_FOLDER1 = "../apps/com.actionsoft.apps.coe.pal.publisher/img/tree-folder1.png"; * 流程发布流程版本Id
*
* @return
*/
public static String getPublishProcessId() {
String value = SDK.getAppAPI().getProperty(APPID, "publishProcessId");
return value;
}
public static String PUBLISH_PORTAL_VERSION = "v1"; /**
* 发布门户的浏览者是否整合AWS用户
*
* @return 整合返回true
*/
public static boolean isIntegrationAWSUser() {
String value = SDK.getAppAPI().getProperty(APPID, "isIntegrationAWSUser");
return (value != null && value.trim().equalsIgnoreCase("true")) ? true : false;
}
public static String XPAGES_ID = ""; /**
* 如果门户未整合AWS用户此处配置来自外部系统访问门户的统一访客账户该账户是AWS平台合法的账户
*
* @return
*/
public static String getGuest() {
String value = SDK.getAppAPI().getProperty(APPID, "guest");
return value;
}
public static JSONArray PORTAL_TABS = null; /**
* 发布门户的内容允许复制
*
* @return 允许返回true
*/
public static boolean isCopy() {
String value = SDK.getAppAPI().getProperty(APPID, "isCopy");
return (value != null && value.trim().equalsIgnoreCase("true")) ? true : false;
}
public static void setCopy(String isCopy) {
if (isCopy != null && isCopy.trim().equalsIgnoreCase("true")) {
isCopy = "true";
} else {
isCopy = "false";
}
SDK.getAppAPI().setProperty(APPID, "isCopy", isCopy);
}
/** /**
* 页底信息如客户流程管理部联系信息 * 发布门户的内容允许打印
* *
* @return * @return 允许返回true
*/ */
public static String getFotter() { public static boolean isPrint() {
String value = SDK.getAppAPI().getProperty(APPID, "fotter"); String value = SDK.getAppAPI().getProperty(APPID, "isPrint");
if (UtilString.isEmpty(value)) { return (value != null && value.trim().equalsIgnoreCase("true")) ? true : false;
value = "炎黄盈动"; }
}
return value; public static void setPrint(String isPrint) {
} if (isPrint != null && isPrint.trim().equalsIgnoreCase("true")) {
isPrint = "true";
} else {
isPrint = "false";
}
SDK.getAppAPI().setProperty(APPID, "isPrint", isPrint);
}
public static void setFotter(String fotter) { /**
fotter = fotter == null ? "" : fotter; * 发布门户的内容允许留言
SDK.getAppAPI().setProperty(APPID, "fotter", fotter); *
} * @return 允许返回true
*/
public static boolean isComment() {
String value = SDK.getAppAPI().getProperty(APPID, "isComment");
return (value != null && value.trim().equalsIgnoreCase("true")) ? true : false;
}
public static void setComment(String isComment) {
if (isComment != null && isComment.trim().equalsIgnoreCase("true")) {
isComment = "true";
} else {
isComment = "false";
}
SDK.getAppAPI().setProperty(APPID, "isComment", isComment);
}
/** /**
* 门户标题 * 发布门户的内容允许查看属性
* *
* @return * @return 允许返回true
*/ */
public static String getTitle() { public static boolean isViewAttribute() {
String value = SDK.getAppAPI().getProperty(APPID, "title"); String value = SDK.getAppAPI().getProperty(APPID, "isViewAttribute");
if (UtilString.isEmpty(value)) { return (value != null && value.trim().equalsIgnoreCase("true")) ? true : false;
value = "CoE Process Portal"; }
}
return value; public static void setViewAttribute(String isViewAttribute) {
} if (isViewAttribute != null && isViewAttribute.trim().equalsIgnoreCase("true")) {
isViewAttribute = "true";
} else {
isViewAttribute = "false";
}
SDK.getAppAPI().setProperty(APPID, "isViewAttribute", isViewAttribute);
}
public static void setTitle(String title) { /**
title = title == null ? "" : title; * 发布门户的内容允许查看历史发布记录
SDK.getAppAPI().setProperty(APPID, "title", title); *
} * @return 允许返回true
*/
/** public static boolean isViewHistory() {
* 流程发布流程版本Id String value = SDK.getAppAPI().getProperty(APPID, "isViewHistory");
* return (value != null && value.trim().equalsIgnoreCase("true")) ? true : false;
* @return }
*/
public static String getPublishProcessId() { public static void setViewHistory(String isViewHistory) {
String value = SDK.getAppAPI().getProperty(APPID, "publishProcessId"); if (isViewHistory != null && isViewHistory.trim().equalsIgnoreCase("true")) {
return value; isViewHistory = "true";
} } else {
isViewHistory = "false";
/** }
* 发布门户的浏览者是否整合AWS用户 SDK.getAppAPI().setProperty(APPID, "isViewHistory", isViewHistory);
* }
* @return 整合返回true
*/ /**
public static boolean isIntegrationAWSUser() { * 流程管理门户xpage
String value = SDK.getAppAPI().getProperty(APPID, "isIntegrationAWSUser"); * @param type common常用流程frequency高频流程systemMap系统地图processMap流程地图notification发布动态
return (value != null && value.trim().equalsIgnoreCase("true")) ? true : false; * @return
} */
public static String getXpagesContent(String type) {
/** StringBuffer content = new StringBuffer();
* 如果门户未整合AWS用户此处配置来自外部系统访问门户的统一访客账户该账户是AWS平台合法的账户 switch (type) {
* case "common":
* @return content.append("<script src='../apps/com.actionsoft.apps.coe.pal.publisher/js/publish.xpages.common.js'></script>");
*/ break;
public static String getGuest() { case "frequency":
String value = SDK.getAppAPI().getProperty(APPID, "guest"); content.append("<script src='../apps/com.actionsoft.apps.coe.pal.publisher/js/publish.xpages.frequency.js'></script>");
return value; break;
} case "systemMap":
content.append("<script src='../apps/com.actionsoft.apps.coe.pal.publisher/js/publish.xpages.systemmap.js'></script>");
/** break;
* 发布门户的内容允许复制 case "dataMap":
* content.append("<script src='../apps/com.actionsoft.apps.coe.pal.publisher/js/publish.xpages.datamap.js'></script>");
* @return 允许返回true break;
*/ case "controlMap":
public static boolean isCopy() { content.append("<script src='../apps/com.actionsoft.apps.coe.pal.publisher/js/publish.xpages.controlmap.js'></script>");
String value = SDK.getAppAPI().getProperty(APPID, "isCopy"); break;
return (value != null && value.trim().equalsIgnoreCase("true")) ? true : false; case "orgMap":
} content.append("<script src='../apps/com.actionsoft.apps.coe.pal.publisher/js/publish.xpages.orgmap.js'></script>");
break;
public static void setCopy(String isCopy) { case "processMap":
if (isCopy != null && isCopy.trim().equalsIgnoreCase("true")) { content.append("<script src='../apps/com.actionsoft.apps.coe.pal.publisher/js/publish.xpages.processmap.js'></script>");
isCopy = "true"; break;
} else { case "notification":
isCopy = "false"; content.append("<script src='../apps/com.actionsoft.apps.coe.pal.publisher/js/publish.xpages.notification.js'></script>");
} break;
SDK.getAppAPI().setProperty(APPID, "isCopy", isCopy); case "banner":// 横幅轮播图
} content.append("<script src='../apps/com.actionsoft.apps.coe.pal.publisher/js/publish.xpages.banner.js'></script>");
break;
/** case "participant":// 我参与的
* 发布门户的内容允许打印 content.append("<script src='../apps/com.actionsoft.apps.coe.pal.publisher/js/publish.xpages.participant.js'></script>");
* break;
* @return 允许返回true case "responsible":// 我负责的
*/ content.append("<script src='../apps/com.actionsoft.apps.coe.pal.publisher/js/publish.xpages.responsible.js'></script>");
public static boolean isPrint() { break;
String value = SDK.getAppAPI().getProperty(APPID, "isPrint"); case "postresponsibility":// 岗位职责
return (value != null && value.trim().equalsIgnoreCase("true")) ? true : false; content.append("<script src='../apps/com.actionsoft.apps.coe.pal.publisher/js/publish.xpages.postresponsibility.js'></script>");
} break;
case "rcaimatrix":// rcai矩阵
public static void setPrint(String isPrint) { content.append("<script src='../apps/com.actionsoft.apps.coe.pal.publisher/js/publish.xpages.rcaimatrix.js'></script>");
if (isPrint != null && isPrint.trim().equalsIgnoreCase("true")) { break;
isPrint = "true"; default:
} else { break;
isPrint = "false"; }
} return content.toString();
SDK.getAppAPI().setProperty(APPID, "isPrint", isPrint); }
}
/**
* 发布门户的内容允许留言
*
* @return 允许返回true
*/
public static boolean isComment() {
String value = SDK.getAppAPI().getProperty(APPID, "isComment");
return (value != null && value.trim().equalsIgnoreCase("true")) ? true : false;
}
public static void setComment(String isComment) {
if (isComment != null && isComment.trim().equalsIgnoreCase("true")) {
isComment = "true";
} else {
isComment = "false";
}
SDK.getAppAPI().setProperty(APPID, "isComment", isComment);
}
/**
* 发布门户的内容允许查看属性
*
* @return 允许返回true
*/
public static boolean isViewAttribute() {
String value = SDK.getAppAPI().getProperty(APPID, "isViewAttribute");
return (value != null && value.trim().equalsIgnoreCase("true")) ? true : false;
}
public static void setViewAttribute(String isViewAttribute) {
if (isViewAttribute != null && isViewAttribute.trim().equalsIgnoreCase("true")) {
isViewAttribute = "true";
} else {
isViewAttribute = "false";
}
SDK.getAppAPI().setProperty(APPID, "isViewAttribute", isViewAttribute);
}
/**
* 发布门户的内容允许查看历史发布记录
*
* @return 允许返回true
*/
public static boolean isViewHistory() {
String value = SDK.getAppAPI().getProperty(APPID, "isViewHistory");
return (value != null && value.trim().equalsIgnoreCase("true")) ? true : false;
}
public static void setViewHistory(String isViewHistory) {
if (isViewHistory != null && isViewHistory.trim().equalsIgnoreCase("true")) {
isViewHistory = "true";
} else {
isViewHistory = "false";
}
SDK.getAppAPI().setProperty(APPID, "isViewHistory", isViewHistory);
}
/**
* 流程管理门户xpage
* @param type common常用流程frequency高频流程systemMap系统地图processMap流程地图notification发布动态
* @return
*/
public static String getXpagesContent(String type) {
StringBuffer content = new StringBuffer();
switch (type) {
case "common":
content.append("<script src='../apps/com.actionsoft.apps.coe.pal.publisher/js/publish.xpages.common.js'></script>");
break;
case "frequency":
content.append("<script src='../apps/com.actionsoft.apps.coe.pal.publisher/js/publish.xpages.frequency.js'></script>");
break;
case "systemMap":
content.append("<script src='../apps/com.actionsoft.apps.coe.pal.publisher/js/publish.xpages.systemmap.js'></script>");
break;
case "dataMap":
content.append("<script src='../apps/com.actionsoft.apps.coe.pal.publisher/js/publish.xpages.datamap.js'></script>");
break;
case "controlMap":
content.append("<script src='../apps/com.actionsoft.apps.coe.pal.publisher/js/publish.xpages.controlmap.js'></script>");
break;
case "orgMap":
content.append("<script src='../apps/com.actionsoft.apps.coe.pal.publisher/js/publish.xpages.orgmap.js'></script>");
break;
case "processMap":
content.append("<script src='../apps/com.actionsoft.apps.coe.pal.publisher/js/publish.xpages.processmap.js'></script>");
break;
case "notification":
content.append("<script src='../apps/com.actionsoft.apps.coe.pal.publisher/js/publish.xpages.notification.js'></script>");
break;
case "banner":// 横幅轮播图
content.append("<script src='../apps/com.actionsoft.apps.coe.pal.publisher/js/publish.xpages.banner.js'></script>");
break;
case "participant":// 我参与的
content.append("<script src='../apps/com.actionsoft.apps.coe.pal.publisher/js/publish.xpages.participant.js'></script>");
break;
case "responsible":// 我负责的
content.append("<script src='../apps/com.actionsoft.apps.coe.pal.publisher/js/publish.xpages.responsible.js'></script>");
break;
case "postresponsibility":// 岗位职责
content.append("<script src='../apps/com.actionsoft.apps.coe.pal.publisher/js/publish.xpages.postresponsibility.js'></script>");
break;
case "rcaimatrix":// rcai矩阵
content.append("<script src='../apps/com.actionsoft.apps.coe.pal.publisher/js/publish.xpages.rcaimatrix.js'></script>");
break;
default:
break;
}
return content.toString();
}
} }

View File

@ -17,51 +17,51 @@ import com.actionsoft.sdk.local.api.AppAPI;
public class AppInstallListener implements AppListener { public class AppInstallListener implements AppListener {
@SuppressWarnings("resource") @SuppressWarnings("resource")
@Override @Override
public void after(AppContext app) { public void after(AppContext app) {
// 流程管理门户xpages文件同步到xpages应用中 // 流程管理门户xpages文件同步到xpages应用中
try { try {
String path = AppsConst.APPS_ROOT + AppsConst.FOLDER_INSTALL + File.separator + app.getId() + File.separator + "xpages" + File.separator; String path = AppsConst.APPS_ROOT + AppsConst.FOLDER_INSTALL + File.separator + app.getId() + File.separator + "xpages" + File.separator;
File fileDir = new File(path); File fileDir = new File(path);
if (fileDir.exists()) { if (fileDir.exists()) {
File [] files = fileDir.listFiles(); File [] files = fileDir.listFiles();
for (File file : files) { for (File file : files) {
InputStream input = null; InputStream input = null;
ByteArrayOutputStream arrayOutputStream = null; ByteArrayOutputStream arrayOutputStream = null;
input = new FileInputStream(file); input = new FileInputStream(file);
arrayOutputStream = new ByteArrayOutputStream(); arrayOutputStream = new ByteArrayOutputStream();
byte [] buf = new byte[1024]; byte [] buf = new byte[1024];
int len = 0; int len = 0;
while ((len = input.read(buf)) != -1) { while ((len = input.read(buf)) != -1) {
arrayOutputStream.write(buf, 0, len); arrayOutputStream.write(buf, 0, len);
} }
byte [] bytedata = arrayOutputStream.toByteArray(); byte [] bytedata = arrayOutputStream.toByteArray();
String content = new String(Base64.encode(bytedata)); String content = new String(Base64.encode(bytedata));
// 调用App // 调用App
String sourceAppId = app.getId(); String sourceAppId = app.getId();
// aslp服务地址 // aslp服务地址
String aslp = "aslp://com.actionsoft.apps.addons.xpages/createTemplateByContent"; String aslp = "aslp://com.actionsoft.apps.addons.xpages/createTemplateByContent";
// 参数定义列表 // 参数定义列表
Map<String, Object> params = new HashMap<>(); Map<String, Object> params = new HashMap<>();
//内容,必填 //内容,必填
params.put("content", content); params.put("content", content);
//0,覆盖 1不覆盖,非必填 //0,覆盖 1不覆盖,非必填
params.put("overWriteFlag", "0"); params.put("overWriteFlag", "0");
AppAPI appAPI = SDK.getAppAPI(); AppAPI appAPI = SDK.getAppAPI();
//根据一个xpages文件的内容创建一个xpages模板记录 //根据一个xpages文件的内容创建一个xpages模板记录
appAPI.callASLP(appAPI.getAppContext(sourceAppId), aslp, params); appAPI.callASLP(appAPI.getAppContext(sourceAppId), aslp, params);
} }
} }
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
throw new AWSException("流程管理门户xpages文件解析错误"); throw new AWSException("流程管理门户xpages文件解析错误");
} }
} }
@Override @Override
public boolean before(AppContext arg0) { public boolean before(AppContext arg0) {
return true; return true;
} }
} }

View File

@ -10,35 +10,35 @@ import com.alibaba.fastjson.JSONArray;
public class AppStartListener implements AppListener{ public class AppStartListener implements AppListener{
@Override @Override
public void after(AppContext arg0) { public void after(AppContext arg0) {
// 初始化门户版本 // 初始化门户版本
String value = SDK.getAppAPI().getProperty(PublisherConf.APPID, "portalVersion"); String value = SDK.getAppAPI().getProperty(PublisherConf.APPID, "portalVersion");
PublisherConf.PUBLISH_PORTAL_VERSION = value; PublisherConf.PUBLISH_PORTAL_VERSION = value;
if (value.equals("v3")) { if (value.equals("v3")) {
// 初始化门户配置 // 初始化门户配置
String xpagesId = SDK.getAppAPI().getProperty(PublisherConf.APPID, "portalTemplateId_xpages"); String xpagesId = SDK.getAppAPI().getProperty(PublisherConf.APPID, "portalTemplateId_xpages");
if ("".equals(xpagesId.trim())) { if ("".equals(xpagesId.trim())) {
throw new AWSException("PAL门户默认xpages模版配置参数不允许为空"); throw new AWSException("PAL门户默认xpages模版配置参数不允许为空");
} }
PublisherConf.XPAGES_ID = xpagesId; PublisherConf.XPAGES_ID = xpagesId;
String portalTabs = SDK.getAppAPI().getProperty(PublisherConf.APPID, "portalTabs"); String portalTabs = SDK.getAppAPI().getProperty(PublisherConf.APPID, "portalTabs");
if (!"".equals(portalTabs.trim())) { if (!"".equals(portalTabs.trim())) {
try { try {
JSONArray array = JSON.parseArray(portalTabs.trim()); JSONArray array = JSON.parseArray(portalTabs.trim());
PublisherConf.PORTAL_TABS = array; PublisherConf.PORTAL_TABS = array;
} catch (Exception e) { } catch (Exception e) {
throw new AWSException("PAL门户Tab标签配置参数解析出错请检查参数格式是否正确"); throw new AWSException("PAL门户Tab标签配置参数解析出错请检查参数格式是否正确");
} }
} else { } else {
PublisherConf.PORTAL_TABS = new JSONArray(); PublisherConf.PORTAL_TABS = new JSONArray();
} }
} }
} }
@Override @Override
public boolean before(AppContext arg0) { public boolean before(AppContext arg0) {
return true; return true;
} }
} }

View File

@ -23,222 +23,222 @@ import com.actionsoft.bpms.util.DBSql;
import com.actionsoft.sdk.local.SDK; import com.actionsoft.sdk.local.SDK;
public class PublishInstanceAfterReactivateLIstener extends ExecuteListener{ public class PublishInstanceAfterReactivateLIstener extends ExecuteListener{
@Override
public String getDescription() {
return "流程复活后进行相关数据还原处理";
}
@Override @Override
public String getDescription() { public String getProvider() {
return "流程复活后进行相关数据还原处理"; return "aws-coe";
} }
@Override @Override
public String getProvider() { public String getVersion() {
return "aws-coe"; return "V6.3";
} }
@Override
public void execute(ProcessExecutionContext ctx) throws Exception {
String processInstId = ctx.getProcessInstance().getId();
ProcessInstance processInstance = ctx.getProcessInstance();
SDK.getLogAPI().consoleInfo("-----------执行流程复活后事件-------------");
SDK.getLogAPI().consoleInfo("流程实例标题:" + processInstance.getTitle() + "[processInstId=" + processInstId + "]");
// 获取相关的流程数据
List<BO> bolistN = SDK.getBOAPI().query(PublisherConstant.BOSUBTABLE_N).bindId(processInstId).list();
List<BO> bolistC = SDK.getBOAPI().query(PublisherConstant.BOSUBTABLE_C).bindId(processInstId).list();
List<BO> bolistS = SDK.getBOAPI().query(PublisherConstant.BOSUBTABLE_S).bindId(processInstId).list();
List<PALRepositoryModel> pList = new ArrayList<>();
if (bolistN != null) {
for (BO boN : bolistN) {
String publishFileId = boN.get("PUBLISHFILEID").toString();
PALRepositoryModel palModel = PALRepositoryCache.getCache().get(publishFileId);
if (palModel != null && palModel.isPublish()) {// 若当前为非已发布状态则不进行处理
// 若当前流程model.getPalRepositoryId()除此次发布以外存在发布过变更过废止过则退回至停用状态否则退回至设计状态
// List<PublishListHistoryModel> allPublishData = listDao.query("PALREPOSITORYID = ?", publishFileId).list();
List<RowMap> allPublishData = DBSql.getMaps("SELECT ID FROM SYS_COE_PAL_PUBLISH_LIST WHERE PALREPOSITORYID = ?", new Object[] {publishFileId});
if (allPublishData != null) {
boolean isPublish = false;
boolean isStop = false;
boolean isApproval = false;
if (allPublishData.size() > 1) {
// 退回至停用状态
isStop = true;
} else {
// 退回至设计状态
}
createResultMap(palModel.getName(), palModel.getId(), isPublish, isStop, isApproval, pList);
}
}
@Override }
public String getVersion() { }
return "V6.3"; if (bolistC != null) {
} for (BO boC : bolistC) {
String changefileId = boC.get("CHANGEFILEID").toString();// 变更文件id
String changedFileIdNew = boC.get("CHANGEDFILEIDNEW").toString();// 变更后文件id
PALRepositoryModel changeModel = PALRepositoryCache.getCache().get(changefileId);
PALRepositoryModel changeNewModel = PALRepositoryCache.getCache().get(changedFileIdNew);
// 符合该条件可进行复活状态值不符合则暂时不处理
if (changeModel != null && changeNewModel != null && changeModel.isStop() && changeNewModel.isPublish()) {
// changeModel退回至已发布状态
boolean isPublish = true;
boolean isStop = false;
boolean isApproval = false;
createResultMap(changeModel.getName(), changefileId, isPublish, isStop, isApproval, pList);
// List<PublishListHistoryModel> allchangeData = listDao.query("PALREPOSITORYID = ?", changedFileIdNew).list();
List<RowMap> allchangeData = DBSql.getMaps("SELECT ID FROM SYS_COE_PAL_PUBLISH_LIST WHERE PALREPOSITORYID = ?", new Object[] {changedFileIdNew});
if (allchangeData != null) {
isPublish = false;
isStop = false;
isApproval = false;
if (allchangeData.size() > 1) {
// changeNewModel退回至停用状态
isStop = true;
} else {
// changeNewModel退回至设计状态
}
createResultMap(changeNewModel.getName(), changedFileIdNew, isPublish, isStop, isApproval, pList);
}
}
}
}
if (bolistS != null) {
for (BO boS : bolistS) {
String stopFileId = boS.get("STOPFILEID").toString();
PALRepositoryModel stopModel = PALRepositoryCache.getCache().get(stopFileId);
// 已停用且该流程版本下所有流程没有在发布状态的进行退回保证退回之后该流程所有版本中只有一条为已发布状态
if (stopModel != null && stopModel.isStop()) {
List<PALRepositoryModel> stopList = PALRepositoryCache.getByVersionId(stopModel.getVersionId());
boolean flag = false;
for (PALRepositoryModel model : stopList) {
if (model.isPublish()) {
flag = true;
break;
}
}
if (!flag) {
// 退回至已发布状态
boolean isPublish = true;
boolean isStop = false;
boolean isApproval = false;
createResultMap(stopModel.getName(), stopFileId, isPublish, isStop, isApproval, pList);
}
}
}
}
if (pList.size() > 0) {
restoreData(pList, processInstId);
}
}
@Override /**
public void execute(ProcessExecutionContext ctx) throws Exception { * 还原数据
String processInstId = ctx.getProcessInstance().getId(); * @param pList
ProcessInstance processInstance = ctx.getProcessInstance(); * @param processInstId
SDK.getLogAPI().consoleInfo("-----------执行流程复活后事件-------------"); */
SDK.getLogAPI().consoleInfo("流程实例标题:" + processInstance.getTitle() + "[processInstId=" + processInstId + "]"); private void restoreData(List<PALRepositoryModel> pList, String processInstId) {
// 获取相关的流程数据 // 批量处理回退数据
boolean flag = batchHandleRepositoryData(pList);
int r = 0;
if (flag) {
// 删除SYS_COE_PAL_PUBLISH和SYS_COE_PAL_PUBLISH_LIST表数据
PublishHistory dao = new PublishHistory();// 发布结果主表
PublishHistoryModel history = dao.queryBy("PROCESSINSTID = ?", processInstId);
if (history != null) {
r = dao.delete(history.getId());
}
SDK.getLogAPI().consoleInfo("流程状态还原,变更数据[" + pList.size() + "]条");
for (PALRepositoryModel model : pList) {
SDK.getLogAPI().consoleInfo("流程名称:" + model.getName() + "[id=" + model.getId() + ",isPublish=" + model.isPublish() + ",isStop=" + model.isStop() + "]");
}
if (r > 0) {
SDK.getLogAPI().consoleInfo("删除发布结果数据成功[processInstId=" + processInstId + "]");
}
}
}
/**
* 流程数据库状态还原
* @param pList
* @return
*/
private boolean batchHandleRepositoryData(List<PALRepositoryModel> pList) {
boolean completeSuccess = false;
Connection conn = DBSql.open();
PreparedStatement ps = null;
java.sql.ResultSet rset = null;
Timestamp nowTime = new Timestamp(System.currentTimeMillis());
try {
conn.setAutoCommit(false);
String sql = "UPDATE " + PALRepositoryModelImpl.DATABASE_ENTITY + " SET "
+ PALRepositoryModelImpl.FIELD_PL_ISPUBLISH + " =?, "
+ PALRepositoryModelImpl.FIELD_PL_ISSTOP + "= ?,"
+ PALRepositoryModelImpl.FIELD_PL_MODIFYDATE + " = ? WHERE "
+ PALRepositoryModelImpl.FIELD_UUID + "=?";
ps = conn.prepareStatement(sql);
for (int i = 0; i < pList.size(); i++) {
String id = pList.get(i).getId();
int isPublish = pList.get(i).isPublish() ? 1 : 0;
int isStop = pList.get(i).isStop() ? 1 : 0;
ps.setInt(1, isPublish);
ps.setInt(2, isStop);
ps.setTimestamp(3, nowTime);
ps.setString(4, id);
ps.addBatch();
}
int[] results = ps.executeBatch();
for (int i = 0; i < results.length; i++) {
if ((results[i] >= 0) || (results[i] == PreparedStatement.SUCCESS_NO_INFO)) {
completeSuccess = true;
}
}
if (completeSuccess) {
conn.commit();
PALRepository dao = new PALRepository();
for (PALRepositoryModel model : pList) {
PALRepositoryModel model2 = dao.getInstance(model.getId());
if (model2 != null) {
PALRepositoryCache.getCache().put(model2.getId(), model2);
}
}
} else {
conn.rollback();
PALRepositoryCache.getCache().reload();
}
} catch (SQLException e) {
try {
conn.rollback();
} catch (SQLException e1) {
e1.printStackTrace();
}
e.printStackTrace();
} finally {
DBSql.close(conn, ps, rset);
}
return completeSuccess;
}
List<BO> bolistN = SDK.getBOAPI().query(PublisherConstant.BOSUBTABLE_N).bindId(processInstId).list(); /**
List<BO> bolistC = SDK.getBOAPI().query(PublisherConstant.BOSUBTABLE_C).bindId(processInstId).list(); * 结果集用于批量处理数据源
List<BO> bolistS = SDK.getBOAPI().query(PublisherConstant.BOSUBTABLE_S).bindId(processInstId).list(); * @param id
List<PALRepositoryModel> pList = new ArrayList<>(); * @param isPublish
if (bolistN != null) { * @param isStop
for (BO boN : bolistN) { * @param isApproval
String publishFileId = boN.get("PUBLISHFILEID").toString(); */
PALRepositoryModel palModel = PALRepositoryCache.getCache().get(publishFileId); private void createResultMap(String name, String id, boolean isPublish, boolean isStop, boolean isApproval, List<PALRepositoryModel> pList) {
if (palModel != null && palModel.isPublish()) {// 若当前为非已发布状态则不进行处理 PALRepositoryModelImpl modelImpl = new PALRepositoryModelImpl();
// 若当前流程model.getPalRepositoryId()除此次发布以外存在发布过变更过废止过则退回至停用状态否则退回至设计状态 modelImpl.setId(id);
// List<PublishListHistoryModel> allPublishData = listDao.query("PALREPOSITORYID = ?", publishFileId).list(); modelImpl.setName(name);
List<RowMap> allPublishData = DBSql.getMaps("SELECT ID FROM SYS_COE_PAL_PUBLISH_LIST WHERE PALREPOSITORYID = ?", new Object[] {publishFileId}); modelImpl.setPublish(isPublish);
if (allPublishData != null) { modelImpl.setStop(isStop);
boolean isPublish = false; // modelImpl.setApproval(isApproval);// 不处理
boolean isStop = false; pList.add(modelImpl);
boolean isApproval = false; }
if (allPublishData.size() > 1) {
// 退回至停用状态
isStop = true;
} else {
// 退回至设计状态
}
createResultMap(palModel.getName(), palModel.getId(), isPublish, isStop, isApproval, pList);
}
}
}
}
if (bolistC != null) {
for (BO boC : bolistC) {
String changefileId = boC.get("CHANGEFILEID").toString();// 变更文件id
String changedFileIdNew = boC.get("CHANGEDFILEIDNEW").toString();// 变更后文件id
PALRepositoryModel changeModel = PALRepositoryCache.getCache().get(changefileId);
PALRepositoryModel changeNewModel = PALRepositoryCache.getCache().get(changedFileIdNew);
// 符合该条件可进行复活状态值不符合则暂时不处理
if (changeModel != null && changeNewModel != null && changeModel.isStop() && changeNewModel.isPublish()) {
// changeModel退回至已发布状态
boolean isPublish = true;
boolean isStop = false;
boolean isApproval = false;
createResultMap(changeModel.getName(), changefileId, isPublish, isStop, isApproval, pList);
// List<PublishListHistoryModel> allchangeData = listDao.query("PALREPOSITORYID = ?", changedFileIdNew).list();
List<RowMap> allchangeData = DBSql.getMaps("SELECT ID FROM SYS_COE_PAL_PUBLISH_LIST WHERE PALREPOSITORYID = ?", new Object[] {changedFileIdNew});
if (allchangeData != null) {
isPublish = false;
isStop = false;
isApproval = false;
if (allchangeData.size() > 1) {
// changeNewModel退回至停用状态
isStop = true;
} else {
// changeNewModel退回至设计状态
}
createResultMap(changeNewModel.getName(), changedFileIdNew, isPublish, isStop, isApproval, pList);
}
}
}
}
if (bolistS != null) {
for (BO boS : bolistS) {
String stopFileId = boS.get("STOPFILEID").toString();
PALRepositoryModel stopModel = PALRepositoryCache.getCache().get(stopFileId);
// 已停用且该流程版本下所有流程没有在发布状态的进行退回保证退回之后该流程所有版本中只有一条为已发布状态
if (stopModel != null && stopModel.isStop()) {
List<PALRepositoryModel> stopList = PALRepositoryCache.getByVersionId(stopModel.getVersionId());
boolean flag = false;
for (PALRepositoryModel model : stopList) {
if (model.isPublish()) {
flag = true;
break;
}
}
if (!flag) {
// 退回至已发布状态
boolean isPublish = true;
boolean isStop = false;
boolean isApproval = false;
createResultMap(stopModel.getName(), stopFileId, isPublish, isStop, isApproval, pList);
}
}
}
}
if (pList.size() > 0) {
restoreData(pList, processInstId);
}
}
/**
* 还原数据
* @param pList
* @param processInstId
*/
private void restoreData(List<PALRepositoryModel> pList, String processInstId) {
// 批量处理回退数据
boolean flag = batchHandleRepositoryData(pList);
int r = 0;
if (flag) {
// 删除SYS_COE_PAL_PUBLISH和SYS_COE_PAL_PUBLISH_LIST表数据
PublishHistory dao = new PublishHistory();// 发布结果主表
PublishHistoryModel history = dao.queryBy("PROCESSINSTID = ?", processInstId);
if (history != null) {
r = dao.delete(history.getId());
}
SDK.getLogAPI().consoleInfo("流程状态还原,变更数据[" + pList.size() + "]条");
for (PALRepositoryModel model : pList) {
SDK.getLogAPI().consoleInfo("流程名称:" + model.getName() + "[id=" + model.getId() + ",isPublish=" + model.isPublish() + ",isStop=" + model.isStop() + "]");
}
if (r > 0) {
SDK.getLogAPI().consoleInfo("删除发布结果数据成功[processInstId=" + processInstId + "]");
}
}
}
/**
* 流程数据库状态还原
* @param pList
* @return
*/
private boolean batchHandleRepositoryData(List<PALRepositoryModel> pList) {
boolean completeSuccess = false;
Connection conn = DBSql.open();
PreparedStatement ps = null;
java.sql.ResultSet rset = null;
Timestamp nowTime = new Timestamp(System.currentTimeMillis());
try {
conn.setAutoCommit(false);
String sql = "UPDATE " + PALRepositoryModelImpl.DATABASE_ENTITY + " SET "
+ PALRepositoryModelImpl.FIELD_PL_ISPUBLISH + " =?, "
+ PALRepositoryModelImpl.FIELD_PL_ISSTOP + "= ?,"
+ PALRepositoryModelImpl.FIELD_PL_MODIFYDATE + " = ? WHERE "
+ PALRepositoryModelImpl.FIELD_UUID + "=?";
ps = conn.prepareStatement(sql);
for (int i = 0; i < pList.size(); i++) {
String id = pList.get(i).getId();
int isPublish = pList.get(i).isPublish() ? 1 : 0;
int isStop = pList.get(i).isStop() ? 1 : 0;
ps.setInt(1, isPublish);
ps.setInt(2, isStop);
ps.setTimestamp(3, nowTime);
ps.setString(4, id);
ps.addBatch();
}
int[] results = ps.executeBatch();
for (int i = 0; i < results.length; i++) {
if ((results[i] >= 0) || (results[i] == PreparedStatement.SUCCESS_NO_INFO)) {
completeSuccess = true;
}
}
if (completeSuccess) {
conn.commit();
PALRepository dao = new PALRepository();
for (PALRepositoryModel model : pList) {
PALRepositoryModel model2 = dao.getInstance(model.getId());
if (model2 != null) {
PALRepositoryCache.getCache().put(model2.getId(), model2);
}
}
} else {
conn.rollback();
PALRepositoryCache.getCache().reload();
}
} catch (SQLException e) {
try {
conn.rollback();
} catch (SQLException e1) {
e1.printStackTrace();
}
e.printStackTrace();
} finally {
DBSql.close(conn, ps, rset);
}
return completeSuccess;
}
/**
* 结果集用于批量处理数据源
* @param id
* @param isPublish
* @param isStop
* @param isApproval
*/
private void createResultMap(String name, String id, boolean isPublish, boolean isStop, boolean isApproval, List<PALRepositoryModel> pList) {
PALRepositoryModelImpl modelImpl = new PALRepositoryModelImpl();
modelImpl.setId(id);
modelImpl.setName(name);
modelImpl.setPublish(isPublish);
modelImpl.setStop(isStop);
// modelImpl.setApproval(isApproval);// 不处理
pList.add(modelImpl);
}
} }

View File

@ -12,60 +12,60 @@ import com.actionsoft.bpms.form.design.model.FormItemModel;
public class SubFormGridFilterListener extends FormGridFilterListener { public class SubFormGridFilterListener extends FormGridFilterListener {
@Override @Override
public FormGridRowLookAndFeel acceptRowData(ProcessExecutionContext context, List<BOItemModel> boItemList, BO boData) { public FormGridRowLookAndFeel acceptRowData(ProcessExecutionContext context, List<BOItemModel> boItemList, BO boData) {
String tableName = context.getParameterOfString(ListenerConst.FORM_EVENT_PARAM_BONAME); String tableName = context.getParameterOfString(ListenerConst.FORM_EVENT_PARAM_BONAME);
if (tableName.equals("BO_ACT_COE_PUBLISH_N")) { if (tableName.equals("BO_ACT_COE_PUBLISH_N")) {
//创建一个对象 //创建一个对象
FormGridRowLookAndFeel diyLookAndFeel = new FormGridRowLookAndFeel(); FormGridRowLookAndFeel diyLookAndFeel = new FormGridRowLookAndFeel();
String fileName = boData.getString("PUBLISHFILENAME"); String fileName = boData.getString("PUBLISHFILENAME");
if (fileName != null) { if (fileName != null) {
boData.set("PUBLISHFILENAME", "<a style=\"cursor: pointer; color: rgb(51, 131, 218);\" onclick=\"openModel(\'" + boData.getString("PUBLISHFILEID") + "\')\">" + fileName + "</a>");// 重新设定一个字段的值 boData.set("PUBLISHFILENAME", "<a style=\"cursor: pointer; color: rgb(51, 131, 218);\" onclick=\"openModel(\'" + boData.getString("PUBLISHFILEID") + "\')\">" + fileName + "</a>");// 重新设定一个字段的值
} }
boData.set("字段子表字段名", "|");
boData.set("字段子表字段名", "|"); //处理好之后将该对象返回
return diyLookAndFeel;
} else if (tableName.equals("BO_ACT_COE_PUBLISH_C")) {
//创建一个对象
FormGridRowLookAndFeel diyLookAndFeel = new FormGridRowLookAndFeel();
String fileName1 = boData.getString("CHANGEFILENAME");
if (fileName1 != null) {
boData.set("CHANGEFILENAME", "<a style=\"cursor: pointer; color: rgb(51, 131, 218);\" onclick=\"openModel(\'" + boData.getString("CHANGEFILEID") + "\')\">" + fileName1 + "</a>");// 重新设定一个字段的值
}
String fileName2 = boData.getString("CHANGEDFILENAMENEW");
if (fileName2 != null) {
boData.set("CHANGEDFILENAMENEW", "<a style=\"cursor: pointer; color: rgb(51, 131, 218);\" onclick=\"openModel(\'" + boData.getString("CHANGEDFILEIDNEW") + "\')\">" + fileName2 + "</a>");// 重新设定一个字段的值
}
boData.set("字段子表字段名", "|");
//处理好之后将该对象返回 //处理好之后将该对象返回
return diyLookAndFeel; return diyLookAndFeel;
} else if (tableName.equals("BO_ACT_COE_PUBLISH_C")) { } else if (tableName.equals("BO_ACT_COE_PUBLISH_S")) {
//创建一个对象 //创建一个对象
FormGridRowLookAndFeel diyLookAndFeel = new FormGridRowLookAndFeel(); FormGridRowLookAndFeel diyLookAndFeel = new FormGridRowLookAndFeel();
String fileName1 = boData.getString("CHANGEFILENAME"); String fileName = boData.getString("STOPFILENAME");
if (fileName1 != null) { if (fileName != null) {
boData.set("CHANGEFILENAME", "<a style=\"cursor: pointer; color: rgb(51, 131, 218);\" onclick=\"openModel(\'" + boData.getString("CHANGEFILEID") + "\')\">" + fileName1 + "</a>");// 重新设定一个字段的值 boData.set("STOPFILENAME", "<a style=\"cursor: pointer; color: rgb(51, 131, 218);\" onclick=\"openModel(\'" + boData.getString("STOPFILEID") + "\')\">" + fileName + "</a>");// 重新设定一个字段的值
} }
String fileName2 = boData.getString("CHANGEDFILENAMENEW"); boData.set("字段子表字段名", "|");
if (fileName2 != null) {
boData.set("CHANGEDFILENAMENEW", "<a style=\"cursor: pointer; color: rgb(51, 131, 218);\" onclick=\"openModel(\'" + boData.getString("CHANGEDFILEIDNEW") + "\')\">" + fileName2 + "</a>");// 重新设定一个字段的值
}
boData.set("字段子表字段名", "|"); //处理好之后将该对象返回
return diyLookAndFeel;
}
return null;
}
//处理好之后将该对象返回 @Override
return diyLookAndFeel; public String getCustomeTableHeaderHtml(ProcessExecutionContext arg0, FormItemModel arg1, List<String> arg2) {
} else if (tableName.equals("BO_ACT_COE_PUBLISH_S")) { return null;
//创建一个对象 }
FormGridRowLookAndFeel diyLookAndFeel = new FormGridRowLookAndFeel();
String fileName = boData.getString("STOPFILENAME");
if (fileName != null) {
boData.set("STOPFILENAME", "<a style=\"cursor: pointer; color: rgb(51, 131, 218);\" onclick=\"openModel(\'" + boData.getString("STOPFILEID") + "\')\">" + fileName + "</a>");// 重新设定一个字段的值
}
boData.set("字段子表字段名", "|");
//处理好之后将该对象返回 @Override
return diyLookAndFeel; public String orderByStatement(ProcessExecutionContext arg0) {
} return null;
return null; }
}
@Override
public String getCustomeTableHeaderHtml(ProcessExecutionContext arg0, FormItemModel arg1, List<String> arg2) {
return null;
}
@Override
public String orderByStatement(ProcessExecutionContext arg0) {
return null;
}
} }

View File

@ -6,8 +6,8 @@
<title>demo</title> <title>demo</title>
<style></style> <style></style>
<script>var sid = '<#sid>'; <script>var sid = '<#sid>';
var url = window.location.href; var url = window.location.href;
var portalUrl = url.substring(0, url.indexOf('?'));</script> var portalUrl = url.substring(0, url.indexOf('?'));</script>
<link href=../apps/com.actionsoft.apps.coe.pal.publisher/dist/static/css/app.9457c8466bc9dd2592dfa47091fb8c98.css rel=stylesheet> <link href=../apps/com.actionsoft.apps.coe.pal.publisher/dist/static/css/app.9457c8466bc9dd2592dfa47091fb8c98.css rel=stylesheet>
</head> </head>
<body style="overflow-y: hidden"> <body style="overflow-y: hidden">

View File

@ -1,6 +1,6 @@
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Publisher Home</title> <title>Publisher Home</title>
<!-- js --> <!-- js -->
@ -9,222 +9,222 @@
<script src="../commons/js/jquery/scripts/ui/awsui.pagination.js"></script> <script src="../commons/js/jquery/scripts/ui/awsui.pagination.js"></script>
<!-- css --> <!-- css -->
<link rel="stylesheet" href="../commons/css/awsui.css"> <link rel="stylesheet" href="../commons/css/awsui.css">
<script type="text/javascript" src="../apps/com.actionsoft.apps.coe.pal.publisher/js/publish.home.js"></script> <script type="text/javascript" src="../apps/com.actionsoft.apps.coe.pal.publisher/js/publish.home.js"></script>
<style type="text/css"> <style type="text/css">
.network_tabs{ .network_tabs{
font-size: 15px; font-size: 15px;
} }
.network_tabs a{ .network_tabs a{
cursor: pointer; cursor: pointer;
padding: 7px 12px; padding: 7px 12px;
} }
.network_tabs a.active{ .network_tabs a.active{
font-weight: 700; font-weight: 700;
border-bottom: solid 4px #3383da; border-bottom: solid 4px #3383da;
} }
.span_margin{ .span_margin{
margin-right: 20px; margin-right: 20px;
} }
.tbody tr td{ .tbody tr td{
padding: 8px; padding: 8px;
text-align: center; text-align: center;
border-bottom: solid 1px #cecece; border-bottom: solid 1px #cecece;
} }
.task_tr{ .task_tr{
cursor: pointer; cursor: pointer;
} }
.task_no_read{ .task_no_read{
font-weight: bold; font-weight: bold;
} }
.text_center{ .text_center{
text-align: center; text-align: center;
} }
.page_buttom{ .page_buttom{
position: absolute; position: absolute;
} }
.text-overflow{ .text-overflow{
white-space: nowrap; white-space: nowrap;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
-o-text-overflow: ellipsis;/*Opera下实现ellipsis效果*/ -o-text-overflow: ellipsis;/*Opera下实现ellipsis效果*/
} }
</style> </style>
</head> </head>
<body style="overflow-y: hidden;"> <body style="overflow-y: hidden;">
<div style="width: 100%; display: inline-block; height: 100%;"> <div style="width: 100%; display: inline-block; height: 100%;">
<div class="network_tabs" id="nav" style="width: 96%; margin: 20px auto;"> <div class="network_tabs" id="nav" style="width: 96%; margin: 20px auto;">
<a tit="todo" class="active">待办</a> <a tit="todo" class="active">待办</a>
<a tit="done">已办</a> <a tit="done">已办</a>
<a tit="history">发布历史</a> <a tit="history">发布历史</a>
<button id="addPulishInstance" type="button" class="button blue" onclick="toAddPublish()" style="<#create>">新建</button> <button id="addPulishInstance" type="button" class="button blue" onclick="toAddPublish()" style="<#create>">新建</button>
<button id="removePulishInstance" type="button" class="button red" onclick="removePublishInstance()" style="display: none;">删除</button> <button id="removePulishInstance" type="button" class="button red" onclick="removePublishInstance()" style="display: none;">删除</button>
</div> </div>
<div id="content" style="margin-left: 20px; height: 100%;"> <div id="content" style="margin-left: 20px; height: 100%;">
<div tit="todo"> <div tit="todo">
<table class="awsui-ux"> <table class="awsui-ux">
<tbody><tr> <tbody><tr>
<td> <td>
<table class="table table-thin table-striped table-hover"> <table class="table table-thin table-striped table-hover">
<thead> <thead>
<tr> <tr>
<th class="width_10 selectall">序号</th> <th class="width_10 selectall">序号</th>
<th class="width_10"> <th class="width_10">
<input class="awsui-checkbox" id="select_all" type="checkbox" /> <input class="awsui-checkbox" id="select_all" type="checkbox" />
</th> </th>
<th class="width_45">标题</th> <th class="width_45">标题</th>
<th class="width_10">来自</th> <th class="width_10">来自</th>
<th class="width_25">日期</th> <th class="width_25">日期</th>
</tr> </tr>
</thead> </thead>
<tbody id="tbody1"> <tbody id="tbody1">
</tbody> </tbody>
</table> </table>
</td> </td>
</tr> </tr>
</tbody></table> </tbody></table>
<div id="Pagination1" class="page_buttom"></div> <div id="Pagination1" class="page_buttom"></div>
</div> </div>
<div tit="done" style="display: none;"> <div tit="done" style="display: none;">
<table class="awsui-ux"> <table class="awsui-ux">
<tbody><tr> <tbody><tr>
<td> <td>
<table class="table table-thin table-striped table-hover"> <table class="table table-thin table-striped table-hover">
<thead> <thead>
<tr> <tr>
<th class="width_10 selectall">序号</th> <th class="width_10 selectall">序号</th>
<th class="width_45">标题</th> <th class="width_45">标题</th>
<th class="width_15">来自</th> <th class="width_15">来自</th>
<th class="width_30">日期</th> <th class="width_30">日期</th>
</tr> </tr>
</thead> </thead>
<tbody id="tbody2"> <tbody id="tbody2">
</tbody> </tbody>
</table> </table>
</td> </td>
</tr> </tr>
</tbody></table> </tbody></table>
<div id="Pagination2" class="page_buttom"></div> <div id="Pagination2" class="page_buttom"></div>
</div> </div>
<div tit="history" style="display: none; height: 100%;"> <div tit="history" style="display: none; height: 100%;">
<iframe width="100%" id="pl_publish_iframe_page" name="pl_publish_iframe" frameBorder="0" style="height: 90%;"></iframe> <iframe width="100%" id="pl_publish_iframe_page" name="pl_publish_iframe" frameBorder="0" style="height: 90%;"></iframe>
<!--<table class="awsui-ux"> <!--<table class="awsui-ux">
<tbody><tr> <tbody><tr>
<td> <td>
<table class="table table-thin table-striped table-hover"> <table class="table table-thin table-striped table-hover">
<thead> <thead>
<tr> <tr>
<th class="width_10 selectall">序号</th> <th class="width_10 selectall">序号</th>
<th class="width_45">标题</th> <th class="width_45">标题</th>
<th class="width_15">来自</th> <th class="width_15">来自</th>
<th class="width_30">日期</th> <th class="width_30">日期</th>
</tr> </tr>
</thead> </thead>
<tbody id="tbody3"> <tbody id="tbody3">
</tbody> </tbody>
</table> </table>
</td> </td>
</tr> </tr>
</tbody></table> </tbody></table>
<div id="Pagination3" class="page_buttom"></div>--> <div id="Pagination3" class="page_buttom"></div>-->
</div> </div>
</div> </div>
</div> </div>
<div id="add_div" style="width: 100%; display: none;">
<div class="awsui-toolbar">
<span class="toolbarText" style="font-size: 18px;"><#title></span>
<span class="button blue align-right" onclick="addPublishInstance()">下一步</span>
<span class="button align-right" onclick="giveUp()">放 弃</span>
</div>
<table class="awsui-ux">
<tbody>
<tr>
<td width="15%">标题(便于检索)</td>
<td><span class="required"><input class="txt" type="text" id="title" value="<#title>" maxlength="120"></span></td>
</tr>
<tr>
<td>发起人</td>
<td><#userName></td>
</tr>
</tbody>
</table>
</div>
<div style="display:none;">
<form id="openNewPage" name="openNewPage" target="_blank" method="post" action="./w">
<input id="cmd" name="cmd" value="com.actionsoft.apps.coe.pal.publisher_handle">
<input name="sid" value="<#sid>">
<input id="processInstId" name="processInstId" value="">
<input id="taskInstId" name="taskInstId" value="">
<input id="openState" name="openState" value="">
</form>
</div>
<input type="hidden" name="sid" id="sid" value="<#sid>" />
<input type="hidden" name="wsId" id="wsId" value="<#wsId>" />
<input type="hidden" name="teamId" id="teamId" value="<#teamId>" />
<input type="hidden" name="teamName" id="teamName" value="<#teamName>" />
<input type="hidden" name="appId" id="appId" value="<#appId>" />
<div id="add_div" style="width: 100%; display: none;"> </body>
<div class="awsui-toolbar">
<span class="toolbarText" style="font-size: 18px;"><#title></span> <script type="text/javascript">
<span class="button blue align-right" onclick="addPublishInstance()">下一步</span> var totalData1 = <#totalData1>;
<span class="button align-right" onclick="giveUp()">放 弃</span> var totalData2 = <#totalData2>;
</div> var totalData3 = <#totalData3>;
<table class="awsui-ux"> var currentpage1 = 0;//当前页数
<tbody> var currentpage2 = 0;//当前页数
<tr> var currentpage3 = 0;//当前页数
<td width="15%">标题(便于检索)</td>
<td><span class="required"><input class="txt" type="text" id="title" value="<#title>" maxlength="120"></span></td> var pageLimit = 10;//每页显示条数
</tr> var showItem = 10;//显示分页按钮数量
<tr> var title = "<#title>";
<td>发起人</td>
<td><#userName></td>
</tr>
</tbody>
</table>
</div>
<div style="display:none;">
<form id="openNewPage" name="openNewPage" target="_blank" method="post" action="./w">
<input id="cmd" name="cmd" value="com.actionsoft.apps.coe.pal.publisher_handle">
<input name="sid" value="<#sid>">
<input id="processInstId" name="processInstId" value="">
<input id="taskInstId" name="taskInstId" value="">
<input id="openState" name="openState" value="">
</form>
</div>
<input type="hidden" name="sid" id="sid" value="<#sid>" />
<input type="hidden" name="wsId" id="wsId" value="<#wsId>" />
<input type="hidden" name="teamId" id="teamId" value="<#teamId>" />
<input type="hidden" name="teamName" id="teamName" value="<#teamName>" />
<input type="hidden" name="appId" id="appId" value="<#appId>" />
</body> $(function(){
title = "<#title>";
<script type="text/javascript">
var totalData1 = <#totalData1>; $(".network_tabs").find("a[tit]").on("click", function(){
var totalData2 = <#totalData2>; var appId = $(this).attr("tit");
var totalData3 = <#totalData3>; $(this).siblings().removeClass("active");
var currentpage1 = 0;//当前页数 $(this).addClass("active");
var currentpage2 = 0;//当前页数 $("#content").find("div[tit]").hide();
var currentpage3 = 0;//当前页数 $("#content").find("div[tit='"+$(this).attr("tit")+"']").show();
var pageLimit = 10;//每页显示条数 if (appId == "todo") {
var showItem = 10;//显示分页按钮数量 loadOutputData1(0, 10, initPage1);
var title = "<#title>"; } else if (appId == "done") {
loadOutputData2(0, 10, initPage2);
$(function(){ } else if (appId == "history") {
title = "<#title>"; //loadOutputData3(0, 10, initPage3);
loadHistoryRecord();
$(".network_tabs").find("a[tit]").on("click", function(){ }
var appId = $(this).attr("tit"); });
$(this).siblings().removeClass("active");
$(this).addClass("active"); loadOutputData1(0, 10, initPage1);
$("#content").find("div[tit]").hide();
$("#content").find("div[tit='"+$(this).attr("tit")+"']").show(); $("#select_all").check().on("ifChanged", function(){
var isChecked = $(this).prop("checked");
if (appId == "todo") { if (isChecked) {
loadOutputData1(0, 10, initPage1); $("#tbody1 .awsui-checkbox").check("option", "checked", true);
} else if (appId == "done") { } else {
loadOutputData2(0, 10, initPage2); $("#tbody1 .awsui-checkbox").check("option", "checked", false);
} else if (appId == "history") { }
//loadOutputData3(0, 10, initPage3); })
loadHistoryRecord();
} $(window).trigger('resize');
}); })
loadOutputData1(0, 10, initPage1); $(window).resize(function(){
var totalWidth = $('#content').width() - 40;
$("#select_all").check().on("ifChanged", function(){ $("[class*=width_]").each(function(){
var isChecked = $(this).prop("checked"); var className = $(this).attr("class");
if (isChecked) { var percent = parseInt(className.substr(6, 2));
$("#tbody1 .awsui-checkbox").check("option", "checked", true); $(this).css({"width" : totalWidth*percent/100});
} else { });
$("#tbody1 .awsui-checkbox").check("option", "checked", false); })
} </script>
})
$(window).trigger('resize');
})
$(window).resize(function(){
var totalWidth = $('#content').width() - 40;
$("[class*=width_]").each(function(){
var className = $(this).attr("class");
var percent = parseInt(className.substr(6, 2));
$(this).css({"width" : totalWidth*percent/100});
});
})
</script>
</html> </html>

View File

@ -1,6 +1,6 @@
<!DOCTYPE html><html lang=en><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1"><link rel=icon href=../apps/com.actionsoft.apps.coe.pal.publisher/main/favicon.ico><title>com.actionsoft.apps.coe.pal.publisher</title><script>const settingParam = <#settingParam>; <!DOCTYPE html><html lang=en><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><meta name=viewport content="width=device-width,initial-scale=1"><link rel=icon href=../apps/com.actionsoft.apps.coe.pal.publisher/main/favicon.ico><title>com.actionsoft.apps.coe.pal.publisher</title><script>const settingParam = <#settingParam>;
const axiosBaseUrl = "./"; const axiosBaseUrl = "./";
const production = true;</script><script>var wsId = "<#wsId>"; const production = true;</script><script>var wsId = "<#wsId>";
var teamId = '<#teamId>'; var teamId = '<#teamId>';
var teamName = '<#teamName>'; var teamName = '<#teamName>';
var title = '<#title>';</script><link href=../apps/com.actionsoft.apps.coe.pal.publisher/main/css/chunk-8ab0b442.8d291593.css rel=prefetch><link href=../apps/com.actionsoft.apps.coe.pal.publisher/main/js/chunk-2d224ef1.ab17ea19.js rel=prefetch><link href=../apps/com.actionsoft.apps.coe.pal.publisher/main/js/chunk-8ab0b442.8140534f.js rel=prefetch><link href=../apps/com.actionsoft.apps.coe.pal.publisher/main/css/app.f37b6b5a.css rel=preload as=style><link href=../apps/com.actionsoft.apps.coe.pal.publisher/main/js/app.1bf9b24e.js rel=preload as=script><link href=../apps/com.actionsoft.apps.coe.pal.publisher/main/js/chunk-vendors.060d0032.js rel=preload as=script><link href=../apps/com.actionsoft.apps.coe.pal.publisher/main/css/app.f37b6b5a.css rel=stylesheet></head><body style=margin:0;><div id=app></div><script src=../apps/com.actionsoft.apps.coe.pal.publisher/main/js/chunk-vendors.060d0032.js></script><script src=../apps/com.actionsoft.apps.coe.pal.publisher/main/js/app.1bf9b24e.js></script></body></html> var title = '<#title>';</script><link href=../apps/com.actionsoft.apps.coe.pal.publisher/main/css/chunk-8ab0b442.8d291593.css rel=prefetch><link href=../apps/com.actionsoft.apps.coe.pal.publisher/main/js/chunk-2d224ef1.ab17ea19.js rel=prefetch><link href=../apps/com.actionsoft.apps.coe.pal.publisher/main/js/chunk-8ab0b442.8140534f.js rel=prefetch><link href=../apps/com.actionsoft.apps.coe.pal.publisher/main/css/app.f37b6b5a.css rel=preload as=style><link href=../apps/com.actionsoft.apps.coe.pal.publisher/main/js/app.1bf9b24e.js rel=preload as=script><link href=../apps/com.actionsoft.apps.coe.pal.publisher/main/js/chunk-vendors.060d0032.js rel=preload as=script><link href=../apps/com.actionsoft.apps.coe.pal.publisher/main/css/app.f37b6b5a.css rel=stylesheet></head><body style=margin:0;><div id=app></div><script src=../apps/com.actionsoft.apps.coe.pal.publisher/main/js/chunk-vendors.060d0032.js></script><script src=../apps/com.actionsoft.apps.coe.pal.publisher/main/js/app.1bf9b24e.js></script></body></html>

View File

@ -9,208 +9,208 @@ var wing_event_keyCode;
var autoIndex; var autoIndex;
var autoLenght; var autoLenght;
$.fn.myAutoInput = function(url) { $.fn.myAutoInput = function(url) {
autoURL=url; autoURL=url;
var obj = $(this); var obj = $(this);
obj.keyup(function(event){ obj.keyup(function(event){
//alert(event.keyCode); //alert(event.keyCode);
wing_event_keyCode=event.keyCode; wing_event_keyCode=event.keyCode;
autoVal=this.value; autoVal=this.value;
autoInputObj=obj; autoInputObj=obj;
var auto = document.getElementById('autoDiv'); var auto = document.getElementById('autoDiv');
if (wing_event_keyCode == 40 && auto.style.display == 'block') { if (wing_event_keyCode == 40 && auto.style.display == 'block') {
$("#autoDiv"+autoIndex).css("backgroundImage","url('')"); $("#autoDiv"+autoIndex).css("backgroundImage","url('')");
$("#autoDiv"+autoIndex).css("color","black"); $("#autoDiv"+autoIndex).css("color","black");
$("#autoDiv"+autoIndex).css("fontWeight","normal"); $("#autoDiv"+autoIndex).css("fontWeight","normal");
if(autoIndex>=autoLenght-1) if(autoIndex>=autoLenght-1)
{ {
$("#autoDiv0").get(0).style.backgroundImage="url('../apps/com.actionsoft.apps.coe.pal/img/pl/link.png')"; $("#autoDiv0").get(0).style.backgroundImage="url('../apps/com.actionsoft.apps.coe.pal/img/pl/link.png')";
$("#autoDiv0").css("color","white"); $("#autoDiv0").css("color","white");
//$("#autoDiv0").css("fontWeight","bold"); //$("#autoDiv0").css("fontWeight","bold");
autoIndex=0; autoIndex=0;
}else }else
{ {
autoIndex++; autoIndex++;
$("#autoDiv"+(autoIndex)).get(0).style.backgroundImage="url('../apps/com.actionsoft.apps.coe.pal/img/pl/link.png')"; $("#autoDiv"+(autoIndex)).get(0).style.backgroundImage="url('../apps/com.actionsoft.apps.coe.pal/img/pl/link.png')";
$("#autoDiv"+autoIndex).css("color","white"); $("#autoDiv"+autoIndex).css("color","white");
//$("#autoDiv"+autoIndex).css("fontWeight","bold"); //$("#autoDiv"+autoIndex).css("fontWeight","bold");
} }
//autoInputObj.get(0).value=$("#autoDiv"+autoIndex).data("value"); //autoInputObj.get(0).value=$("#autoDiv"+autoIndex).data("value");
return; return;
}else if (wing_event_keyCode == 38 && auto.style.display == 'block') { }else if (wing_event_keyCode == 38 && auto.style.display == 'block') {
$("#autoDiv"+autoIndex).css("backgroundImage","url('')"); $("#autoDiv"+autoIndex).css("backgroundImage","url('')");
$("#autoDiv"+autoIndex).css("color","black"); $("#autoDiv"+autoIndex).css("color","black");
$("#autoDiv"+autoIndex).css("fontWeight","normal"); $("#autoDiv"+autoIndex).css("fontWeight","normal");
if(autoIndex<=0) if(autoIndex<=0)
{ {
$("#autoDiv"+(autoLenght-1)).get(0).style.backgroundImage="url('../apps/com.actionsoft.apps.coe.pal/img/pl/link.png')"; $("#autoDiv"+(autoLenght-1)).get(0).style.backgroundImage="url('../apps/com.actionsoft.apps.coe.pal/img/pl/link.png')";
$("#autoDiv"+(autoLenght-1)).css("color","white"); $("#autoDiv"+(autoLenght-1)).css("color","white");
//$("#autoDiv"+(autoLenght-1)).css("fontWeight","bold"); //$("#autoDiv"+(autoLenght-1)).css("fontWeight","bold");
autoIndex=autoLenght-1; autoIndex=autoLenght-1;
}else }else
{ {
autoIndex--; autoIndex--;
$("#autoDiv"+(autoIndex)).get(0).style.backgroundImage="url('../apps/com.actionsoft.apps.coe.pal/img/pl/link.png')"; $("#autoDiv"+(autoIndex)).get(0).style.backgroundImage="url('../apps/com.actionsoft.apps.coe.pal/img/pl/link.png')";
$("#autoDiv"+autoIndex).css("color","white"); $("#autoDiv"+autoIndex).css("color","white");
//$("#autoDiv"+autoIndex).css("fontWeight","bold"); //$("#autoDiv"+autoIndex).css("fontWeight","bold");
} }
//autoInputObj.get(0).value=$("#autoDiv"+autoIndex).data("value"); //autoInputObj.get(0).value=$("#autoDiv"+autoIndex).data("value");
return; return;
}else if (event.keyCode == 27) {//ESC }else if (event.keyCode == 27) {//ESC
document.getElementById('autoDiv').style.display = 'none'; document.getElementById('autoDiv').style.display = 'none';
return; return;
}else if (event.keyCode == 13)//ENTER }else if (event.keyCode == 13)//ENTER
{ {
//autoInputObj.get(0).value=$("#autoDiv"+autoIndex).data("value"); //autoInputObj.get(0).value=$("#autoDiv"+autoIndex).data("value");
setValue($("#autoDiv"+autoIndex).data("value"),$("#autoDiv"+autoIndex).data("name")); setValue($("#autoDiv"+autoIndex).data("value"),$("#autoDiv"+autoIndex).data("name"));
document.getElementById('autoDiv').style.display = 'none'; document.getElementById('autoDiv').style.display = 'none';
return ; return ;
}else }else
{ {
autoIndex=-1; autoIndex=-1;
} }
//auto.style.display = 'none'; //auto.style.display = 'none';
if(wing_event_keyCode==8) if(wing_event_keyCode==8)
{ {
autoCountWait=autoCount; autoCountWait=autoCount;
} }
if(autoVal!=''){ if(autoVal!=''){
setTimeout("autoAjaxWaitFn()",autoTime); setTimeout("autoAjaxWaitFn()",autoTime);
autoCount++; autoCount++;
}else{ }else{
document.getElementById("autoDiv").style.display='none'; document.getElementById("autoDiv").style.display='none';
} }
}); });
return obj; return obj;
} }
function autoAjaxWaitFn() function autoAjaxWaitFn()
{ {
autoCountWait++; autoCountWait++;
if(autoCountWait!=autoCount) if(autoCountWait!=autoCount)
{ {
return; return;
} }
if (autoURL == "") { if (autoURL == "") {
return; return;
} }
if (autoVal != " ") { if (autoVal != " ") {
autoVal = autoVal.trim(); autoVal = autoVal.trim();
} }
if (autoVal == "") { if (autoVal == "") {
return; return;
} }
$.post(autoURL, {"autoContent":autoVal,"cmd":"com.actionsoft.apps.coe.pal_processlevel_query","sid":jQuery("#sid").val(),"wsid":jQuery("#wsId").val()},autoajax, "json"); $.post(autoURL, {"autoContent":autoVal,"cmd":"com.actionsoft.apps.coe.pal_processlevel_query","sid":jQuery("#sid").val(),"wsid":jQuery("#wsId").val()},autoajax, "json");
} }
function autoajax(msg) { function autoajax(msg) {
$("#autoDiv").html(""); $("#autoDiv").html("");
var auto = document.getElementById('autoDiv'); var auto = document.getElementById('autoDiv');
var txt = autoInputObj.get(0); var txt = autoInputObj.get(0);
if (msg == ""){ if (msg == ""){
auto.style.display = 'none'; auto.style.display = 'none';
return; return;
} }
autoLenght=msg.length; autoLenght=msg.length;
for(var i=0;i<autoLenght;i++){ for(var i=0;i<autoLenght;i++){
var icon; var icon;
var margin; var margin;
if (msg[i].type == "default") { if (msg[i].type == "default") {
icon = ""; icon = "";
margin = "margin-left:25px;" margin = "margin-left:25px;"
} else { } else {
margin = "margin-left:5px;"; margin = "margin-left:5px;";
icon = "<div onclick='open_desginer(this)' style='display:inline-block; cursor:pointer;'><img style='height:20px;' src='../apps/com.actionsoft.apps.coe.pal/img/icon/open3.png'></div>"; icon = "<div onclick='open_desginer(this)' style='display:inline-block; cursor:pointer;'><img style='height:20px;' src='../apps/com.actionsoft.apps.coe.pal/img/icon/open3.png'></div>";
} }
$("#autoDiv").append("<div id='autoDiv"+i+"' class='aotuDivcontenr' onMouseOver='aotu_Move(this)' onMouseOut='aotu_Out(this)' style='min-weight:98%;text-align:left;background-color:white;padding-top: 5px;padding-left: 2px;padding-right: 5px;height:20px'>" $("#autoDiv").append("<div id='autoDiv"+i+"' class='aotuDivcontenr' onMouseOver='aotu_Move(this)' onMouseOut='aotu_Out(this)' style='min-weight:98%;text-align:left;background-color:white;padding-top: 5px;padding-left: 2px;padding-right: 5px;height:20px'>"
+ icon + icon
+ "<span onclick='aotu_clike(this)' style='cursor:pointer; display:inline-block;" + margin + "'>" + msg[i].ui + "</span>" + "<span onclick='aotu_clike(this)' style='cursor:pointer; display:inline-block;" + margin + "'>" + msg[i].ui + "</span>"
+ "</div>"); + "</div>");
$("#autoDiv"+i).data("value",msg[i].value); $("#autoDiv"+i).data("value",msg[i].value);
$("#autoDiv"+i).data("name",msg[i].name); $("#autoDiv"+i).data("name",msg[i].name);
} }
// 锟斤拷锟矫诧拷锟轿伙拷锟<E68BB7> // 锟斤拷锟矫诧拷锟轿伙拷锟<E68BB7>
var x = autoInputObj.offset().left; var x = autoInputObj.offset().left;
var y = autoInputObj.offset().top ; var y = autoInputObj.offset().top ;
var wing_auto=$(auto); var wing_auto=$(auto);
wing_auto.css("left",x); wing_auto.css("left",x);
wing_auto.css("top",y + txt.offsetHeight); wing_auto.css("top",y + txt.offsetHeight);
$("#autoDiv").css("minWidth",txt.offsetWidth); $("#autoDiv").css("minWidth",txt.offsetWidth);
// 锟斤拷锟斤拷锟斤拷锟斤拷锟绞撅拷锟<E68BB7> // 锟斤拷锟斤拷锟斤拷锟斤拷锟绞撅拷锟<E68BB7>
if (autoLenght == 1 && $("#autoDiv0").data("value") == txt.value) { if (autoLenght == 1 && $("#autoDiv0").data("value") == txt.value) {
auto.style.display = 'none'; auto.style.display = 'none';
} }
else { else {
auto.style.display = 'block'; auto.style.display = 'block';
} }
} }
$(function(){ $(function(){
hwTime(); hwTime();
$("body").prepend("<div id='autoDiv' style=\"display: none;position: absolute;z-index:999;border-style:solid;border-width:1px;border-top-width:1px; border-color:gray;background-color: white;box-shadow: 1px 1px 10px #909090;')\"></div>"); $("body").prepend("<div id='autoDiv' style=\"display: none;position: absolute;z-index:999;border-style:solid;border-width:1px;border-top-width:1px; border-color:gray;background-color: white;box-shadow: 1px 1px 10px #909090;')\"></div>");
$("#autoDiv").keydown(function(event){ $("#autoDiv").keydown(function(event){
if(event.keyCode == 8) if(event.keyCode == 8)
{ {
event.keyCode=27; event.keyCode=27;
var obj=autoInputObj.get(0); var obj=autoInputObj.get(0);
obj.focus(); obj.focus();
obj.value=obj.value.slice(0,obj.value.length); obj.value=obj.value.slice(0,obj.value.length);
} }
if (event.keyCode == 27) { if (event.keyCode == 27) {
document.getElementById('autoDiv').style.display = 'none'; document.getElementById('autoDiv').style.display = 'none';
} }
}); });
}); });
function hwTime() function hwTime()
{ {
//autoCountWait=autoCount; //autoCountWait=autoCount;
//setTimeout("hwTime()",2000); //setTimeout("hwTime()",2000);
} }
function divEvent2() { function divEvent2() {
try{ try{
document.getElementById('autoDiv').style.display = 'none'; document.getElementById('autoDiv').style.display = 'none';
}catch(e){ }catch(e){
} }
} }
document.onclick = divEvent2; document.onclick = divEvent2;
function aotu_Move(obj) function aotu_Move(obj)
{ {
$(".aotuDivcontenr").css({"backgroundImage":"none","color":"black","fontWeight":"normal"}); $(".aotuDivcontenr").css({"backgroundImage":"none","color":"black","fontWeight":"normal"});
obj.style.backgroundImage="url('../apps/com.actionsoft.apps.coe.pal/img/pl/link.png')"; obj.style.backgroundImage="url('../apps/com.actionsoft.apps.coe.pal/img/pl/link.png')";
autoIndex=obj.id.substring(obj.id.length-1); autoIndex=obj.id.substring(obj.id.length-1);
obj.style.color="white"; obj.style.color="white";
} }
function aotu_Out(obj) function aotu_Out(obj)
{ {
obj.style.backgroundImage=""; obj.style.backgroundImage="";
obj.style.color="black"; obj.style.color="black";
obj.style.fontWeight="normal"; obj.style.fontWeight="normal";
} }
function aotu_clike(obj) function aotu_clike(obj)
{ {
obj = obj.parentElement; obj = obj.parentElement;
var id=obj.id.substring(6+1,obj.id.length); var id=obj.id.substring(6+1,obj.id.length);
setValue($("#autoDiv"+id).data("value"),$("#autoDiv"+id).data("name")); setValue($("#autoDiv"+id).data("value"),$("#autoDiv"+id).data("name"));
} }
function setValue(uuid,name) function setValue(uuid,name)
{ {
$.ajax({ $.ajax({
url:'./w?cmd=com.actionsoft.apps.coe.pal_processlevel_query_check&sid='+$('#sid').val()+'&uuid='+uuid, url:'./w?cmd=com.actionsoft.apps.coe.pal_processlevel_query_check&sid='+$('#sid').val()+'&uuid='+uuid,
async:false, async:false,
success:function(msg){ success:function(msg){
if(msg!="") if(msg!="")
{ {
autoInputObj.get(0).value=""; autoInputObj.get(0).value="";
openDesginer(msg, 0, "", "", "", false, "0"); openDesginer(msg, 0, "", "", "", false, "0");
} }
} }
}) })
} }
function open_desginer(obj){ function open_desginer(obj){
obj = obj.parentElement; obj = obj.parentElement;
var id = obj.id.substring(6+1,obj.id.length); var id = obj.id.substring(6+1,obj.id.length);
repositoryTree.selectNode($("#autoDiv"+id).data("value"),true); repositoryTree.selectNode($("#autoDiv"+id).data("value"),true);
openDesginer($("#autoDiv"+id).data("value"), '0',$("#autoDiv"+id).data("name"),'', '',''); openDesginer($("#autoDiv"+id).data("value"), '0',$("#autoDiv"+id).data("name"),'', '','');
} }

View File

@ -1,23 +1,23 @@
$(document) .ready( $(document) .ready(
function() { function() {
setTimeout(function() { setTimeout(function() {
setting.dataModel = { setting.dataModel = {
data : data data : data
}; };
checkTree = awsui.tree.init($("#tree"), setting); checkTree = awsui.tree.init($("#tree"), setting);
}, 100); }, 100);
} }
); );
var CoEProcessPublishAdd = { var CoEProcessPublishAdd = {
saveRowData : function() { saveRowData : function() {
//alert(parent.document.querySelector("#pageFrame").contentWindow.CoEProcessPublish.getTeamId()); //alert(parent.document.querySelector("#pageFrame").contentWindow.CoEProcessPublish.getTeamId());
} }
}; };
var setting = { var setting = {
checkbox : true, checkbox : true,
checkInherit : false/*, checkInherit : false/*,
event : { event : {
onClick : onClick, onClick : onClick,
// beforeExpand : loadData, // beforeExpand : loadData,
@ -28,42 +28,42 @@ var setting = {
}; };
var checkTree; var checkTree;
function loadData(treeNode) { function loadData(treeNode) {
var url = "./w?sid=" var url = "./w?sid="
+ parent.sid + parent.sid
+ "&cmd=com.actionsoft.apps.coe.pal_outputreport_pal_file_relation_json_data&methodType=" + "&cmd=com.actionsoft.apps.coe.pal_outputreport_pal_file_relation_json_data&methodType="
+ parent.OutputReportWizard.treeNodeObj.relationMethodScope + parent.OutputReportWizard.treeNodeObj.relationMethodScope
+ "&wsid=" + parent.wsid + "&pid=" + treeNode.id + "&teamId="; + "&wsid=" + parent.wsid + "&pid=" + treeNode.id + "&teamId=";
var dataModel = { var dataModel = {
url : url, url : url,
method : "POST", method : "POST",
dataType : "json" dataType : "json"
} }
checkTree.refreshNode({ checkTree.refreshNode({
id : treeNode.id, id : treeNode.id,
dataModel : dataModel dataModel : dataModel
}); });
} }
function getCheckedNode() { function getCheckedNode() {
return checkTree.getCheckedNodes(); return checkTree.getCheckedNodes();
} }
// 设置被选中的checkbox // 设置被选中的checkbox
function checkedNodeById() { function checkedNodeById() {
var checkedIds = parent.OutputReportWizard.treeRelationNodeIds; var checkedIds = parent.OutputReportWizard.treeRelationNodeIds;
if (checkedIds != "") { if (checkedIds != "") {
checkedIds = checkedIds.split(","); checkedIds = checkedIds.split(",");
for (var i = 0; i < checkedIds.length; i++) { for (var i = 0; i < checkedIds.length; i++) {
if (checkedIds[i] == "") { if (checkedIds[i] == "") {
continue; continue;
} }
var resourceId = checkedIds[i]; var resourceId = checkedIds[i];
var checkboxObj = $("input[type=checkbox][value=" + resourceId var checkboxObj = $("input[type=checkbox][value=" + resourceId
+ "]"); + "]");
if (checkboxObj != undefined) { if (checkboxObj != undefined) {
checkboxObj.prop("checked", true); checkboxObj.prop("checked", true);
} }
} }
} }
} }

View File

@ -1,360 +1,360 @@
$(document) .ready(function() { $(document) .ready(function() {
setTimeout(function() { setTimeout(function() {
CoEProcessPublish.loadPublishAddData();//载入新发布的流程 CoEProcessPublish.loadPublishAddData();//载入新发布的流程
}, 100); }, 100);
setTimeout(function() { setTimeout(function() {
CoEProcessPublish.loadPublishChangeData();//载入变更的流程 CoEProcessPublish.loadPublishChangeData();//载入变更的流程
}, 300); }, 300);
setTimeout(function() { setTimeout(function() {
CoEProcessPublish.loadPublishStopData();//载入停用的流程 CoEProcessPublish.loadPublishStopData();//载入停用的流程
}, 500); }, 500);
}); });
var CoEProcessPublish = { var CoEProcessPublish = {
getTeamId : function() { getTeamId : function() {
return $("#teamId").val(); return $("#teamId").val();
}, },
getWsid : function() { getWsid : function() {
return $("#teamId").val(); return $("#teamId").val();
}, },
getSid : function() { getSid : function() {
return $("#sid").val(); return $("#sid").val();
}, },
openRowDataAdd : function() { openRowDataAdd : function() {
var obj = $("#grid1Content").find("input[type=checkbox][group]"); var obj = $("#grid1Content").find("input[type=checkbox][group]");
var group = obj.attr("group"); var group = obj.attr("group");
var url = "./w?sid=" + $("#sid").val() var url = "./w?sid=" + $("#sid").val()
+ "&cmd=com.actionsoft.apps.coe.pal_publisher_add_home&wsid=" + $("#wsId").val() + "&cmd=com.actionsoft.apps.coe.pal_publisher_add_home&wsid=" + $("#wsId").val()
+ "&teamId=" + $("#teamId").val(); + "&teamId=" + $("#teamId").val();
createDlg = FrmDialog.open({ createDlg = FrmDialog.open({
width : 500, width : 500,
height : 420, height : 420,
title : "新增发布流程", title : "新增发布流程",
url : url, url : url,
id : "createDialog", id : "createDialog",
buttons : [ { buttons : [ {
text : "确定", text : "确定",
cls : "blue", cls : "blue",
handler : function() { handler : function() {
var dialogFrm = createDlg.win(); var dialogFrm = createDlg.win();
var nodes = dialogFrm.getCheckedNode(); var nodes = dialogFrm.getCheckedNode();
CoEProcessPublish.publishAddContent(nodes); CoEProcessPublish.publishAddContent(nodes);
CoEProcessPublish.savePublishAddData(nodes); CoEProcessPublish.savePublishAddData(nodes);
FrmDialog.close(); FrmDialog.close();
} }
}, { }, {
text : "取消", text : "取消",
handler : function() { handler : function() {
FrmDialog.close(); FrmDialog.close();
} }
} ] } ]
}); });
}, },
openRowDataChange : function() { openRowDataChange : function() {
var obj = $("#grid1Content").find("input[type=checkbox][group]"); var obj = $("#grid1Content").find("input[type=checkbox][group]");
var group = obj.attr("group"); var group = obj.attr("group");
var url = "./w?sid=" + $("#sid").val() var url = "./w?sid=" + $("#sid").val()
+ "&cmd=com.actionsoft.apps.coe.pal_publisher_change_home&wsid=" + $("#wsId").val() + "&cmd=com.actionsoft.apps.coe.pal_publisher_change_home&wsid=" + $("#wsId").val()
+ "&teamId=" + $("#teamId").val(); + "&teamId=" + $("#teamId").val();
createDlg = FrmDialog.open({ createDlg = FrmDialog.open({
width : 500, width : 500,
height : 420, height : 420,
title : "变更申请", title : "变更申请",
url : url, url : url,
id : "createDialog", id : "createDialog",
buttons : [ { buttons : [ {
text : "确定", text : "确定",
cls : "blue", cls : "blue",
handler : function() { handler : function() {
var dialogFrm = createDlg.win(); var dialogFrm = createDlg.win();
var nodes = dialogFrm.getCheckedNode(); var nodes = dialogFrm.getCheckedNode();
CoEProcessPublish.savePublishChangeData(nodes); CoEProcessPublish.savePublishChangeData(nodes);
FrmDialog.close(); FrmDialog.close();
} }
}, { }, {
text : "取消", text : "取消",
handler : function() { handler : function() {
FrmDialog.close(); FrmDialog.close();
} }
} ] } ]
}); });
}, },
openRowDataStop : function() { openRowDataStop : function() {
var obj = $("#grid1Content").find("input[type=checkbox][group]"); var obj = $("#grid1Content").find("input[type=checkbox][group]");
var group = obj.attr("group"); var group = obj.attr("group");
var url = "./w?sid=" + $("#sid").val() var url = "./w?sid=" + $("#sid").val()
+ "&cmd=com.actionsoft.apps.coe.pal_publisher_stop_home&wsid=" + $("#wsId").val() + "&cmd=com.actionsoft.apps.coe.pal_publisher_stop_home&wsid=" + $("#wsId").val()
+ "&teamId=" + $("#teamId").val(); + "&teamId=" + $("#teamId").val();
createDlg = FrmDialog.open({ createDlg = FrmDialog.open({
width : 500, width : 500,
height : 420, height : 420,
title : "停用申请", title : "停用申请",
url : url, url : url,
id : "createDialog", id : "createDialog",
buttons : [ { buttons : [ {
text : "确定", text : "确定",
cls : "blue", cls : "blue",
handler : function() { handler : function() {
var dialogFrm = createDlg.win(); var dialogFrm = createDlg.win();
var nodes = dialogFrm.getCheckedNode(); var nodes = dialogFrm.getCheckedNode();
CoEProcessPublish.savePublishStopData(nodes); CoEProcessPublish.savePublishStopData(nodes);
FrmDialog.close(); FrmDialog.close();
} }
}, { }, {
text : "取消", text : "取消",
handler : function() { handler : function() {
FrmDialog.close(); FrmDialog.close();
} }
} ] } ]
}); });
}, },
savePublishAddData : function(nodes) { savePublishAddData : function(nodes) {
if (nodes == undefined || nodes.length == 0) if (nodes == undefined || nodes.length == 0)
return; return;
var url = "./jd?sid=" + $("#sid").val() + "&cmd=com.actionsoft.apps.coe.pal_publish_add_save_data"; var url = "./jd?sid=" + $("#sid").val() + "&cmd=com.actionsoft.apps.coe.pal_publish_add_save_data";
var formItemDefId = $("#grid1Content").find("table[id^=GridContent]").attr("id"); var formItemDefId = $("#grid1Content").find("table[id^=GridContent]").attr("id");
formItemDefId = formItemDefId.substring(12, formItemDefId.length); formItemDefId = formItemDefId.substring(12, formItemDefId.length);
var params = { var params = {
processInstId : $("#processInstId").val(), processInstId : $("#processInstId").val(),
openState : $("#openState").val(), openState : $("#openState").val(),
currentPage : $("#currentPage").val(), currentPage : $("#currentPage").val(),
formData : JSON.stringify(nodes), formData : JSON.stringify(nodes),
formItemDefId : formItemDefId, formItemDefId : formItemDefId,
isCreate : true, isCreate : true,
taskInstId: $("#taskInstId").val() taskInstId: $("#taskInstId").val()
}; };
$.ajax({ $.ajax({
url : url, url : url,
async : false, async : false,
data : params, data : params,
type : "post", type : "post",
success : function(msg) { success : function(msg) {
if (msg.result == "ok") { if (msg.result == "ok") {
window.top.$.simpleAlert(msg.msg, "ok", 2000); window.top.$.simpleAlert(msg.msg, "ok", 2000);
} else { } else {
window.top.$.simpleAlert("保存失败", "info", 2000); window.top.$.simpleAlert("保存失败", "info", 2000);
} }
} }
}); });
}, },
savePublishChangeData : function(nodes) { savePublishChangeData : function(nodes) {
if (nodes == undefined || nodes.length == 0) if (nodes == undefined || nodes.length == 0)
return; return;
var url = "./jd?sid=" + $("#sid").val() + "&cmd=com.actionsoft.apps.coe.pal_publish_change_save_data"; var url = "./jd?sid=" + $("#sid").val() + "&cmd=com.actionsoft.apps.coe.pal_publish_change_save_data";
var formItemDefId = $("#changePublishTab2").find("table[id^=GridContent]").attr("id"); var formItemDefId = $("#changePublishTab2").find("table[id^=GridContent]").attr("id");
formItemDefId = formItemDefId.substring(12, formItemDefId.length); formItemDefId = formItemDefId.substring(12, formItemDefId.length);
var params = { var params = {
processInstId : $("#processInstId").val(), processInstId : $("#processInstId").val(),
openState : $("#openState").val(), openState : $("#openState").val(),
currentPage : $("#currentPage").val(), currentPage : $("#currentPage").val(),
formData : JSON.stringify(nodes), formData : JSON.stringify(nodes),
formItemDefId : formItemDefId, formItemDefId : formItemDefId,
isCreate : true, isCreate : true,
taskInstId: $("#taskInstId").val() taskInstId: $("#taskInstId").val()
}; };
$.ajax({ $.ajax({
url : url, url : url,
async : false, async : false,
data : params, data : params,
type : "post", type : "post",
success : function(msg) { success : function(msg) {
if (msg.result == "ok") { if (msg.result == "ok") {
window.top.$.simpleAlert(msg.msg, "ok", 2000); window.top.$.simpleAlert(msg.msg, "ok", 2000);
} else { } else {
window.top.$.simpleAlert("保存失败", "info", 2000); window.top.$.simpleAlert("保存失败", "info", 2000);
} }
} }
}); });
}, },
savePublishStopData : function(nodes) { savePublishStopData : function(nodes) {
if (nodes == undefined || nodes.length == 0) if (nodes == undefined || nodes.length == 0)
return; return;
var url = "./jd?sid=" + $("#sid").val() + "&cmd=com.actionsoft.apps.coe.pal_publish_stop_save_data"; var url = "./jd?sid=" + $("#sid").val() + "&cmd=com.actionsoft.apps.coe.pal_publish_stop_save_data";
var formItemDefId = $("#stopPublishTab3").find("table[id^=GridContent]").attr("id"); var formItemDefId = $("#stopPublishTab3").find("table[id^=GridContent]").attr("id");
formItemDefId = formItemDefId.substring(12, formItemDefId.length); formItemDefId = formItemDefId.substring(12, formItemDefId.length);
var params = { var params = {
processInstId : $("#processInstId").val(), processInstId : $("#processInstId").val(),
openState : $("#openState").val(), openState : $("#openState").val(),
currentPage : $("#currentPage").val(), currentPage : $("#currentPage").val(),
formData : JSON.stringify(nodes), formData : JSON.stringify(nodes),
formItemDefId : formItemDefId, formItemDefId : formItemDefId,
isCreate : true, isCreate : true,
taskInstId: $("#taskInstId").val() taskInstId: $("#taskInstId").val()
}; };
$.ajax({ $.ajax({
url : url, url : url,
async : false, async : false,
data : params, data : params,
type : "post", type : "post",
success : function(msg) { success : function(msg) {
if (msg.result == "ok") { if (msg.result == "ok") {
window.top.$.simpleAlert(msg.msg, "ok", 2000); window.top.$.simpleAlert(msg.msg, "ok", 2000);
} else { } else {
window.top.$.simpleAlert("保存失败", "info", 2000); window.top.$.simpleAlert("保存失败", "info", 2000);
} }
} }
}); });
}, },
publishAddContent : function(nodes) { publishAddContent : function(nodes) {
$("#coePublisAddBody").empty(); $("#coePublisAddBody").empty();
var order = 0; var order = 0;
for (var index = 0; index < nodes.length; index++) { for (var index = 0; index < nodes.length; index++) {
var nodeObj = nodes[index]; var nodeObj = nodes[index];
if (nodeObj.id.length > 16) { if (nodeObj.id.length > 16) {
order++; order++;
var hrefUrl = "./w?sid=" + $("#sid").val() var hrefUrl = "./w?sid=" + $("#sid").val()
+ "&cmd=com.actionsoft.apps.coe.pal_pl_repository_designer&uuid=" + "&cmd=com.actionsoft.apps.coe.pal_pl_repository_designer&uuid="
+ nodeObj.id + "&openType=0&openAppType=1"; + nodeObj.id + "&openType=0&openAppType=1";
var content = '<tr><td align="center">' var content = '<tr><td align="center">'
+ order + order
+ '</td><td align="center"><input class="awsui-checkbox" for="ck2" type="checkbox"></td><td align="left" width="100">' + '</td><td align="center"><input class="awsui-checkbox" for="ck2" type="checkbox"></td><td align="left" width="100">'
+ nodeObj.fileType + nodeObj.fileType
+ '</td><td align="left" width="100"><a href="' + '</td><td align="left" width="100"><a href="'
+ hrefUrl + hrefUrl
+ '" target="_blank">' + '" target="_blank">'
+ nodeObj.name + nodeObj.name
+ '</a></td><td align="center" width="100">' + '</a></td><td align="center" width="100">'
+ nodeObj.fileVersion + nodeObj.fileVersion
+ '</td><td align="left" width="150"><input type="text" style=" width: 100%;border-left:0px;border-bottom:1px;border-style:solid; border-bottom:thick #00;border-right:0px;border-top:0px;" /></td></tr>'; + '</td><td align="left" width="150"><input type="text" style=" width: 100%;border-left:0px;border-bottom:1px;border-style:solid; border-bottom:thick #00;border-right:0px;border-top:0px;" /></td></tr>';
$("#coePublisAddBody").append(content); $("#coePublisAddBody").append(content);
} }
} }
}, },
loadPublishAddContent : function(jsonArr) { loadPublishAddContent : function(jsonArr) {
$("#coePublisAddBody").empty(); $("#coePublisAddBody").empty();
var order = 0; var order = 0;
var content=""; var content="";
for (var index = 0; index < jsonArr.length; index++) { for (var index = 0; index < jsonArr.length; index++) {
var nodeObj = jsonArr[index]; var nodeObj = jsonArr[index];
if (nodeObj.ID.length > 16) { if (nodeObj.ID.length > 16) {
order++; order++;
var hrefUrl = "./w?sid=" + $("#sid").val() var hrefUrl = "./w?sid=" + $("#sid").val()
+ "&cmd=com.actionsoft.apps.coe.pal_pl_repository_designer&uuid=" + "&cmd=com.actionsoft.apps.coe.pal_pl_repository_designer&uuid="
+ nodeObj.PUBLISHFILEID + "&openType=0&openAppType=1"; + nodeObj.PUBLISHFILEID + "&openType=0&openAppType=1";
content += '<tr><td align="center">' content += '<tr><td align="center">'
+ order + order
+ '</td><td align="center"><input value="'+nodeObj.ID+'" type="checkbox"></td><td align="left" width="100">' + '</td><td align="center"><input value="'+nodeObj.ID+'" type="checkbox"></td><td align="left" width="100">'
+ nodeObj.PUBLISTHTYPE + nodeObj.PUBLISTHTYPE
+ '</td><td align="left" ><a href="' + '</td><td align="left" ><a href="'
+ hrefUrl + hrefUrl
+ '" target="_blank">' + '" target="_blank">'
+ nodeObj.PUBLISHFILENAME + nodeObj.PUBLISHFILENAME
+ '</a></td><td align="center">' + '</a></td><td align="center">'
+ nodeObj.PUBLISHVERSION + nodeObj.PUBLISHVERSION
+ '</td><td align="left" ><input type="text" style=" width: 100%;border-left:0px;border-bottom:1px;border-style:solid; border-bottom:thick #00;border-right:0px;border-top:0px;" /></td></tr>'; + '</td><td align="left" ><input type="text" style=" width: 100%;border-left:0px;border-bottom:1px;border-style:solid; border-bottom:thick #00;border-right:0px;border-top:0px;" /></td></tr>';
//alert(content) //alert(content)
} }
} }
$("#coePublisAddBody").append(content); $("#coePublisAddBody").append(content);
}, },
loadPublishChangeContent : function(jsonArr) { loadPublishChangeContent : function(jsonArr) {
$("#coePublisChangeBody").empty(); $("#coePublisChangeBody").empty();
var order = 0; var order = 0;
var content=""; var content="";
for (var index = 0; index < jsonArr.length; index++) { for (var index = 0; index < jsonArr.length; index++) {
var nodeObj = jsonArr[index]; var nodeObj = jsonArr[index];
if (nodeObj.ID.length > 16) { if (nodeObj.ID.length > 16) {
order++; order++;
var hrefUrl = "./w?sid=" + $("#sid").val() var hrefUrl = "./w?sid=" + $("#sid").val()
+ "&cmd=com.actionsoft.apps.coe.pal_pl_repository_designer&uuid=" + "&cmd=com.actionsoft.apps.coe.pal_pl_repository_designer&uuid="
+ nodeObj.CHANGEFILEID + "&openType=0&openAppType=1"; + nodeObj.CHANGEFILEID + "&openType=0&openAppType=1";
content += '<tr><td align="center">' content += '<tr><td align="center">'
+ order + order
+ '</td><td align="center"><input value="'+nodeObj.ID+'" type="checkbox"></td><td align="left" width="100">' + '</td><td align="center"><input value="'+nodeObj.ID+'" type="checkbox"></td><td align="left" width="100">'
+ nodeObj.CHANGETYPE + nodeObj.CHANGETYPE
+ '</td><td align="left" ><a href="' + '</td><td align="left" ><a href="'
+ hrefUrl + hrefUrl
+ '" target="_blank">' + '" target="_blank">'
+ nodeObj.CHANGEFILENAME + nodeObj.CHANGEFILENAME
+ '</a></td><td align="center">' + '</a></td><td align="center">'
+ nodeObj.CHANGEDVERSION + nodeObj.CHANGEDVERSION
+ '</td><td align="left" ><input type="text" style=" width: 100%;border-left:0px;border-bottom:1px;border-style:solid; border-bottom:thick #00;border-right:0px;border-top:0px;" /></td></tr>'; + '</td><td align="left" ><input type="text" style=" width: 100%;border-left:0px;border-bottom:1px;border-style:solid; border-bottom:thick #00;border-right:0px;border-top:0px;" /></td></tr>';
//alert(content) //alert(content)
} }
} }
$("#coePublisChangeBody").append(content); $("#coePublisChangeBody").append(content);
}, },
loadPublishStopContent : function(jsonArr) { loadPublishStopContent : function(jsonArr) {
$("#coePublisStopBody").empty(); $("#coePublisStopBody").empty();
var order = 0; var order = 0;
var content=""; var content="";
for (var index = 0; index < jsonArr.length; index++) { for (var index = 0; index < jsonArr.length; index++) {
var nodeObj = jsonArr[index]; var nodeObj = jsonArr[index];
if (nodeObj.ID.length > 16) { if (nodeObj.ID.length > 16) {
order++; order++;
var hrefUrl = "./w?sid=" + $("#sid").val() var hrefUrl = "./w?sid=" + $("#sid").val()
+ "&cmd=com.actionsoft.apps.coe.pal_pl_repository_designer&uuid=" + "&cmd=com.actionsoft.apps.coe.pal_pl_repository_designer&uuid="
+ nodeObj.STOPFILEID + "&openType=0&openAppType=1"; + nodeObj.STOPFILEID + "&openType=0&openAppType=1";
content += '<tr><td align="center">' content += '<tr><td align="center">'
+ order + order
+ '</td><td align="center"><input value="'+nodeObj.ID+'" type="checkbox"></td><td align="left" width="100">' + '</td><td align="center"><input value="'+nodeObj.ID+'" type="checkbox"></td><td align="left" width="100">'
+ nodeObj.STOPTYPE + nodeObj.STOPTYPE
+ '</td><td align="left" ><a href="' + '</td><td align="left" ><a href="'
+ hrefUrl + hrefUrl
+ '" target="_blank">' + '" target="_blank">'
+ nodeObj.STOPFILENAME + nodeObj.STOPFILENAME
+ '</a></td><td align="center">' + '</a></td><td align="center">'
+ nodeObj.STOPVERSION + nodeObj.STOPVERSION
+ '</td><td align="left" ><input type="text" style=" width: 100%;border-left:0px;border-bottom:1px;border-style:solid; border-bottom:thick #00;border-right:0px;border-top:0px;" /></td></tr>'; + '</td><td align="left" ><input type="text" style=" width: 100%;border-left:0px;border-bottom:1px;border-style:solid; border-bottom:thick #00;border-right:0px;border-top:0px;" /></td></tr>';
//alert(content) //alert(content)
} }
} }
$("#coePublisStopBody").append(content); $("#coePublisStopBody").append(content);
}, },
loadPublishAddData:function (){ loadPublishAddData:function (){
var url = "./jd?sid=" + $("#sid").val() + "&cmd=com.actionsoft.apps.coe.pal_publish_add_show_data"; var url = "./jd?sid=" + $("#sid").val() + "&cmd=com.actionsoft.apps.coe.pal_publish_add_show_data";
var params = { var params = {
processInstId : $("#processInstId").val(), processInstId : $("#processInstId").val(),
}; };
$.ajax({ $.ajax({
url : url, url : url,
async : false, async : false,
data : params, data : params,
type : "post", type : "post",
success : function(msg) { success : function(msg) {
if (msg.result == "ok") { if (msg.result == "ok") {
CoEProcessPublish.loadPublishAddContent(msg.data); CoEProcessPublish.loadPublishAddContent(msg.data);
} else { } else {
window.top.$.simpleAlert("保存失败", "info", 2000); window.top.$.simpleAlert("保存失败", "info", 2000);
} }
} }
}); });
}, },
loadPublishChangeData:function (){ loadPublishChangeData:function (){
var url = "./jd?sid=" + $("#sid").val() + "&cmd=com.actionsoft.apps.coe.pal_publish_change_show_data"; var url = "./jd?sid=" + $("#sid").val() + "&cmd=com.actionsoft.apps.coe.pal_publish_change_show_data";
var params = { var params = {
processInstId : $("#processInstId").val(), processInstId : $("#processInstId").val(),
}; };
$.ajax({ $.ajax({
url : url, url : url,
async : false, async : false,
data : params, data : params,
type : "post", type : "post",
success : function(msg) { success : function(msg) {
if (msg.result == "ok") { if (msg.result == "ok") {
// CoEProcessPublish.loadPublishAddContent(msg.data); // CoEProcessPublish.loadPublishAddContent(msg.data);
} else { } else {
window.top.$.simpleAlert("保存失败", "info", 2000); window.top.$.simpleAlert("保存失败", "info", 2000);
} }
} }
}); });
}, },
loadPublishStopData:function (){ loadPublishStopData:function (){
var url = "./jd?sid=" + $("#sid").val() + "&cmd=com.actionsoft.apps.coe.pal_publish_stop_show_data"; var url = "./jd?sid=" + $("#sid").val() + "&cmd=com.actionsoft.apps.coe.pal_publish_stop_show_data";
var params = { var params = {
processInstId : $("#processInstId").val(), processInstId : $("#processInstId").val(),
}; };
$.ajax({ $.ajax({
url : url, url : url,
async : false, async : false,
data : params, data : params,
type : "post", type : "post",
success : function(msg) { success : function(msg) {
if (msg.result == "ok") { if (msg.result == "ok") {
//CoEProcessPublish.loadPublishAddContent(msg.data); //CoEProcessPublish.loadPublishAddContent(msg.data);
} else { } else {
window.top.$.simpleAlert("保存失败", "info", 2000); window.top.$.simpleAlert("保存失败", "info", 2000);
} }
} }
}); });
} }
}; };

View File

@ -2,135 +2,135 @@ var repositoryTree;
var navtab; var navtab;
$(document).ready(function(){ $(document).ready(function(){
initTree(); initTree();
navtab = awsui.tabs.init($("#awsui-tabs"),{ navtab = awsui.tabs.init($("#awsui-tabs"),{
contentPanel:$("#awsui-tabs-content"), contentPanel:$("#awsui-tabs-content"),
height:30, height:30,
noborder:true noborder:true
}); });
var setting = { var setting = {
item : { item : {
index : "main-index", index : "main-index",
title : "发布历史" title : "发布历史"
}, },
contextMenu : false, contextMenu : false,
close : false close : false
}; };
navtab.addTab(setting); navtab.addTab(setting);
}); });
function initTree() { function initTree() {
$("#tree").empty(); $("#tree").empty();
var setting = getSetting(); var setting = getSetting();
setting.dataModel = { setting.dataModel = {
data:wsTreeData data:wsTreeData
}; };
repositoryTree = awsui.tree.init($("#tree"), setting); repositoryTree = awsui.tree.init($("#tree"), setting);
} }
function getSetting() { function getSetting() {
var setting = { var setting = {
dblClickToExpand:true, dblClickToExpand:true,
autoHeight:true, autoHeight:true,
event : { event : {
onClick : clickNode, onClick : clickNode,
beforeExpand : loadData beforeExpand : loadData
} }
}; };
return setting; return setting;
} }
function loadData(treeNode) { function loadData(treeNode) {
if (treeNode.ws && !repositoryTree.existsChildren(treeNode.id)) { if (treeNode.ws && !repositoryTree.existsChildren(treeNode.id)) {
$.ajax({ $.ajax({
type : "POST", type : "POST",
url : "./w?sid=" + $("#sid").val() url : "./w?sid=" + $("#sid").val()
+ "&cmd=com.actionsoft.apps.coe.pal.publisher_client_treedata&wsId=" + treeNode.id + "&cmd=com.actionsoft.apps.coe.pal.publisher_client_treedata&wsId=" + treeNode.id
+ "&roleId=" + $("#roleId").val() + "&wsName=" + treeNode.wsName, + "&roleId=" + $("#roleId").val() + "&wsName=" + treeNode.wsName,
success : function(msg) { success : function(msg) {
var data = eval('(' + msg + ')').msg; var data = eval('(' + msg + ')').msg;
if (data != null && data.length != 0) { if (data != null && data.length != 0) {
repositoryTree.buildTree(data); repositoryTree.buildTree(data);
var obj = $("a[tbindex=" + treeNode.id + "]"); var obj = $("a[tbindex=" + treeNode.id + "]");
repositoryTree.expandNode(obj); repositoryTree.expandNode(obj);
repositoryTree.changeRootIcon(obj); repositoryTree.changeRootIcon(obj);
} }
} }
}); });
} }
} }
function clickNode(treeNode){ function clickNode(treeNode){
if (treeNode.method && treeNode.method != "default") { if (treeNode.method && treeNode.method != "default") {
var obj = { var obj = {
id : treeNode.id, id : treeNode.id,
title : treeNode.name, title : treeNode.name,
processDefId : treeNode.processDefId processDefId : treeNode.processDefId
} }
openTab(obj); openTab(obj);
} }
} }
function openTab(obj) { function openTab(obj) {
var id = obj.id; var id = obj.id;
var title = obj.title; var title = obj.title;
var processDefId = obj.processDefId; var processDefId = obj.processDefId;
var url = "./w?sid=" + encodeURIComponent($("#sid").val()) + "&cmd=com.actionsoft.apps.coe.pal_pl_repository_designer_viewer" var url = "./w?sid=" + encodeURIComponent($("#sid").val()) + "&cmd=com.actionsoft.apps.coe.pal_pl_repository_designer_viewer"
+ "&uuid=" + id + "&openType=0&processDefId=" + processDefId + "&openAppType=1&dockDisplay=" + dockDisplay; + "&uuid=" + id + "&openType=0&processDefId=" + processDefId + "&openAppType=1&dockDisplay=" + dockDisplay;
var setting = { var setting = {
item : { item : {
index : id, index : id,
title : title title : title
}, },
contextMenu : true, contextMenu : true,
contextMenuTarget : "contextMenu1", contextMenuTarget : "contextMenu1",
close : true close : true
}; };
if (navtab.existsTab(id)) { if (navtab.existsTab(id)) {
navtab.focusTab(id); navtab.focusTab(id);
} else { } else {
var html = $("<iframe frameborder='0' id='" + id + "' index='" + id + "' openApp='publisher'" var html = $("<iframe frameborder='0' id='" + id + "' index='" + id + "' openApp='publisher'"
+ " height='100%' width='100%' class='awsui-layout-iframe' src='" + " height='100%' width='100%' class='awsui-layout-iframe' src='"
+ url + "'></iframe>").appendTo(navtab.tabContentPanel); + url + "'></iframe>").appendTo(navtab.tabContentPanel);
navtab.addTab(setting); navtab.addTab(setting);
$.ajax({ $.ajax({
type : "POST", type : "POST",
url : "./w?sid=" + $("#sid").val() url : "./w?sid=" + $("#sid").val()
+ "&cmd=com.actionsoft.apps.coe.pal.publisher_client_update_viewcount&repositoryId=" + id, + "&cmd=com.actionsoft.apps.coe.pal.publisher_client_update_viewcount&repositoryId=" + id,
success : function(msg) { success : function(msg) {
} }
}); });
} }
} }
/**********************************************查询***********************************************/ /**********************************************查询***********************************************/
function auto_Move(obj) { function auto_Move(obj) {
obj = obj[0]; obj = obj[0];
$(".aotuDivcontenr").css({"backgroundImage":"none","color":"black","fontWeight":"normal"}); $(".aotuDivcontenr").css({"backgroundImage":"none","color":"black","fontWeight":"normal"});
obj.style.backgroundImage="url('../apps/com.actionsoft.apps.coe.pal/img/pl/link.png')"; obj.style.backgroundImage="url('../apps/com.actionsoft.apps.coe.pal/img/pl/link.png')";
autoIndex=obj.id.substring(obj.id.length-1); autoIndex=obj.id.substring(obj.id.length-1);
obj.style.color="white"; obj.style.color="white";
} }
function auto_Out(obj) { function auto_Out(obj) {
obj = obj[0]; obj = obj[0];
obj.style.backgroundImage=""; obj.style.backgroundImage="";
obj.style.color="black"; obj.style.color="black";
obj.style.fontWeight="normal"; obj.style.fontWeight="normal";
} }
function auto_Clike(obj) { function auto_Clike(obj) {
var obj = { var obj = {
id : obj.attr("plId"), id : obj.attr("plId"),
title : obj.attr("plName"), title : obj.attr("plName"),
url : "./w?sid=" + encodeURIComponent($("#sid").val()) + "&cmd=com.actionsoft.apps.coe.pal_pl_repository_designer_viewer" url : "./w?sid=" + encodeURIComponent($("#sid").val()) + "&cmd=com.actionsoft.apps.coe.pal_pl_repository_designer_viewer"
+ "&uuid=" + obj.attr("plId") + "&openType=0&openAppType=1" + "&uuid=" + obj.attr("plId") + "&openType=0&openAppType=1"
} }
openTab(obj); openTab(obj);
} }

View File

@ -3,68 +3,68 @@ var count=20;
var times=1; var times=1;
var loaded = true; var loaded = true;
function addData(){ function addData(){
var top = $("#main_add").offset().top; var top = $("#main_add").offset().top;
if(loaded && ($(window).scrollTop() + $(window).height() >= top)){ if(loaded && ($(window).scrollTop() + $(window).height() >= top)){
$("#more_info").show().html("数据加载中..."); $("#more_info").show().html("数据加载中...");
setTimeout(function(){ setTimeout(function(){
$.ajax({ $.ajax({
type: "POST", type: "POST",
url: "./w?sid=" + $("#sid").val() url: "./w?sid=" + $("#sid").val()
+ "&cmd=com.actionsoft.apps.coe.pal.publisher_client_main_more&time=" + times, + "&cmd=com.actionsoft.apps.coe.pal.publisher_client_main_more&time=" + times,
success: function(msg){ success: function(msg){
var data = eval('(' + msg + ')').msg; var data = eval('(' + msg + ')').msg;
if(data.length == 0){ if(data.length == 0){
$("#more_info").show().text("没有更多数据"); $("#more_info").show().text("没有更多数据");
loaded=false; loaded=false;
setTimeout(function(){$("#more_info").hide()}, 2000); setTimeout(function(){$("#more_info").hide()}, 2000);
}else if(data.length > 0){ }else if(data.length > 0){
addEffect(data); addEffect(data);
times++; times++;
$("#more_info").show().html("下拉加载更多..."); $("#more_info").show().html("下拉加载更多...");
}
} }
}); }
}, 500); });
} }, 500);
}
} }
function addEffect(data) { function addEffect(data) {
var html = ""; var html = "";
for (var i in data) { for (var i in data) {
var obj = data[i]; var obj = data[i];
if (obj.year != year) { if (obj.year != year) {
$("#main_div").append("<div class=\"year\"><h2><a href=\"#\">" + obj.year + "年<i></i></a></h2><div class=\"list\"><ul></ul></div></div>"); $("#main_div").append("<div class=\"year\"><h2><a href=\"#\">" + obj.year + "年<i></i></a></h2><div class=\"list\"><ul></ul></div></div>");
year = obj.year; year = obj.year;
} }
html += " <li class=\"cls highlight\">"; html += " <li class=\"cls highlight\">";
if (obj.pid != pid) { if (obj.pid != pid) {
html += " <p class=\"date\">" + obj.date + "</p>"; html += " <p class=\"date\">" + obj.date + "</p>";
pid = obj.pid; pid = obj.pid;
} else { } else {
html += " <p class=\"date\">&nbsp;</p>"; html += " <p class=\"date\">&nbsp;</p>";
} }
html += " <p class=\"intro\">" + obj.intro + "</p>" html += " <p class=\"intro\">" + obj.intro + "</p>"
+ " <p class=\"version\">&nbsp;</p>" + " <p class=\"version\">&nbsp;</p>"
+ " <div class=\"more\">" + " <div class=\"more\">"
+ " <div class=\"margin_10 thumbnail\">" + " <div class=\"margin_10 thumbnail\">"
+ " <img src=\"" + obj.image + "\" style=\"height: 150px; width:150px;\">" + " <img src=\"" + obj.image + "\" style=\"height: 150px; width:150px;\">"
+ " </div>" + " </div>"
+ " <div style=\"width: 200px; display: inline-block; vertical-align: top; margin-left: 20px;\">" + obj.desc + "</div>" + " <div style=\"width: 200px; display: inline-block; vertical-align: top; margin-left: 20px;\">" + obj.desc + "</div>"
+ " </div>" + " </div>"
+ " </li>"; + " </li>";
} }
$("#main_div ul:last").append(html); $("#main_div ul:last").append(html);
} }
//点击流程缩略图打开tab //点击流程缩略图打开tab
function clickImage(id) { function clickImage(id) {
var treeNode = parent.repositoryTree.getNodeById(id); var treeNode = parent.repositoryTree.getNodeById(id);
if(treeNode != undefined) { if(treeNode != undefined) {
var obj = { var obj = {
id : treeNode.id, id : treeNode.id,
title : treeNode.name, title : treeNode.name,
processDefId : treeNode.processDefId processDefId : treeNode.processDefId
} }
parent.openTab(obj); parent.openTab(obj);
} }
} }

View File

@ -1,250 +1,250 @@
$(function () { $(function () {
String.prototype.replaceAll = function(oldStr, newStr) { String.prototype.replaceAll = function(oldStr, newStr) {
return this.replace(new RegExp(oldStr,"gm"),newStr); return this.replace(new RegExp(oldStr,"gm"),newStr);
} }
initWs(); initWs();
tabAttr.initTab(); tabAttr.initTab();
$(window).trigger('resize'); $(window).trigger('resize');
tabAttr.clickTab(); tabAttr.clickTab();
// 检索关键词 // 检索关键词
$('#searchText').off('keypress').on('keypress', function (e) { $('#searchText').off('keypress').on('keypress', function (e) {
if (e.which === 13) { if (e.which === 13) {
$('#search').click(); $('#search').click();
} }
}); });
$('body').click(function(e) { $('body').click(function(e) {
var target = $(e.target); var target = $(e.target);
if(!target.is('#changeWsDialog *')) { if(!target.is('#changeWsDialog *')) {
if ( $('#changeWsDialog').is(':visible') ) { if ( $('#changeWsDialog').is(':visible') ) {
$('#changeWsDialog').hide(); $('#changeWsDialog').hide();
} }
} }
}); });
}); });
$(window).resize(function(){ $(window).resize(function(){
initMain(); initMain();
var totalWidth = $(window).width(); var totalWidth = $(window).width();
$("#main-body [class*=width_]").each(function(){ $("#main-body [class*=width_]").each(function(){
var className = $(this).attr("class"); var className = $(this).attr("class");
var percent = parseInt(className.substr(6, 2)); var percent = parseInt(className.substr(6, 2));
$(this).css({"width" : (totalWidth*percent/100) - 34}); $(this).css({"width" : (totalWidth*percent/100) - 34});
}); });
}) })
function initMain() { function initMain() {
$('#main').width($(window).width()); $('#main').width($(window).width());
$('#main').height($(window).height() - $('.head-wrap').outerHeight(true) - $('.dimension-meta-bar').outerHeight(true)); $('#main').height($(window).height() - $('.head-wrap').outerHeight(true) - $('.dimension-meta-bar').outerHeight(true));
$('#main-body').height($('#main').height() - $('#main-head').height()); $('#main-body').height($('#main').height() - $('#main-head').height());
$('#main-body-body').height($('#main-body').height() - $('#main-body-head').height()); $('#main-body-body').height($('#main-body').height() - $('#main-body-head').height());
} }
//分页设置 //分页设置
var page = { var page = {
pageSetting : { pageSetting : {
pageLimit : 20, // 每页条数 pageLimit : 20, // 每页条数
start:0//起始条数 start:0//起始条数
}, },
initPageSetting : function () { initPageSetting : function () {
page.pageSetting.start = 0; page.pageSetting.start = 0;
} }
} }
function initWs() { function initWs() {
$("#wsChangeArea").off("mouseenter").on("mouseenter", function () { $("#wsChangeArea").off("mouseenter").on("mouseenter", function () {
$('#changeWsDialog').show(); $('#changeWsDialog').show();
}).off("mouseleave").on("mouseleave", function () { }).off("mouseleave").on("mouseleave", function () {
$('#changeWsDialog').hide(); $('#changeWsDialog').hide();
}); });
var html = "<li>"; var html = "<li>";
if (ws.length > 0) { if (ws.length > 0) {
$('#wsId').val(ws[0].id); $('#wsId').val(ws[0].id);
$('#wsNameDiv').text(ws[0].text); $('#wsNameDiv').text(ws[0].text);
for (var i = 0; i < ws.length; i++) { for (var i = 0; i < ws.length; i++) {
html += '<ul style="text-overflow: ellipsis;overflow:hidden;width:200px;white-space: nowrap;" data-id="' + ws[i].id + '" name="' + ws[i].text + '" onclick="changeWs(this);" onMouseOver="this.style.color=\'#C2C2C2\'" onMouseOut="this.style.color=\'#000\'">' + ws[i].text + '</ul>'; html += '<ul style="text-overflow: ellipsis;overflow:hidden;width:200px;white-space: nowrap;" data-id="' + ws[i].id + '" name="' + ws[i].text + '" onclick="changeWs(this);" onMouseOver="this.style.color=\'#C2C2C2\'" onMouseOut="this.style.color=\'#000\'">' + ws[i].text + '</ul>';
if(ws[i].initDisplay == "1") { //initDisplay:是否是初始化的流程资产库"0"-不是;"1"-是 if(ws[i].initDisplay == "1") { //initDisplay:是否是初始化的流程资产库"0"-不是;"1"-是
$('#wsId').val(ws[i].id); $('#wsId').val(ws[i].id);
$('#wsNameDiv').text(ws[i].text); $('#wsNameDiv').text(ws[i].text);
} }
} }
} }
html += "</li>"; html += "</li>";
$('#changeWsDialog').html(html); $('#changeWsDialog').html(html);
} }
function changeWs(obj) { function changeWs(obj) {
$('#wsNameDiv').text($(obj).attr('name')); $('#wsNameDiv').text($(obj).attr('name'));
$('#changeWsDialog').hide(); $('#changeWsDialog').hide();
if($('#wsId').val() == $(obj).attr('data-id')) return; if($('#wsId').val() == $(obj).attr('data-id')) return;
$('#wsId').val($(obj).attr('data-id')); $('#wsId').val($(obj).attr('data-id'));
search(); search();
} }
function initHtml() { function initHtml() {
$('#innerTable').empty(); $('#innerTable').empty();
// $('#noAnyOne').hide(); // $('#noAnyOne').hide();
$('#noContent').hide(); $('#noContent').hide();
$('#noSearch').hide(); $('#noSearch').hide();
$('#data-more').show(); $('#data-more').show();
$('#moreDataButton').show(); $('#moreDataButton').show();
$('#noDataAlert').hide(); $('#noDataAlert').hide();
} }
// 搜索 // 搜索
function search() { function search() {
initHtml(); initHtml();
tabAttr.searchText = $('#searchText').val(); tabAttr.searchText = $('#searchText').val();
page.initPageSetting(); page.initPageSetting();
var searchWsId = $('#wsId').val(); var searchWsId = $('#wsId').val();
if (searchWsId == '') { if (searchWsId == '') {
$('#data-more').children().hide(); $('#data-more').children().hide();
// $('#noAnyOne').show(); // $('#noAnyOne').show();
$('#noContent').show(); $('#noContent').show();
$('#noSearch').hide(); $('#noSearch').hide();
$.simpleAlert('没有相应的资产库权限,无法搜索相关数据', 'info'); $.simpleAlert('没有相应的资产库权限,无法搜索相关数据', 'info');
return; return;
} }
var param = { var param = {
searchText : tabAttr.searchText, searchText : tabAttr.searchText,
searchType : tabAttr.current, searchType : tabAttr.current,
searchWsId : searchWsId, searchWsId : searchWsId,
start : page.pageSetting.start, start : page.pageSetting.start,
pageLimit : page.pageSetting.pageLimit pageLimit : page.pageSetting.pageLimit
} }
getMoreData(param); getMoreData(param);
} }
// 获取数据 // 获取数据
function getMoreData(param) { function getMoreData(param) {
if (param == undefined) { if (param == undefined) {
var searchWsId = $('#wsId').val(); var searchWsId = $('#wsId').val();
param = { param = {
searchText : tabAttr.searchText, searchText : tabAttr.searchText,
searchType : tabAttr.current, searchType : tabAttr.current,
searchWsId : searchWsId, searchWsId : searchWsId,
start : page.pageSetting.start, start : page.pageSetting.start,
pageLimit : page.pageSetting.pageLimit pageLimit : page.pageSetting.pageLimit
} }
} }
$.simpleAlert('正在加载数据', 'loading'); $.simpleAlert('正在加载数据', 'loading');
// 获取更多数据 // 获取更多数据
$.ajax({ $.ajax({
type : "POST", type : "POST",
url : "./jd?cmd=com.actionsoft.apps.coe.pal.publisher_client_sso_search_data&sid=" + encodeURIComponent(sid), url : "./jd?cmd=com.actionsoft.apps.coe.pal.publisher_client_sso_search_data&sid=" + encodeURIComponent(sid),
dataType : "JSON", dataType : "JSON",
data : param, data : param,
success : function(r) { success : function(r) {
$.simpleAlert('close'); $.simpleAlert('close');
if (r.result == 'ok') { if (r.result == 'ok') {
var count = r.data.count; var count = r.data.count;
var data = r.data.data; var data = r.data.data;
var start = page.pageSetting.start + 1; var start = page.pageSetting.start + 1;
var html = ""; var html = "";
for(var i = 0; i < data.length; i++) { for(var i = 0; i < data.length; i++) {
data[i].name = '<font>' + data[i].name + '</font>'; data[i].name = '<font>' + data[i].name + '</font>';
data[i].name = tabAttr.searchText.trim() == "" ? data[i].name : data[i].name.replaceAll(tabAttr.searchText.trim(), '<div style="background-color:yellow;display:inline-block;">' + tabAttr.searchText.trim() + '</div>'); data[i].name = tabAttr.searchText.trim() == "" ? data[i].name : data[i].name.replaceAll(tabAttr.searchText.trim(), '<div style="background-color:yellow;display:inline-block;">' + tabAttr.searchText.trim() + '</div>');
html += '<tr>'; html += '<tr>';
html += '<td class="width_4 number">' + (start++) + '</td>'; html += '<td class="width_4 number">' + (start++) + '</td>';
html += '<td class="width_30">'; html += '<td class="width_30">';
html += '<span style="display:inline-block;padding-bottom:4px;">'; html += '<span style="display:inline-block;padding-bottom:4px;">';
if (data[i].isPublish == 0) {// 未发布 if (data[i].isPublish == 0) {// 未发布
html += '<a href ="javascript:return false;" onclick="return false;" style="cursor: default;font-size:14px;color:#666;">' + data[i].name + '</a>'; html += '<a href ="javascript:return false;" onclick="return false;" style="cursor: default;font-size:14px;color:#666;">' + data[i].name + '</a>';
} else { } else {
html += '<a id="' + data[i].id + '" href="javascript:void(0);" style="font-size:14px;color:#0000ee;" onclick="openPortal(\'' + sid + '\', \'' + data[i].id + '\', \''+ data[i].taskId +'\');">' + data[i].name + '</a>'; html += '<a id="' + data[i].id + '" href="javascript:void(0);" style="font-size:14px;color:#0000ee;" onclick="openPortal(\'' + sid + '\', \'' + data[i].id + '\', \''+ data[i].taskId +'\');">' + data[i].name + '</a>';
} }
html += '</span><br>'; html += '</span><br>';
html += '<span style="font-size:12px;color:#808080">' + data[i].path + '</span>'; html += '<span style="font-size:12px;color:#808080">' + data[i].path + '</span>';
html += '</td>'; html += '</td>';
// html += '<td class="width_19 userName">'; // html += '<td class="width_19 userName">';
// html += '<span style="font-size:14px;"><b>' + data[i].user + '</b></span><br><span style="font-size:12px;">' + data[i].dept + '</span>'; // html += '<span style="font-size:14px;"><b>' + data[i].user + '</b></span><br><span style="font-size:12px;">' + data[i].dept + '</span>';
html += '<td class="width_30 userName"><span style="display:inline-block;padding-bottom:4px;font-size:14px;">' + data[i].user + '</span><br>'; html += '<td class="width_30 userName"><span style="display:inline-block;padding-bottom:4px;font-size:14px;">' + data[i].user + '</span><br>';
html += '<span style="font-size:12px;color:#808080">' + data[i].dept + '</span>'; html += '<span style="font-size:12px;color:#808080">' + data[i].dept + '</span>';
html += '</td>'; html += '</td>';
html += '<td class="width_10 date">' + transferDateFormat(data[i].date) + '</td>'; html += '<td class="width_10 date">' + transferDateFormat(data[i].date) + '</td>';
html += '<td class="width_7 version">V' + data[i].version + '.0</td>'; html += '<td class="width_7 version">V' + data[i].version + '.0</td>';
var desc = data[i].desc; var desc = data[i].desc;
if(desc == '') { if(desc == '') {
desc = "无"; desc = "无";
} }
html += '<td class="width_30">' + desc + '</td>'; html += '<td class="width_30">' + desc + '</td>';
html += '</tr>'; html += '</tr>';
} }
if (data.length != 0) { if (data.length != 0) {
$('#innerTable').append(html); $('#innerTable').append(html);
$(window).trigger('resize'); $(window).trigger('resize');
} }
page.pageSetting.start = page.pageSetting.start + data.length; page.pageSetting.start = page.pageSetting.start + data.length;
if (count == 0) {// 最后一页 if (count == 0) {// 最后一页
$('#data-more').children().hide(); $('#data-more').children().hide();
if(page.pageSetting.start == 0) {// 没有数据 if(page.pageSetting.start == 0) {// 没有数据
if(tabAttr.searchText.trim() == '') { if(tabAttr.searchText.trim() == '') {
$('#noSearch').hide(); $('#noSearch').hide();
$('#noContent').show(); $('#noContent').show();
} else { } else {
$('#noContent').hide(); $('#noContent').hide();
$('#noSearch').show(); $('#noSearch').show();
} }
// $('#noAnyOne').show(); // $('#noAnyOne').show();
} else { } else {
$('#noDataAlert').show(); $('#noDataAlert').show();
} }
} else { } else {
if (count < page.pageSetting.pageLimit) { if (count < page.pageSetting.pageLimit) {
$('#data-more').children().hide(); $('#data-more').children().hide();
$('#noDataAlert').show(); $('#noDataAlert').show();
} }
// $.simpleAlert('加载成功', 'ok'); // $.simpleAlert('加载成功', 'ok');
} }
} else { } else {
$.simpleAlert('加载失败', 'error'); $.simpleAlert('加载失败', 'error');
} }
} }
}) })
} }
// 页签栏 // 页签栏
var tabAttr = { var tabAttr = {
current : 'all', current : 'all',
searchText : '', searchText : '',
initTab : function() { initTab : function() {
tabAttr.current = type; tabAttr.current = type;
tabAttr.searchText = text; tabAttr.searchText = text;
$('#searchText').val(tabAttr.searchText); $('#searchText').val(tabAttr.searchText);
var html = ''; var html = '';
for(var i = 0; i < scope.length; i++) { for(var i = 0; i < scope.length; i++) {
var curr = scope[i]; var curr = scope[i];
if (curr.type == 'all') { if (curr.type == 'all') {
html += '<div id="'+ curr.type +'" name="first" class="dimension unselect-first" onclick="tabAttr.clickTab(this);" style="display:inline-block;">'; html += '<div id="'+ curr.type +'" name="first" class="dimension unselect-first" onclick="tabAttr.clickTab(this);" style="display:inline-block;">';
html += '<span>'+ curr.name +'</span>'; html += '<span>'+ curr.name +'</span>';
html += '</div>'; html += '</div>';
} else { } else {
html += '<div class="meta unselect-other" name="other" id="' + curr.type + '" onclick="tabAttr.clickTab(this);">'; html += '<div class="meta unselect-other" name="other" id="' + curr.type + '" onclick="tabAttr.clickTab(this);">';
html += curr.name; html += curr.name;
html += '</div>'; html += '</div>';
} }
} }
$('#tab').html(html); $('#tab').html(html);
}, },
clickTab : function(obj) { clickTab : function(obj) {
// 背景色重置 // 背景色重置
$('#tab').find('div[name=first]').removeClass('select-first'); $('#tab').find('div[name=first]').removeClass('select-first');
$('#tab').find('div[name=other]').removeClass('select-other'); $('#tab').find('div[name=other]').removeClass('select-other');
$('#tab').find('div[name=first]').addClass('unselect-first'); $('#tab').find('div[name=first]').addClass('unselect-first');
$('#tab').find('div[name=other]').addClass('unselect-other'); $('#tab').find('div[name=other]').addClass('unselect-other');
if (obj) { if (obj) {
// 设置当前tab // 设置当前tab
tabAttr.current = $(obj).attr('id'); tabAttr.current = $(obj).attr('id');
} }
if (tabAttr.current == 'all') { if (tabAttr.current == 'all') {
$('#' + tabAttr.current).removeClass('unselect-first'); $('#' + tabAttr.current).removeClass('unselect-first');
$('#' + tabAttr.current).addClass('select-first'); $('#' + tabAttr.current).addClass('select-first');
} else { } else {
$('#' + tabAttr.current).removeClass('unselect-other'); $('#' + tabAttr.current).removeClass('unselect-other');
$('#' + tabAttr.current).addClass('select-other'); $('#' + tabAttr.current).addClass('select-other');
} }
search(); search();
} }
} }

View File

@ -2,153 +2,153 @@ var orgTree; //标准化体系资产库树
var tab2Inited = false; //tab2是否已经初始化 var tab2Inited = false; //tab2是否已经初始化
function loadMainPublishListData(obj) { function loadMainPublishListData(obj) {
$("#main_type_select span").removeClass("current"); $("#main_type_select span").removeClass("current");
obj.addClass("current"); obj.addClass("current");
var publishType = obj.attr("publishType"); var publishType = obj.attr("publishType");
if (publishType == undefined) { if (publishType == undefined) {
publishType = ""; publishType = "";
} }
$.ajax({ $.ajax({
type : "POST", type : "POST",
url : "./jd?sid=" + $("#sid").val() url : "./jd?sid=" + $("#sid").val()
+ "&cmd=com.actionsoft.apps.coe.pal.publisher_client_sso_publish_list", + "&cmd=com.actionsoft.apps.coe.pal.publisher_client_sso_publish_list",
data: { data: {
start: 0, start: 0,
type: publishType type: publishType
}, },
success : function(msg) { success : function(msg) {
var datas = msg.data.results; var datas = msg.data.results;
var html = ""; var html = "";
var pid = ""; var pid = "";
for (var i in datas) { for (var i in datas) {
if (pid != datas[i].pid) { if (pid != datas[i].pid) {
pid = datas[i].pid; pid = datas[i].pid;
if (html != "") { if (html != "") {
html += ' </div>' html += ' </div>'
+ '</div>'; + '</div>';
} }
var color = "green"; var color = "green";
var publishType = "新发布"; var publishType = "新发布";
if (datas[i].type == "N") { if (datas[i].type == "N") {
color = "green"; color = "green";
publishType = "新发布"; publishType = "新发布";
} else if (datas[i].type == "C") { } else if (datas[i].type == "C") {
color = "blue"; color = "blue";
publishType = "变更"; publishType = "变更";
} else if (datas[i].type == "S") { } else if (datas[i].type == "S") {
color = "red"; color = "red";
publishType = "停用"; publishType = "停用";
} }
html += '<div style="padding: 10px 0 15px 0; border-bottom: solid 1px rgb(230, 230, 230);">' html += '<div style="padding: 10px 0 15px 0; border-bottom: solid 1px rgb(230, 230, 230);">'
+ ' <div style="display: inline-block;background-color: rgb(59, 171, 216);color: rgb(255, 255, 255);padding: 5px;vertical-align: middle;">' + datas[i].date + '</div>' + ' <div style="display: inline-block;background-color: rgb(59, 171, 216);color: rgb(255, 255, 255);padding: 5px;vertical-align: middle;">' + datas[i].date + '</div>'
+ ' <div style="margin-top: 5px; color: rgb(128, 128, 128);">' + datas[i].pDesc + '</div>' + ' <div style="margin-top: 5px; color: rgb(128, 128, 128);">' + datas[i].pDesc + '</div>'
+ ' <div style="margin-top: 15px; font-size: 15px;">'; + ' <div style="margin-top: 15px; font-size: 15px;">';
} }
var color = "green"; var color = "green";
var publishType = "新发布"; var publishType = "新发布";
if (datas[i].type == "N") { if (datas[i].type == "N") {
color = "green"; color = "green";
publishType = "新发布"; publishType = "新发布";
} else if (datas[i].type == "C") { } else if (datas[i].type == "C") {
color = "blue"; color = "blue";
publishType = "变更"; publishType = "变更";
} else if (datas[i].type == "S") { } else if (datas[i].type == "S") {
color = "red"; color = "red";
publishType = "停用"; publishType = "停用";
} }
var onclick = ""; var onclick = "";
var cursorStyle = ""; var cursorStyle = "";
if (modelIds.indexOf(datas[i].repositoryId) > -1) { if (modelIds.indexOf(datas[i].repositoryId) > -1) {
if (datas[i].method == "default") { if (datas[i].method == "default") {
onclick = 'javascript:$.simpleAlert(\'不支持文件目录打开\',\'info\');'; onclick = 'javascript:$.simpleAlert(\'不支持文件目录打开\',\'info\');';
} else { } else {
onclick = 'openTab({id:\'' + datas[i].repositoryId + '\', title:\'' + datas[i].repositoryName + '\'})'; onclick = 'openTab({id:\'' + datas[i].repositoryId + '\', title:\'' + datas[i].repositoryName + '\'})';
} }
cursorStyle = "cursor: pointer;"; cursorStyle = "cursor: pointer;";
} }
html += ' <ul class="main_ul">' html += ' <ul class="main_ul">'
+ ' <li>' + ' <li>'
+ ' <span class="text-' + color + '" onclick="' + onclick + '" style="' + cursorStyle + '">' + datas[i].repositoryName + datas[i].repositoryVersion + '</span><span style="color: #808080; float: right; font-size: 14px;">' + publishType + '</span>' + ' <span class="text-' + color + '" onclick="' + onclick + '" style="' + cursorStyle + '">' + datas[i].repositoryName + datas[i].repositoryVersion + '</span><span style="color: #808080; float: right; font-size: 14px;">' + publishType + '</span>'
+ ' </li>' + ' </li>'
+ ' </ul>'; + ' </ul>';
} }
if (html != "") { if (html != "") {
html += ' </div>' html += ' </div>'
+ '</div>'; + '</div>';
} }
$("#main_publish_content").html(html); $("#main_publish_content").html(html);
} }
}); });
} }
function openTab(obj) { function openTab(obj) {
$("#content").hide(); $("#content").hide();
$("#extend_content").show(); $("#extend_content").show();
var dockOption = dockDisplay.replace(/"/g, '&quot;'); var dockOption = dockDisplay.replace(/"/g, '&quot;');
var id = obj.id; var id = obj.id;
var title = obj.title; var title = obj.title;
var processDefId = obj.processDefId; var processDefId = obj.processDefId;
var url = './w?sid=' + encodeURIComponent($('#sid').val()) + '&cmd=com.actionsoft.apps.coe.pal_pl_repository_designer_viewer' var url = './w?sid=' + encodeURIComponent($('#sid').val()) + '&cmd=com.actionsoft.apps.coe.pal_pl_repository_designer_viewer'
+ '&uuid=' + id + '&openType=0&processDefId=' + processDefId + '&openAppType=1&dockDisplay=' + dockOption; + '&uuid=' + id + '&openType=0&processDefId=' + processDefId + '&openAppType=1&dockDisplay=' + dockOption;
var setting = { var setting = {
item : { item : {
index : id, index : id,
title : title title : title
}, },
contextMenu : true, contextMenu : true,
contextMenuTarget : "contextMenu1", contextMenuTarget : "contextMenu1",
close : true close : true
}; };
if (navtab.existsTab(id)) { if (navtab.existsTab(id)) {
navtab.focusTab(id); navtab.focusTab(id);
} else { } else {
var html = $("<iframe allowfullscreen='true' webkitallowfullscreen='true' frameborder='0' id='" + id + "' index='" + id + "' openApp='publisher'" var html = $("<iframe allowfullscreen='true' webkitallowfullscreen='true' frameborder='0' id='" + id + "' index='" + id + "' openApp='publisher'"
+ " height='100%' width='100%' class='awsui-layout-iframe' src='about:blank'></iframe>").appendTo(navtab.tabContentPanel); + " height='100%' width='100%' class='awsui-layout-iframe' src='about:blank'></iframe>").appendTo(navtab.tabContentPanel);
var formHtml = '<form action="'+url+'" method="post" target="_self" id="postData_form">' var formHtml = '<form action="'+url+'" method="post" target="_self" id="postData_form">'
+ ' <input id="filePerms" name="filePerms" type="hidden" value="'+modelIds+'">' + ' <input id="filePerms" name="filePerms" type="hidden" value="'+modelIds+'">'
+ '</form>'; + '</form>';
document.getElementById(id).contentWindow.document.write(formHtml); document.getElementById(id).contentWindow.document.write(formHtml);
document.getElementById(id).contentWindow.document.getElementById('postData_form').submit(); document.getElementById(id).contentWindow.document.getElementById('postData_form').submit();
navtab.addTab(setting); navtab.addTab(setting);
$.ajax({ $.ajax({
type : "POST", type : "POST",
url : "./w?sid=" + $("#sid").val() url : "./w?sid=" + $("#sid").val()
+ "&cmd=com.actionsoft.apps.coe.pal.publisher_client_update_viewcount&repositoryId=" + id, + "&cmd=com.actionsoft.apps.coe.pal.publisher_client_update_viewcount&repositoryId=" + id,
success : function(msg) { success : function(msg) {
} }
}); });
} }
} }
function openDesginerFromAttr(uuid, openType, plName, appId, processVersionId, function openDesginerFromAttr(uuid, openType, plName, appId, processVersionId,
isOpenDialog, shapeId) { isOpenDialog, shapeId) {
var obj = { var obj = {
id: uuid, id: uuid,
title: plName, title: plName,
processDefId: processVersionId processDefId: processVersionId
} }
openTab(obj); openTab(obj);
} }
//点击主标题 //点击主标题
function clickMainTab() { function clickMainTab() {
$("#extend_tabs .awsui-tabs-items.current").removeClass("current"); $("#extend_tabs .awsui-tabs-items.current").removeClass("current");
$('#extend_content').hide(); $('#extend_content').hide();
$('#content').show(); $('#content').show();
} }
//初始化标准化体系tab中的内容 //初始化标准化体系tab中的内容
function initTab2(tab, newTabId) { function initTab2(tab, newTabId) {
if (newTabId == "tab2" && !tab2Inited) { if (newTabId == "tab2" && !tab2Inited) {
$("#tab2_iframe").attr("src", "./w?sid=" + $("#sid").val() + "&cmd=com.actionsoft.apps.coe.pal.publisher_client_sso_org_relation_page"); $("#tab2_iframe").attr("src", "./w?sid=" + $("#sid").val() + "&cmd=com.actionsoft.apps.coe.pal.publisher_client_sso_org_relation_page");
tab2Inited = true; tab2Inited = true;
} }
} }

View File

@ -4,335 +4,335 @@ var navtab;
$(document).ready(function(){ $(document).ready(function(){
$("#user").off("mouseenter").on("mouseenter", function () { $("#user").off("mouseenter").on("mouseenter", function () {
$("#appviewport2-top-right-dialog").slideToggle("fast"); $("#appviewport2-top-right-dialog").slideToggle("fast");
$(".content-icons").toggleClass("up_black"); $(".content-icons").toggleClass("up_black");
}).off("mouseleave").on("mouseleave", function () { }).off("mouseleave").on("mouseleave", function () {
$('#appviewport2-top-right-dialog').hide(); $('#appviewport2-top-right-dialog').hide();
$("#userName_icon.content-icons").removeClass("up_black"); $("#userName_icon.content-icons").removeClass("up_black");
}); });
$('#appviewport2-top-right-dialog, #userName, #userName_icon').click(function(e1){ $('#appviewport2-top-right-dialog, #userName, #userName_icon').click(function(e1){
e1.stopPropagation(); // 阻止事件冒泡 e1.stopPropagation(); // 阻止事件冒泡
}); });
$("#select_type span").on("click", function(){ $("#select_type span").on("click", function(){
searchPublishList($(this)); searchPublishList($(this));
}) })
// 检索关键词 // 检索关键词
$('#searchText').off('keypress').on('keypress', function (e) { $('#searchText').off('keypress').on('keypress', function (e) {
if (e.which === 13) { if (e.which === 13) {
$('#search').click(); $('#search').click();
} }
}); });
// 强制修改密码 // 强制修改密码
if (forceChangePwd) { if (forceChangePwd) {
modifyPwd(); modifyPwd();
} }
// 如果不允许修改密码 // 如果不允许修改密码
if (!isSecurityPwdChange) { if (!isSecurityPwdChange) {
$('#updatePwd').remove(); $('#updatePwd').remove();
} }
initWs(); initWs();
}); });
// 初始化资产库 // 初始化资产库
function initWs() { function initWs() {
$("#wsChangeArea").off("mouseenter").on("mouseenter", function () { $("#wsChangeArea").off("mouseenter").on("mouseenter", function () {
$('#changeWsDialog').show(); $('#changeWsDialog').show();
}).off("mouseleave").on("mouseleave", function () { }).off("mouseleave").on("mouseleave", function () {
$('#changeWsDialog').hide(); $('#changeWsDialog').hide();
}); });
var html = "<li>"; var html = "<li>";
if (ws.length > 0) { if (ws.length > 0) {
$('#wsId').val(ws[0].id); $('#wsId').val(ws[0].id);
$('#wsNameDiv').text(ws[0].text); $('#wsNameDiv').text(ws[0].text);
for (var i = 0; i < ws.length; i++) { for (var i = 0; i < ws.length; i++) {
html += '<ul style="text-overflow: ellipsis;overflow:hidden;width:200px;white-space: nowrap;" data-id="' + ws[i].id + '" name="' + ws[i].text + '" onclick="changeWs(this);" onMouseOver="this.style.color=\'#C2C2C2\'" onMouseOut="this.style.color=\'#000\'">' + ws[i].text + '</ul>'; html += '<ul style="text-overflow: ellipsis;overflow:hidden;width:200px;white-space: nowrap;" data-id="' + ws[i].id + '" name="' + ws[i].text + '" onclick="changeWs(this);" onMouseOver="this.style.color=\'#C2C2C2\'" onMouseOut="this.style.color=\'#000\'">' + ws[i].text + '</ul>';
if(ws[i].initDisplay == "1") { //initDisplay:是否是初始化的流程资产库"0"-不是;"1"-是 if(ws[i].initDisplay == "1") { //initDisplay:是否是初始化的流程资产库"0"-不是;"1"-是
$('#wsId').val(ws[i].id); $('#wsId').val(ws[i].id);
$('#wsNameDiv').text(ws[i].text); $('#wsNameDiv').text(ws[i].text);
} }
} }
} }
html += "</li>"; html += "</li>";
$('#changeWsDialog').html(html); $('#changeWsDialog').html(html);
} }
function changeWs(obj) { function changeWs(obj) {
$('#wsNameDiv').text($(obj).attr('name')); $('#wsNameDiv').text($(obj).attr('name'));
$('#changeWsDialog').hide(); $('#changeWsDialog').hide();
if($('#wsId').val() == $(obj).attr('data-id')) return; if($('#wsId').val() == $(obj).attr('data-id')) return;
$('#wsId').val($(obj).attr('data-id')); $('#wsId').val($(obj).attr('data-id'));
var activeTab = $('#tabs').children('a.active').attr('tit'); var activeTab = $('#tabs').children('a.active').attr('tit');
onchange('', activeTab); onchange('', activeTab);
} }
/********************************************门户其他操作*****************************************************/ /********************************************门户其他操作*****************************************************/
//修改密码 //修改密码
function modifyPwd() { function modifyPwd() {
$('#modify_dialog').find('input').val(''); $('#modify_dialog').find('input').val('');
$("#userName").click(); $("#userName").click();
$("#modify_dialog").dialog({ $("#modify_dialog").dialog({
width: 610, width: 610,
title: "修改登录口令", title: "修改登录口令",
closable: false, closable: false,
buttons: [ buttons: [
{text:'确定',cls:"blue",handler:function(){ {text:'确定',cls:"blue",handler:function(){
var oldPassword = $('#oldPassword').val(); var oldPassword = $('#oldPassword').val();
var password = $('#password').val(); var password = $('#password').val();
var confirmPassword = $('#confirmPassword').val(); var confirmPassword = $('#confirmPassword').val();
if (oldPassword.trim() == "") { if (oldPassword.trim() == "") {
$.simpleAlert("[旧口令]不允许为空", "info"); $.simpleAlert("[旧口令]不允许为空", "info");
return; return;
} }
if (password.trim() == "") { if (password.trim() == "") {
$.simpleAlert("[新口令]不允许为空", "info"); $.simpleAlert("[新口令]不允许为空", "info");
return; return;
} }
if (confirmPassword.trim() == "") { if (confirmPassword.trim() == "") {
$.simpleAlert("[确认口令]不允许为空", "info"); $.simpleAlert("[确认口令]不允许为空", "info");
return; return;
} }
if (oldPassword == password) { if (oldPassword == password) {
$.simpleAlert("新口令不能和旧口令相同", "info"); $.simpleAlert("新口令不能和旧口令相同", "info");
return false; return false;
} }
if (password != confirmPassword) { if (password != confirmPassword) {
$.simpleAlert("新口令和确认口令不一致", "info"); $.simpleAlert("新口令和确认口令不一致", "info");
return; return;
} }
if (password.indexOf(" ") > -1) { if (password.indexOf(" ") > -1) {
$.simpleAlert("[新口令]不能包含空格", "info", 2000); $.simpleAlert("[新口令]不能包含空格", "info", 2000);
return false; return false;
} }
if (confirmPassword.indexOf(" ") > -1) { if (confirmPassword.indexOf(" ") > -1) {
$.simpleAlert("[确认口令]不能包含空格", "info", 2000); $.simpleAlert("[确认口令]不能包含空格", "info", 2000);
return false; return false;
} }
if (Loginpassword.validateUpdateLoginpassword(password, "[新口令]")) { if (Loginpassword.validateUpdateLoginpassword(password, "[新口令]")) {
return false; return false;
} }
var params={}; var params={};
params.sid=$("input[name='sid']").val(); params.sid=$("input[name='sid']").val();
params.cmd="CLIENT_P_PERSON_CONFIG_PW_ISRIGHT"; params.cmd="CLIENT_P_PERSON_CONFIG_PW_ISRIGHT";
params.oldpwd=oldPassword; params.oldpwd=oldPassword;
$.ajax({ $.ajax({
type: "POST", type: "POST",
url: "./w", url: "./w",
data: params, data: params,
success: function(msg){ success: function(msg){
if(msg== '-1'){ if(msg== '-1'){
$.simpleAlert("旧口令输入错误,请重新输入", "error", 2000); $.simpleAlert("旧口令输入错误,请重新输入", "error", 2000);
return false; return false;
} }
var maxLength = securityMaxPwdLength; var maxLength = securityMaxPwdLength;
if (length2(oldPassword) > maxLength||length2(password) > maxLength || length2(confirmPassword) > maxLength) { if (length2(oldPassword) > maxLength||length2(password) > maxLength || length2(confirmPassword) > maxLength) {
$.simpleAlert("口令长度不能超过" + maxLength + "位", "info", 2000); $.simpleAlert("口令长度不能超过" + maxLength + "位", "info", 2000);
return false; return false;
} }
//增加口令长度判断,默认情况下关闭 //增加口令长度判断,默认情况下关闭
if (!checkPasswordLength(password, confirmPassword)) { if (!checkPasswordLength(password, confirmPassword)) {
return false; return false;
} }
//增加口令复杂度校验,默认情况下关闭 //增加口令复杂度校验,默认情况下关闭
if (!checkPasswordSecurity('password')) { if (!checkPasswordSecurity('password')) {
return false; return false;
} }
var params={}; var params={};
params.sid=$("input[name='sid']").val(); params.sid=$("input[name='sid']").val();
params.cmd="CLIENT_P_PERSON_CONFIG_PW_SAVE"; params.cmd="CLIENT_P_PERSON_CONFIG_PW_SAVE";
params.oldpwd=oldPassword; params.oldpwd=oldPassword;
params.newpwd=password; params.newpwd=password;
$.ajax({ $.ajax({
type: "POST", type: "POST",
url: "./w", url: "./w",
data: params, data: params,
success: function(msg){ success: function(msg){
if(awsui.decode(msg)){ if(awsui.decode(msg)){
var r=awsui.decode(msg); var r=awsui.decode(msg);
$.simpleAlert(r.msg, r.result, 2000, {callback:function(){ $.simpleAlert(r.msg, r.result, 2000, {callback:function(){
if(r.result == 'ok'){ if(r.result == 'ok'){
$("#modify_dialog").dialog("close"); $("#modify_dialog").dialog("close");
} }
}}); }});
} }
} }
}); });
} }
}); });
} }
}, },
{text:'关闭',handler:function(){ {text:'关闭',handler:function(){
$("#modify_dialog").dialog('close'); $("#modify_dialog").dialog('close');
} }
} }
] ]
}); });
} }
//切换到CoE //切换到CoE
function entryCoE() { function entryCoE() {
var params = {}; var params = {};
params.cmd = 'CLIENT_USER_BPMCLIENT_SID'; params.cmd = 'CLIENT_USER_BPMCLIENT_SID';
params.type = 'COE'; params.type = 'COE';
params.sid = $("#sid").val(); params.sid = $("#sid").val();
document.frm.cmd.value = "com.actionsoft.apps.coe.pal_user_home_page"; document.frm.cmd.value = "com.actionsoft.apps.coe.pal_user_home_page";
var newSid; var newSid;
awsui.ajax.request({ awsui.ajax.request({
type : "POST", type : "POST",
url : "./jd", url : "./jd",
async : false, async : false,
dataType : "json", dataType : "json",
data : params, data : params,
success : function(data) { success : function(data) {
newSid = data.data.sid; newSid = data.data.sid;
if (newSid == undefined) { if (newSid == undefined) {
$.simpleAlert("获取SID不正确", "info"); $.simpleAlert("获取SID不正确", "info");
return; return;
} }
document.frm.sid.value = newSid; document.frm.sid.value = newSid;
document.frm.target = "_self"; document.frm.target = "_self";
document.frm.submit(); document.frm.submit();
} }
}); });
} }
//参数设置 //参数设置
function setting() { function setting() {
$("#userName").click(); $("#userName").click();
awsui.ajax.request({ awsui.ajax.request({
url : "./jd?sid=" + $("#sid").val() + "&cmd=com.actionsoft.apps.coe.pal.publisher_client_sso_setting_data", url : "./jd?sid=" + $("#sid").val() + "&cmd=com.actionsoft.apps.coe.pal.publisher_client_sso_setting_data",
method : "POST", method : "POST",
ok : function(r) { ok : function(r) {
var data = r.data; var data = r.data;
$("#isComment").customSelect(data.isComment); $("#isComment").customSelect(data.isComment);
$("#isPrint").customSelect(data.isPrint); $("#isPrint").customSelect(data.isPrint);
$("#isViewAttribute").customSelect(data.isViewAttribute); $("#isViewAttribute").customSelect(data.isViewAttribute);
$("#isViewHistory").customSelect(data.isViewHistory); $("#isViewHistory").customSelect(data.isViewHistory);
$("#title").val(data.title); $("#title").val(data.title);
$("#fotter").val(data.fotter); $("#fotter").val(data.fotter);
$("#setting_dialog").dialog({ $("#setting_dialog").dialog({
width: 500, width: 500,
title: "设置参数", title: "设置参数",
buttons: [ buttons: [
{text:'确定',cls:"blue",handler:function(){ {text:'确定',cls:"blue",handler:function(){
//门户标题 //门户标题
var title = $("#title").val(); var title = $("#title").val();
if (title == "") { if (title == "") {
$.simpleAlert("[门户标题]不允许为空"); $.simpleAlert("[门户标题]不允许为空");
return; return;
} }
if (strlen(title) > 20) { if (strlen(title) > 20) {
$.simpleAlert("[门户标题]长度不允许超过20个字符"); $.simpleAlert("[门户标题]长度不允许超过20个字符");
return; return;
} }
//页底信息 //页底信息
var fotter = $("#fotter").val(); var fotter = $("#fotter").val();
if (fotter == "") { if (fotter == "") {
$.simpleAlert("[页底信息]不允许为空"); $.simpleAlert("[页底信息]不允许为空");
return; return;
} }
if (strlen(fotter) > 40) { if (strlen(fotter) > 40) {
$.simpleAlert("[页底信息]长度不允许超过40个字符"); $.simpleAlert("[页底信息]长度不允许超过40个字符");
return; return;
} }
//允许留言 //允许留言
var isComment = $("#isComment").val().trim(); var isComment = $("#isComment").val().trim();
if (isComment == "") { if (isComment == "") {
$.simpleAlert("[允许留言]不允许为空"); $.simpleAlert("[允许留言]不允许为空");
return; return;
} }
if (isComment != "true" && isComment != "false") { if (isComment != "true" && isComment != "false") {
$.simpleAlert("[允许留言]应该为'true'或'false'"); $.simpleAlert("[允许留言]应该为'true'或'false'");
return; return;
} }
//允许打印 //允许打印
var isPrint = $("#isPrint").val().trim(); var isPrint = $("#isPrint").val().trim();
if (isPrint == "") { if (isPrint == "") {
$.simpleAlert("[允许打印]不允许为空"); $.simpleAlert("[允许打印]不允许为空");
return; return;
} }
if (isPrint != "true" && isPrint != "false") { if (isPrint != "true" && isPrint != "false") {
$.simpleAlert("[允许打印]应该为'true'或'false'"); $.simpleAlert("[允许打印]应该为'true'或'false'");
return; return;
} }
//允许查看属性 //允许查看属性
var isViewAttribute = $("#isViewAttribute").val().trim(); var isViewAttribute = $("#isViewAttribute").val().trim();
if (isViewAttribute == "") { if (isViewAttribute == "") {
$.simpleAlert("[允许查看属性]不允许为空"); $.simpleAlert("[允许查看属性]不允许为空");
return; return;
} }
if (isViewAttribute != "true" && isViewAttribute != "false") { if (isViewAttribute != "true" && isViewAttribute != "false") {
$.simpleAlert("[允许查看属性]应该为'true'或'false'"); $.simpleAlert("[允许查看属性]应该为'true'或'false'");
return; return;
} }
//允许查看发布历史 //允许查看发布历史
var isViewHistory = $("#isViewHistory").val().trim(); var isViewHistory = $("#isViewHistory").val().trim();
if (isViewHistory == "") { if (isViewHistory == "") {
$.simpleAlert("[允许查看发布历史]不允许为空"); $.simpleAlert("[允许查看发布历史]不允许为空");
return; return;
} }
if (isViewHistory != "true" && isViewHistory != "false") { if (isViewHistory != "true" && isViewHistory != "false") {
$.simpleAlert("[允许查看发布历史]应该为'true'或'false'"); $.simpleAlert("[允许查看发布历史]应该为'true'或'false'");
return; return;
} }
$.ajax({ $.ajax({
type: "POST", type: "POST",
url: "./jd?sid=" + encodeURIComponent($("#sid").val()) + "&cmd=com.actionsoft.apps.coe.pal.publisher_client_sso_setting", url: "./jd?sid=" + encodeURIComponent($("#sid").val()) + "&cmd=com.actionsoft.apps.coe.pal.publisher_client_sso_setting",
data: { data: {
title: title, title: title,
fotter: fotter, fotter: fotter,
isComment: isComment, isComment: isComment,
isPrint: isPrint, isPrint: isPrint,
isViewAttribute: isViewAttribute, isViewAttribute: isViewAttribute,
isViewHistory: isViewHistory isViewHistory: isViewHistory
}, },
success: function(msg) { success: function(msg) {
if (msg.result == "ok") { if (msg.result == "ok") {
$.simpleAlert("修改成功", "ok", {callback:function(){ $.simpleAlert("修改成功", "ok", {callback:function(){
$("#setting_dialog").dialog('close'); $("#setting_dialog").dialog('close');
location.reload(); location.reload();
} }
}); });
} else { } else {
$.simpleAlert(msg.msg, msg.result); $.simpleAlert(msg.msg, msg.result);
} }
} }
}) })
} }
}, },
{text:'关闭',handler:function(){ {text:'关闭',handler:function(){
$("#setting_dialog").dialog('close'); $("#setting_dialog").dialog('close');
} }
} }
] ]
}); });
}, },
err:function(r){ err:function(r){
} }
}); });
} }
//退出 //退出
function logout() { function logout() {
$("#userName").click(); $("#userName").click();
var sid = $("#sid").val(); var sid = $("#sid").val();
$.confirm({'title': "提示", $.confirm({'title': "提示",
content: '确认离开系统吗?', content: '确认离开系统吗?',
onConfirm: function() { onConfirm: function() {
window.location.href = "./w?sid="+sid+'&cmd=com.actionsoft.apps.coe.pal.publisher_client_sso_logout'; window.location.href = "./w?sid="+sid+'&cmd=com.actionsoft.apps.coe.pal.publisher_client_sso_logout';
window.history = -1; window.history = -1;
} }
}); });
} }
//判断字符长度 //判断字符长度
@ -340,7 +340,7 @@ function strlen(str) {
var len = 0; var len = 0;
for (var i = 0; i < str.length; i++) { for (var i = 0; i < str.length; i++) {
var c = str.charCodeAt(i); var c = str.charCodeAt(i);
//单字节加1 //单字节加1
if ((c >= 0x0001 && c <= 0x007e) || (0xff60 <= c && c <= 0xff9f)) { if ((c >= 0x0001 && c <= 0x007e) || (0xff60 <= c && c <= 0xff9f)) {
len++; len++;
} }
@ -353,63 +353,63 @@ function strlen(str) {
//安全验证 //安全验证
function checkPasswordSecurity(id) { function checkPasswordSecurity(id) {
if (jQuery("#complexity").val() == "false"||jQuery("#complexity").val()==undefined) { if (jQuery("#complexity").val() == "false"||jQuery("#complexity").val()==undefined) {
return true; return true;
}//不进行验证 }//不进行验证
var val = jQuery("input[name=" + id + "]").val(); var val = jQuery("input[name=" + id + "]").val();
//必须是数字和大小写字母 //必须是数字和大小写字母
if (val.match("^[A-Za-z0-9]+$")) {//val.match("^[A-Za-z0-9]+$").length > 0 if (val.match("^[A-Za-z0-9]+$")) {//val.match("^[A-Za-z0-9]+$").length > 0
//必须包含数字和大小写字母 //必须包含数字和大小写字母
if (val.match("[A-Z]+") && val.match("[a-z]+") && val.match("[0-9]+")) { if (val.match("[A-Z]+") && val.match("[a-z]+") && val.match("[0-9]+")) {
return true; return true;
} else { } else {
$.simpleAlert("安全级别过低请使用大小写字母和数字", "error", 2000); $.simpleAlert("安全级别过低请使用大小写字母和数字", "error", 2000);
return false; return false;
} }
} else { } else {
$.simpleAlert("请使用大小写字母和数字不能包含其他特殊字符", "error", 2000); $.simpleAlert("请使用大小写字母和数字不能包含其他特殊字符", "error", 2000);
return false; return false;
} }
} }
//判断口令长度 //判断口令长度
function checkPasswordLength(pwd1, pwd2) { function checkPasswordLength(pwd1, pwd2) {
var minLength = jQuery("#minLength").val(); var minLength = jQuery("#minLength").val();
if (length2(pwd1) < minLength || length2(pwd2) < minLength) { if (length2(pwd1) < minLength || length2(pwd2) < minLength) {
$.simpleAlert("口令长度不能少于" + minLength + "位", "error", 2000); $.simpleAlert("口令长度不能少于" + minLength + "位", "error", 2000);
return false; return false;
} else { } else {
return true; return true;
} }
} }
//判断口令的复杂程度 //判断口令的复杂程度
function checkPasswordStrength(pwd1) { function checkPasswordStrength(pwd1) {
var len = pwd1.match(/[a-z](?![^a-z]*[a-z])|[A-Z](?![^A-Z]*[A-Z])|\d(?![^\d]*\d)|[^a-zA-Z\d](?![a-zA-Z\d]*[^a-zA-Z\d])/g).length; var len = pwd1.match(/[a-z](?![^a-z]*[a-z])|[A-Z](?![^A-Z]*[A-Z])|\d(?![^\d]*\d)|[^a-zA-Z\d](?![a-zA-Z\d]*[^a-zA-Z\d])/g).length;
/*len /*len
1: 密码有一种组合 1: 密码有一种组合
2: 密码有两种组合 2: 密码有两种组合
3: 密码有三种组合 3: 密码有三种组合
4: 密码有四种组合 4: 密码有四种组合
四种组合指 数字,小写字母,大写字母,其它字符 四种组合指 数字,小写字母,大写字母,其它字符
*/ */
if (len < 3) {//此处3可修改为上面列表中的值判断强度等级 if (len < 3) {//此处3可修改为上面列表中的值判断强度等级
$.simpleAlert("密码的强度较弱请使用大小写英文字母数字和特殊字符的组合", "error", 2000); $.simpleAlert("密码的强度较弱请使用大小写英文字母数字和特殊字符的组合", "error", 2000);
return true; return true;
} else { } else {
return false; return false;
} }
} }
//判断一个串实际长度1个中文2个单位 //判断一个串实际长度1个中文2个单位
function length2(txtValue){ function length2(txtValue){
if (txtValue!=null) { if (txtValue!=null) {
if (txtValue.indexOf('.')!=-1) { if (txtValue.indexOf('.')!=-1) {
txtValue = txtValue.substring(1,txtValue.indexOf('.')); txtValue = txtValue.substring(1,txtValue.indexOf('.'));
txtValue = txtValue.split(",").join(""); txtValue = txtValue.split(",").join("");
} }
} }
var cArr = txtValue.match(/[^\x00-\xff]/ig); var cArr = txtValue.match(/[^\x00-\xff]/ig);
return txtValue.length + (cArr == null ? 0 : cArr.length); return txtValue.length + (cArr == null ? 0 : cArr.length);
} }

View File

@ -1,218 +1,218 @@
//修改展示方式 //修改展示方式
function changeShowStyle(obj){ function changeShowStyle(obj){
$("#show_style_icon span").removeClass("current"); $("#show_style_icon span").removeClass("current");
obj.addClass("current"); obj.addClass("current");
if (obj.attr("iconType") == "tile") { if (obj.attr("iconType") == "tile") {
$("#content_tile").show(); $("#content_tile").show();
$("#content_list").hide(); $("#content_list").hide();
} else { } else {
$("#content_tile").hide(); $("#content_tile").hide();
$("#content_list").show(); $("#content_list").show();
} }
} }
//查询数据 //查询数据
function search(palIds) { function search(palIds) {
var filter = {}; var filter = {};
var plrdValue = ""; var plrdValue = "";
var plrpValue = ""; var plrpValue = "";
var publishdateValue = ""; var publishdateValue = "";
$("#filter-content #plrd li.selected").each(function(){ $("#filter-content #plrd li.selected").each(function(){
plrdValue += $(this).attr("filterValue") + ","; plrdValue += $(this).attr("filterValue") + ",";
}) })
$("#filter-content #plrp li.selected").each(function(){ $("#filter-content #plrp li.selected").each(function(){
plrpValue += $(this).attr("filterValue") + ","; plrpValue += $(this).attr("filterValue") + ",";
}) })
$("#filter-content #publishdate li.selected").each(function(){ $("#filter-content #publishdate li.selected").each(function(){
publishdateValue += $(this).attr("filterValue") + ","; publishdateValue += $(this).attr("filterValue") + ",";
}) })
if (plrdValue.length > 0) { if (plrdValue.length > 0) {
filter.plrd = plrdValue.substring(0, plrdValue.length - 1); filter.plrd = plrdValue.substring(0, plrdValue.length - 1);
} }
if (plrpValue.length > 0) { if (plrpValue.length > 0) {
filter.plrp = plrpValue.substring(0, plrpValue.length - 1); filter.plrp = plrpValue.substring(0, plrpValue.length - 1);
} }
if (publishdateValue.length > 0) { if (publishdateValue.length > 0) {
filter.publishdate = publishdateValue.substring(0, publishdateValue.length - 1); filter.publishdate = publishdateValue.substring(0, publishdateValue.length - 1);
} }
var params = { var params = {
palIds: palIds, palIds: palIds,
filter: json2String(filter), filter: json2String(filter),
order: $('#order_select').val(), order: $('#order_select').val(),
name: $('#palName').val() name: $('#palName').val()
} }
awsui.ajax.request({ awsui.ajax.request({
url : "./jd?sid=" + $("#sid").val() + "&cmd=com.actionsoft.apps.coe.pal.publisher_client_sso_search", url : "./jd?sid=" + $("#sid").val() + "&cmd=com.actionsoft.apps.coe.pal.publisher_client_sso_search",
method : "POST", method : "POST",
data : params, data : params,
ok : function(msg) { ok : function(msg) {
write(msg.data.result); write(msg.data.result);
}, },
err:function(r){ err:function(r){
} }
}); });
} }
//生成搜索结果html //生成搜索结果html
function write(data) { function write(data) {
var html = ""; var html = "";
var html_list = ""; var html_list = "";
for (var i in data) { for (var i in data) {
var style = ""; var style = "";
var click = ""; var click = "";
var dbclick=""; var dbclick="";
if (data[i].methodId == "default") { if (data[i].methodId == "default") {
style = "cursor: default;"; style = "cursor: default;";
dbclick="dbClickModelLi($(this))"; dbclick="dbClickModelLi($(this))";
} else { } else {
click = "clickModelLi($(this))"; click = "clickModelLi($(this))";
style = "cursor: pointer;"; style = "cursor: pointer;";
if (data[i].isActive == false) { if (data[i].isActive == false) {
click = "clickDisActiveLi(); return false;"; click = "clickDisActiveLi(); return false;";
} }
} }
html += "<li id='" + data[i].id + "' processDefId='" + data[i].processDefId + "' methodId='" + data[i].methodId + "' processName='" + data[i].name + "' onclick='" + click + "' ondblclick='" + dbclick + "'>" html += "<li id='" + data[i].id + "' processDefId='" + data[i].processDefId + "' methodId='" + data[i].methodId + "' processName='" + data[i].name + "' onclick='" + click + "' ondblclick='" + dbclick + "'>"
+ " <div style='" + style + "'><img src=\"" + data[i].imgPath + "\" /></div>" + " <div style='" + style + "'><img src=\"" + data[i].imgPath + "\" /></div>"
+ " <label>" + data[i].name + "</label>" + " <label>" + data[i].name + "</label>"
+ "</li>"; + "</li>";
var image = ""; var image = "";
if (data[i].methodId == "default") { if (data[i].methodId == "default") {
image = "../apps/com.actionsoft.apps.coe.pal.publisher/img/folder.png"; image = "../apps/com.actionsoft.apps.coe.pal.publisher/img/folder.png";
} else { } else {
image = "../apps/com.actionsoft.apps.coe.pal.publisher/img/file.png"; image = "../apps/com.actionsoft.apps.coe.pal.publisher/img/file.png";
} }
html_list += "<tr id='" + data[i].id + "' processDefId='" + data[i].processDefId + "' methodId='" + data[i].methodId + "' processName='" + data[i].name + "' onclick='" + click + "' ondblclick='" + dbclick + "'>" html_list += "<tr id='" + data[i].id + "' processDefId='" + data[i].processDefId + "' methodId='" + data[i].methodId + "' processName='" + data[i].name + "' onclick='" + click + "' ondblclick='" + dbclick + "'>"
+ " <td style='padding-left: 20px; " + style + "'><img src='" + image + "' style='margin-right: 10px;'>" + data[i].name + "</td>" + " <td style='padding-left: 20px; " + style + "'><img src='" + image + "' style='margin-right: 10px;'>" + data[i].name + "</td>"
+ " <td style='text-align: center;'>" + data[i].publishDate + "</td>" + " <td style='text-align: center;'>" + data[i].publishDate + "</td>"
+ " <td style='text-align: center;'>" + data[i].version + "</td>" + " <td style='text-align: center;'>" + data[i].version + "</td>"
+ " <td>" + data[i].plrd + "</td>" + " <td>" + data[i].plrd + "</td>"
+ " <td>" + data[i].plrp + "</td>" + " <td>" + data[i].plrp + "</td>"
+ "</tr>"; + "</tr>";
} }
$("#content_tile ul").html(html); $("#content_tile ul").html(html);
$("#content_table tbody").html(html_list); $("#content_table tbody").html(html_list);
} }
function clickNodeToSearch(ids) { function clickNodeToSearch(ids) {
var navigation = parent.getNavigation(); var navigation = parent.getNavigation();
$("#navigation").html(navigation); $("#navigation").html(navigation);
$("#navigation a").on("click", function(){ $("#navigation a").on("click", function(){
var nodeId = $(this).attr("nodeId"); var nodeId = $(this).attr("nodeId");
parent.clickNavigation(nodeId); parent.clickNavigation(nodeId);
}); });
var palIds = parent.palIds; var palIds = parent.palIds;
if (ids != undefined) { if (ids != undefined) {
palIds = ids; palIds = ids;
} }
search(palIds); search(palIds);
} }
function clickSearchButton() { function clickSearchButton() {
var selectedTreeNode = parent.repositoryTree.getSelectedNode(); var selectedTreeNode = parent.repositoryTree.getSelectedNode();
var navigation = "搜索:<span class='search_span current' nodeId='-1'>所有文件</span><span class='search_span' nodeId='" + selectedTreeNode.id + "'>" + selectedTreeNode.name + "</span>"; var navigation = "搜索:<span class='search_span current' nodeId='-1'>所有文件</span><span class='search_span' nodeId='" + selectedTreeNode.id + "'>" + selectedTreeNode.name + "</span>";
$("#navigation").html(navigation); $("#navigation").html(navigation);
$("#navigation span").on("click", function(){ $("#navigation span").on("click", function(){
$("#navigation span").removeClass("current"); $("#navigation span").removeClass("current");
$(this).addClass("current"); $(this).addClass("current");
clickSearchType4search(); clickSearchType4search();
}); });
clickSearchType4search(); clickSearchType4search();
} }
function clickSearchType4search(){ function clickSearchType4search(){
var nodeId = $("#navigation span.current").attr("nodeId"); var nodeId = $("#navigation span.current").attr("nodeId");
var palIds = ''; var palIds = '';
if (nodeId != "-1") { if (nodeId != "-1") {
palIds = parent.palIds; palIds = parent.palIds;
} else { } else {
var datas = parent.wsTreeData; var datas = parent.wsTreeData;
for (var i in datas) { for (var i in datas) {
palIds += datas[i].id + ","; palIds += datas[i].id + ",";
} }
if (palIds.length > 0) { if (palIds.length > 0) {
palIds = palIds.substring(0, palIds.length-1); palIds = palIds.substring(0, palIds.length-1);
} }
} }
search(palIds); search(palIds);
} }
function initPlrdAndPlrp(obj, datas) { function initPlrdAndPlrp(obj, datas) {
var html = ""; var html = "";
for (var i in datas) { for (var i in datas) {
html += "<li filterValue='" + datas[i].id + "'>" + datas[i].name + "</li>"; html += "<li filterValue='" + datas[i].id + "'>" + datas[i].name + "</li>";
} }
obj.html(html); obj.html(html);
} }
function selectFilter(obj) { function selectFilter(obj) {
if (obj.parent().parent().attr("id") == "publishdate") { if (obj.parent().parent().attr("id") == "publishdate") {
if (obj.hasClass("selected")) { if (obj.hasClass("selected")) {
$("#publishdate li").removeClass("selected"); $("#publishdate li").removeClass("selected");
} else { } else {
$("#publishdate li").removeClass("selected"); $("#publishdate li").removeClass("selected");
obj.addClass("selected"); obj.addClass("selected");
} }
} else { } else {
obj.toggleClass("selected"); obj.toggleClass("selected");
} }
} }
//点击模型文件图标 //点击模型文件图标
function clickModelLi(obj) { function clickModelLi(obj) {
if (obj.attr("methodId") == "default") { if (obj.attr("methodId") == "default") {
return; return;
} }
var data = { var data = {
id: obj.attr("id"), id: obj.attr("id"),
processDefId: obj.attr("processDefId"), processDefId: obj.attr("processDefId"),
methodId: obj.attr("methodId"), methodId: obj.attr("methodId"),
title: obj.attr("processName") title: obj.attr("processName")
} }
parent.openTab(data); parent.openTab(data);
} }
function clickDisActiveLi() { function clickDisActiveLi() {
$.simpleAlert('该应用未安装或已暂停'); $.simpleAlert('该应用未安装或已暂停');
} }
function dbClickModelLi(obj) { function dbClickModelLi(obj) {
parent.clickNavigation(obj.attr("id")); parent.clickNavigation(obj.attr("id"));
} }
function json2String(obj) { function json2String(obj) {
var THIS = this; var THIS = this;
switch (typeof(obj)) { switch (typeof(obj)) {
case 'string': case 'string':
return '"' + obj.replace(/(["\\])/g, '\\$1') + '"'; return '"' + obj.replace(/(["\\])/g, '\\$1') + '"';
case 'array': case 'array':
return '[' + obj.map(THIS.json2String).join(',') + ']'; return '[' + obj.map(THIS.json2String).join(',') + ']';
case 'object': case 'object':
if (obj instanceof Array || Object.prototype.toString.call(obj) === '[object Array]') { if (obj instanceof Array || Object.prototype.toString.call(obj) === '[object Array]') {
var strArr = []; var strArr = [];
var len = obj.length; var len = obj.length;
for (var i = 0; i < len; i++) { for (var i = 0; i < len; i++) {
strArr.push(THIS.json2String(obj[i])); strArr.push(THIS.json2String(obj[i]));
} }
return '[' + strArr.join(',') + ']'; return '[' + strArr.join(',') + ']';
} else if (obj == null) { } else if (obj == null) {
return 'null'; return 'null';
} else { } else {
var string = []; var string = [];
for (var property in obj) string.push(THIS.json2String(property) + ':' + THIS.json2String(obj[property])); for (var property in obj) string.push(THIS.json2String(property) + ':' + THIS.json2String(obj[property]));
return '{' + string.join(',') + '}'; return '{' + string.join(',') + '}';
} }
case 'number': case 'number':
return obj; return obj;
case 'boolean': case 'boolean':
return obj; return obj;
case false: case false:
return obj; return obj;
case 'function': case 'function':
return obj.toString(); return obj.toString();
} }
} }

View File

@ -1,87 +1,87 @@
$(function(){ $(function(){
initWs(); initWs();
initOrg(); initOrg();
if (type == 'ws') { if (type == 'ws') {
$('#tabs').find('a[tit=tab1]').click(); $('#tabs').find('a[tit=tab1]').click();
$('#ws').show(); $('#ws').show();
} }
if (type == 'org') { if (type == 'org') {
$('#tabs').find('a[tit=tab2]').click(); $('#tabs').find('a[tit=tab2]').click();
$('#org').show(); $('#org').show();
} }
loadData(type); loadData(type);
}) })
/**************资产库切换*******************/ /**************资产库切换*******************/
function initWs() { function initWs() {
$("#wsChangeArea").off("mouseenter").on("mouseenter", function () { $("#wsChangeArea").off("mouseenter").on("mouseenter", function () {
$('#changeWsDialog').show(); $('#changeWsDialog').show();
}).off("mouseleave").on("mouseleave", function () { }).off("mouseleave").on("mouseleave", function () {
$('#changeWsDialog').hide(); $('#changeWsDialog').hide();
}); });
var html = "<li>"; var html = "<li>";
var wsName = ''; var wsName = '';
for (var i = 0; i < ws.length; i++) { for (var i = 0; i < ws.length; i++) {
html += '<ul style="text-overflow: ellipsis;overflow:hidden;width:200px;white-space: nowrap;" data-id="' + ws[i].id + '" name="' + ws[i].text + '" onclick="changeWs(this);" onMouseOver="this.style.color=\'#C2C2C2\'" onMouseOut="this.style.color=\'#000\'">' + ws[i].text + '</ul>'; html += '<ul style="text-overflow: ellipsis;overflow:hidden;width:200px;white-space: nowrap;" data-id="' + ws[i].id + '" name="' + ws[i].text + '" onclick="changeWs(this);" onMouseOver="this.style.color=\'#C2C2C2\'" onMouseOut="this.style.color=\'#000\'">' + ws[i].text + '</ul>';
if (ws[i].id == wsId) { if (ws[i].id == wsId) {
wsName = ws[i].text; wsName = ws[i].text;
} }
} }
html += "</li>"; html += "</li>";
if (ws.length > 0) { if (ws.length > 0) {
$('#wsId').val(wsId); $('#wsId').val(wsId);
$('#wsNameDiv').text(wsName); $('#wsNameDiv').text(wsName);
} }
$('#changeWsDialog').html(html); $('#changeWsDialog').html(html);
} }
function changeWs(obj) { function changeWs(obj) {
$('#wsNameDiv').text($(obj).attr('name')); $('#wsNameDiv').text($(obj).attr('name'));
$('#changeWsDialog').hide(); $('#changeWsDialog').hide();
if(wsId == $(obj).attr('data-id')) return; if(wsId == $(obj).attr('data-id')) return;
wsId = $(obj).attr('data-id'); wsId = $(obj).attr('data-id');
loadData(type); loadData(type);
} }
/**************组织单位切换*******************/ /**************组织单位切换*******************/
function initOrg() { function initOrg() {
$("#orgChangeArea").off("mouseenter").on("mouseenter", function () { $("#orgChangeArea").off("mouseenter").on("mouseenter", function () {
$('#changeOrgDialog').show(); $('#changeOrgDialog').show();
}).off("mouseleave").on("mouseleave", function () { }).off("mouseleave").on("mouseleave", function () {
$('#changeOrgDialog').hide(); $('#changeOrgDialog').hide();
}); });
var html = "<li>"; var html = "<li>";
var orgName = ''; var orgName = '';
for (var i = 0; i < org.length; i++) { for (var i = 0; i < org.length; i++) {
html += '<ul style="text-overflow: ellipsis;overflow:hidden;width:200px;white-space: nowrap;" data-id="' + org[i].id + '" name="' + org[i].text + '" onclick="changeOrg(this);" onMouseOver="this.style.color=\'#C2C2C2\'" onMouseOut="this.style.color=\'#000\'">' + org[i].text + '</ul>'; html += '<ul style="text-overflow: ellipsis;overflow:hidden;width:200px;white-space: nowrap;" data-id="' + org[i].id + '" name="' + org[i].text + '" onclick="changeOrg(this);" onMouseOver="this.style.color=\'#C2C2C2\'" onMouseOut="this.style.color=\'#000\'">' + org[i].text + '</ul>';
if (org[i].id == orgId) { if (org[i].id == orgId) {
orgName = org[i].text; orgName = org[i].text;
} }
} }
html += "</li>"; html += "</li>";
if (org.length > 0) { if (org.length > 0) {
$('#orgId').val(orgId); $('#orgId').val(orgId);
$('#orgNameDiv').text(orgName); $('#orgNameDiv').text(orgName);
} }
$('#changeOrgDialog').html(html); $('#changeOrgDialog').html(html);
} }
function changeOrg(obj) { function changeOrg(obj) {
$('#orgNameDiv').text($(obj).attr('name')); $('#orgNameDiv').text($(obj).attr('name'));
$('#changeOrgDialog').hide(); $('#changeOrgDialog').hide();
if(orgId == $(obj).attr('data-id')) return; if(orgId == $(obj).attr('data-id')) return;
orgId = $(obj).attr('data-id'); orgId = $(obj).attr('data-id');
loadData(type); loadData(type);
} }
// 加载页面数据 // 加载页面数据
function loadData(type) { function loadData(type) {
if (type == 'ws') { if (type == 'ws') {
$('#main-frm').attr('src', './w?sid='+sid+'&cmd=com.actionsoft.apps.coe.pal.publisher_client_sso_ws_page&wsId=' + wsId); $('#main-frm').attr('src', './w?sid='+sid+'&cmd=com.actionsoft.apps.coe.pal.publisher_client_sso_ws_page&wsId=' + wsId);
} }
if (type == 'org') { if (type == 'org') {
$('#main-frm2').attr('src', './w?sid='+sid+'&cmd=com.actionsoft.apps.coe.pal.publisher_client_sso_org_page&orgId=' + orgId); $('#main-frm2').attr('src', './w?sid='+sid+'&cmd=com.actionsoft.apps.coe.pal.publisher_client_sso_org_page&orgId=' + orgId);
} }
} }
// tab切换 // tab切换
@ -90,32 +90,32 @@ function onbeforechange(tab, contentTabId, newTabId) {
// tab切换 // tab切换
function onchange(tab, newTabId) { function onchange(tab, newTabId) {
$('#ws').hide(); $('#ws').hide();
$('#org').hide(); $('#org').hide();
if (newTabId == 'tab1') { if (newTabId == 'tab1') {
type = 'ws'; type = 'ws';
$('#org').hide(); $('#org').hide();
$('#ws').show(); $('#ws').show();
} }
if (newTabId == 'tab2') { if (newTabId == 'tab2') {
type = 'org'; type = 'org';
$('#ws').hide(); $('#ws').hide();
$('#org').show(); $('#org').show();
} }
loadData(type); loadData(type);
} }
// 查询 // 查询
function search() { function search() {
// 所有类型,搜索框内容,当前类型, // 所有类型,搜索框内容,当前类型,
var text = $('#searchText').val().trim(); var text = $('#searchText').val().trim();
var type = 'processmap'; var type = 'processmap';
var templateId = '30267ab3-aeb6-4371-88e0-ecc13cef94a6'; var templateId = '30267ab3-aeb6-4371-88e0-ecc13cef94a6';
text = encodeURI(text); text = encodeURI(text);
window.open("./w?cmd=com.actionsoft.apps.coe.pal.publisher_client_sso_search_page&sid=" + sid + "&type=" + type + "&templateId=" + templateId + "&text=" + text, "_blank"); window.open("./w?cmd=com.actionsoft.apps.coe.pal.publisher_client_sso_search_page&sid=" + sid + "&type=" + type + "&templateId=" + templateId + "&text=" + text, "_blank");
} }
function hideWsAndOrgList(){ function hideWsAndOrgList(){
$('#changeWsDialog').hide(); $('#changeWsDialog').hide();
$('#changeOrgDialog').hide(); $('#changeOrgDialog').hide();
} }

View File

@ -4,28 +4,28 @@ var rowCountArr = [0];
var buttonWidth = 170; var buttonWidth = 170;
// 初始化数据 // 初始化数据
function initData() { function initData() {
first = firstLevelData; first = firstLevelData;
secend = secendLevelData; secend = secendLevelData;
// $('body').empty(); // $('body').empty();
var html = ''; var html = '';
for(var i = 0; i < first.length; i++) { for(var i = 0; i < first.length; i++) {
// 一级流程 // 一级流程
html += '<div id="row-' + first[i].id + '" class="row row-box">'; html += '<div id="row-' + first[i].id + '" class="row row-box">';
html += '<div class="row-left">'; html += '<div class="row-left">';
html += '<button id="row-button-' + first[i].id + '" class="row-left-button" data-id="' + first[i].id + '" awsui-qtip="text:\'' + first[i].name + '\',position:\'bottom\'" ondblclick=openDetail("' + first[i].id + '")>' + first[i].name + '</button>'; html += '<button id="row-button-' + first[i].id + '" class="row-left-button" data-id="' + first[i].id + '" awsui-qtip="text:\'' + first[i].name + '\',position:\'bottom\'" ondblclick=openDetail("' + first[i].id + '")>' + first[i].name + '</button>';
var childData = secend[first[i].id]; var childData = secend[first[i].id];
if (!(childData == undefined || childData.length == 0)) { if (!(childData == undefined || childData.length == 0)) {
html += '<div class="row-left-line-link"></div>'; html += '<div class="row-left-line-link"></div>';
} }
html += '</div>'; html += '</div>';
html += '<div id="row-right-' + first[i].id + '" class="row-right">'; html += '<div id="row-right-' + first[i].id + '" class="row-right">';
html +='</div>'; html +='</div>';
html += '</div>'; html += '</div>';
} }
if (html.length > 0) { if (html.length > 0) {
$('body').append(html); $('body').append(html);
initSecendLevelData(); initSecendLevelData();
} }
if ($.browser.isIE && $.browser.isIE10) { if ($.browser.isIE && $.browser.isIE10) {
$(".row-left").css("display","inline-block").css("float","left"); $(".row-left").css("display","inline-block").css("float","left");
$(".row-right").css("display","inline-block").css("float","left"); $(".row-right").css("display","inline-block").css("float","left");
@ -44,55 +44,55 @@ function initData() {
// 初始化二级数据 // 初始化二级数据
function initSecendLevelData() { function initSecendLevelData() {
var width = $('.row-right').first().width(); var width = $('.row-right').first().width();
var count = parseInt(width / buttonWidth);// 每行元素个数 var count = parseInt(width / buttonWidth);// 每行元素个数
for(var i = 0; i < first.length; i++) { for(var i = 0; i < first.length; i++) {
var id = 'row-right-' + first[i].id; var id = 'row-right-' + first[i].id;
var childData = secend[first[i].id]; var childData = secend[first[i].id];
if (childData == undefined || childData.length == 0) continue; if (childData == undefined || childData.length == 0) continue;
var rowCount = Math.ceil(childData.length / count);// 元素行数 var rowCount = Math.ceil(childData.length / count);// 元素行数
// if (rowCount > 1) { // if (rowCount > 1) {
if (true) { if (true) {
rowCountArr.push(count); rowCountArr.push(count);
} else { } else {
rowCountArr.push(childData.length); rowCountArr.push(childData.length);
} }
var content = ''; var content = '';
for(var j = 0; j < rowCount; j++) { for(var j = 0; j < rowCount; j++) {
content += '<div class="row-right-row">'; content += '<div class="row-right-row">';
for (var k = j * count,m = 0; k < childData.length; k++) { for (var k = j * count,m = 0; k < childData.length; k++) {
m++; m++;
if(m > count) break; if(m > count) break;
content += '<div style="display:inline;">'; content += '<div style="display:inline;">';
if(childData[k].child) { if(childData[k].child) {
content += '<span class="row-right-row-span">'; content += '<span class="row-right-row-span">';
} else { } else {
content += '<span class="row-right-row-span-last">'; content += '<span class="row-right-row-span-last">';
} }
if(childData[k].child) {// 有子流程 if(childData[k].child) {// 有子流程
content += '<button class="row-right-button" data-id="' + childData[k].id + '" awsui-qtip="text:\'' + childData[k].name + '\',position:\'bottom\'" ondblclick=openDetail("' + childData[k].id + '") onclick=clickSet(this,\'2\')>' + childData[k].name + '</button>'; content += '<button class="row-right-button" data-id="' + childData[k].id + '" awsui-qtip="text:\'' + childData[k].name + '\',position:\'bottom\'" ondblclick=openDetail("' + childData[k].id + '") onclick=clickSet(this,\'2\')>' + childData[k].name + '</button>';
} else {// 无子流程 } else {// 无子流程
content += '<button class="row-right-button" data-id="' + childData[k].id + '" awsui-qtip="text:\'' + childData[k].name + '\',position:\'bottom\'" ondblclick=openDetail("' + childData[k].id + '")>' + childData[k].name + '</button>'; content += '<button class="row-right-button" data-id="' + childData[k].id + '" awsui-qtip="text:\'' + childData[k].name + '\',position:\'bottom\'" ondblclick=openDetail("' + childData[k].id + '")>' + childData[k].name + '</button>';
} }
content += '<div class="verticalbar"></div>'; content += '<div class="verticalbar"></div>';
if(childData[k].child) {// 有子流程 if(childData[k].child) {// 有子流程
content += '<span class="awsui-iconfont has-child-icon" data-id="' + childData[k].id + '" ondblclick=openDetail("' + childData[k].id + '") onclick=clickSpanSet(this,\'2\')>&#xe716;</span>'; content += '<span class="awsui-iconfont has-child-icon" data-id="' + childData[k].id + '" ondblclick=openDetail("' + childData[k].id + '") onclick=clickSpanSet(this,\'2\')>&#xe716;</span>';
} }
content += '</span>'; content += '</span>';
content += '</div>'; content += '</div>';
} }
content += '</div>'; content += '</div>';
} }
if (content.length > 0) { if (content.length > 0) {
$('#' + id).html(content); $('#' + id).html(content);
} }
} }
} }
// 双击打开右侧权限流程(责任部门) // 双击打开右侧权限流程(责任部门)
function openDetail(id) { function openDetail(id) {
isdb = true; isdb = true;
$.openSidebar({ $.openSidebar({
url : "./w?cmd=com.actionsoft.apps.coe.pal.publisher_client_sso_processmap_org_dept_dialog_page&deptId=" + id + "&sid=" + encodeURIComponent(sid),// 根据责任人查找流程对应 url : "./w?cmd=com.actionsoft.apps.coe.pal.publisher_client_sso_processmap_org_dept_dialog_page&deptId=" + id + "&sid=" + encodeURIComponent(sid),// 根据责任人查找流程对应
title : "流程列表", title : "流程列表",
closeText : "收起", closeText : "收起",
@ -107,28 +107,28 @@ function openDetail(id) {
} }
function checked(obj, level, click) { function checked(obj, level, click) {
// 清除已选中 // 清除已选中
var c = ''; var c = '';
if (level == 2) { if (level == 2) {
c = 'row-right'; c = 'row-right';
} else if (level == 3) { } else if (level == 3) {
c = 'button-wrap-child'; c = 'button-wrap-child';
} else { } else {
c = 'button-wrap-child-child'; c = 'button-wrap-child-child';
} }
$(obj).closest('div[class=' + c + ']').find('span').removeClass('is-active-span'); $(obj).closest('div[class=' + c + ']').find('span').removeClass('is-active-span');
$(obj).closest('div[class=' + c + ']').find('div').removeClass('is-active-verticalbar'); $(obj).closest('div[class=' + c + ']').find('div').removeClass('is-active-verticalbar');
$(obj).closest('div[class=' + c + ']').find('button').removeClass('is-active'); $(obj).closest('div[class=' + c + ']').find('button').removeClass('is-active');
$(obj).closest('div[class=' + c + ']').find('span').removeClass('icon-is-active'); $(obj).closest('div[class=' + c + ']').find('span').removeClass('icon-is-active');
$(obj).closest('div[class=' + c + ']').css('background','#fff'); $(obj).closest('div[class=' + c + ']').css('background','#fff');
if (click) { if (click) {
// 设置点击状态 // 设置点击状态
var $parent = $(obj).closest('span'); var $parent = $(obj).closest('span');
$parent.addClass('is-active-span'); $parent.addClass('is-active-span');
$(obj).addClass('is-active'); $(obj).addClass('is-active');
$parent.find('div.verticalbar').addClass('is-active-verticalbar'); $parent.find('div.verticalbar').addClass('is-active-verticalbar');
$parent.find('span:last').addClass('icon-is-active'); $parent.find('span:last').addClass('icon-is-active');
} }
} }
/* /*
@ -136,187 +136,187 @@ function checked(obj, level, click) {
* return true:当前已点击 false:当前未点击 * return true:当前已点击 false:当前未点击
* */ * */
function isClick(obj) { function isClick(obj) {
if($(obj).hasClass('is-active')) { if($(obj).hasClass('is-active')) {
return true; return true;
} }
return false; return false;
} }
// 展开第三级流程 // 展开第三级流程
function expandSecendLevel(obj, level) { function expandSecendLevel(obj, level) {
// 判断当前是否为已展开状态,展开则关闭 // 判断当前是否为已展开状态,展开则关闭
if(isClick(obj)) { if(isClick(obj)) {
var $root = $(obj).closest('div[class=row-right-row]'); var $root = $(obj).closest('div[class=row-right-row]');
$root.closest('div[class=row-right]').find('div[class=button-wrap-child]').remove(); $root.closest('div[class=row-right]').find('div[class=button-wrap-child]').remove();
checked(obj, level, false); checked(obj, level, false);
return; return;
} }
checked(obj, level, true); checked(obj, level, true);
var id = $(obj).attr('data-id'); var id = $(obj).attr('data-id');
var param = { var param = {
id : id, id : id,
orgId : orgId orgId : orgId
} }
// 获取更多数据 // 获取更多数据
$.ajax({ $.ajax({
type : "POST", type : "POST",
url : "./jd?cmd=com.actionsoft.apps.coe.pal.publisher_client_sso_processmap_org_expand&sid=" + encodeURIComponent(sid), url : "./jd?cmd=com.actionsoft.apps.coe.pal.publisher_client_sso_processmap_org_expand&sid=" + encodeURIComponent(sid),
dataType : "JSON", dataType : "JSON",
data : param, data : param,
success : function(r) { success : function(r) {
$.simpleAlert('close'); $.simpleAlert('close');
if (r.result == 'ok') { if (r.result == 'ok') {
var third = r.data.data; var third = r.data.data;
if (third.length == 0) { if (third.length == 0) {
$.simpleAlert('没有子部门数据'); $.simpleAlert('没有子部门数据');
} }
var $root = $(obj).closest('div[class=row-right-row]'); var $root = $(obj).closest('div[class=row-right-row]');
// 计算width // 计算width
var max = 0; var max = 0;
for(var i = 0; i < rowCountArr.length; i++) { for(var i = 0; i < rowCountArr.length; i++) {
if (max < parseInt(rowCountArr[i])) max = parseInt(rowCountArr[i]); if (max < parseInt(rowCountArr[i])) max = parseInt(rowCountArr[i]);
} }
var divWidth = (max * buttonWidth) - 11; var divWidth = (max * buttonWidth) - 11;
var width = divWidth - 22; var width = divWidth - 22;
// var width = $root.width() - 20; // var width = $root.width() - 20;
var count = parseInt(width / buttonWidth);// 每行元素个数 var count = parseInt(width / buttonWidth);// 每行元素个数
// 计算每行数据量 // 计算每行数据量
// 计算行数 // 计算行数
var rowCount = Math.ceil(third.length / count);// 元素行数 var rowCount = Math.ceil(third.length / count);// 元素行数
var content = ''; var content = '';
var tempHeader = '<div class="button-wrap-child" style="width:' + divWidth + 'px">'; var tempHeader = '<div class="button-wrap-child" style="width:' + divWidth + 'px">';
for(var j = 0; j < rowCount; j++) { for(var j = 0; j < rowCount; j++) {
content += '<div class="temp">'; content += '<div class="temp">';
for (var k = j * count,m = 0; k < third.length; k++) { for (var k = j * count,m = 0; k < third.length; k++) {
m++; m++;
if(m > count) break; if(m > count) break;
content += '<div style="display:inline;">'; content += '<div style="display:inline;">';
if(third[k].child) { if(third[k].child) {
content += '<span class="row-right-row-span">'; content += '<span class="row-right-row-span">';
} else { } else {
content += '<span class="row-right-row-span-last">'; content += '<span class="row-right-row-span-last">';
} }
if(third[k].child) {// 有子流程 if(third[k].child) {// 有子流程
content += '<button class="row-right-button" data-id="' + third[k].id + '" awsui-qtip="text:\'' + third[k].name + '\',position:\'bottom\'" ondblclick=openDetail("' + third[k].id + '") onclick=clickSet(this,\'3\')>' + third[k].name + '</button>'; content += '<button class="row-right-button" data-id="' + third[k].id + '" awsui-qtip="text:\'' + third[k].name + '\',position:\'bottom\'" ondblclick=openDetail("' + third[k].id + '") onclick=clickSet(this,\'3\')>' + third[k].name + '</button>';
} else {// 无子流程 } else {// 无子流程
content += '<button class="row-right-button" data-id="' + third[k].id + '" awsui-qtip="text:\'' + third[k].name + '\',position:\'bottom\'" ondblclick=openDetail("' + third[k].id + '")>' + third[k].name + '</button>'; content += '<button class="row-right-button" data-id="' + third[k].id + '" awsui-qtip="text:\'' + third[k].name + '\',position:\'bottom\'" ondblclick=openDetail("' + third[k].id + '")>' + third[k].name + '</button>';
} }
content += '<div class="verticalbar"></div>'; content += '<div class="verticalbar"></div>';
if(third[k].child) {// 有子流程 if(third[k].child) {// 有子流程
content += '<span class="awsui-iconfont has-child-icon" data-id="' + third[k].id + '" ondblclick=openDetail("' + third[k].id + '") onclick=clickSpanSet(this,\'3\') >&#xe716;</span>'; content += '<span class="awsui-iconfont has-child-icon" data-id="' + third[k].id + '" ondblclick=openDetail("' + third[k].id + '") onclick=clickSpanSet(this,\'3\') >&#xe716;</span>';
} }
content += '</span>'; content += '</span>';
content += '</div>'; content += '</div>';
} }
content += '</div>'; content += '</div>';
} }
var tempEnd = '</div>'; var tempEnd = '</div>';
$root.closest('div[class=row-right]').find('div[class=button-wrap-child]').remove(); $root.closest('div[class=row-right]').find('div[class=button-wrap-child]').remove();
if (content.length > 0) { if (content.length > 0) {
$root.append(tempHeader + content + tempEnd); $root.append(tempHeader + content + tempEnd);
$root.children('div:last').css('background', '#fbfbfb'); $root.children('div:last').css('background', '#fbfbfb');
} }
} else { } else {
$.simpleAlert('加载失败', 'error'); $.simpleAlert('加载失败', 'error');
} }
} }
}) })
} }
function expandMoreLevel(obj, level) { function expandMoreLevel(obj, level) {
var c = 'button-wrap-child'; var c = 'button-wrap-child';
if (level > 3) { if (level > 3) {
c = 'button-wrap-child-child'; c = 'button-wrap-child-child';
} }
// 判断当前是否为已展开状态,展开则关闭 // 判断当前是否为已展开状态,展开则关闭
if(isClick(obj)) { if(isClick(obj)) {
var $root = $(obj).closest('div[class=' + c + ']'); var $root = $(obj).closest('div[class=' + c + ']');
$root.find('div[class=button-wrap-child-child]').remove(); $root.find('div[class=button-wrap-child-child]').remove();
checked(obj, level, false); checked(obj, level, false);
return; return;
} }
checked(obj, level, true); checked(obj, level, true);
var id = $(obj).attr('data-id'); var id = $(obj).attr('data-id');
var param = { var param = {
id : id, id : id,
orgId : orgId orgId : orgId
} }
// 获取更多数据 // 获取更多数据
$.ajax({ $.ajax({
type : "POST", type : "POST",
url : "./jd?cmd=com.actionsoft.apps.coe.pal.publisher_client_sso_processmap_org_expand&sid=" + encodeURIComponent(sid), url : "./jd?cmd=com.actionsoft.apps.coe.pal.publisher_client_sso_processmap_org_expand&sid=" + encodeURIComponent(sid),
dataType : "JSON", dataType : "JSON",
data : param, data : param,
success : function(r) { success : function(r) {
$.simpleAlert('close'); $.simpleAlert('close');
if (r.result == 'ok') { if (r.result == 'ok') {
var third = r.data.data; var third = r.data.data;
if (third.length == 0) { if (third.length == 0) {
$.simpleAlert('没有子部门数据'); $.simpleAlert('没有子部门数据');
} }
var $root = $(obj).closest('div[class=' + c + ']'); var $root = $(obj).closest('div[class=' + c + ']');
// 计算width // 计算width
var width = $root.width(); var width = $root.width();
var count = parseInt(width / buttonWidth);// 每行元素个数 var count = parseInt(width / buttonWidth);// 每行元素个数
// 计算每行数据量 // 计算每行数据量
// 计算行数 // 计算行数
var rowCount = Math.ceil(third.length / count);// 元素行数 var rowCount = Math.ceil(third.length / count);// 元素行数
var content = ''; var content = '';
var tempHeader = '<div class="button-wrap-child-child">'; var tempHeader = '<div class="button-wrap-child-child">';
for(var j = 0; j < rowCount; j++) { for(var j = 0; j < rowCount; j++) {
content += '<div class="temp">'; content += '<div class="temp">';
for (var k = j * count,m = 0; k < third.length; k++) { for (var k = j * count,m = 0; k < third.length; k++) {
m++; m++;
if(m > count) break; if(m > count) break;
content += '<div style="display:inline;">'; content += '<div style="display:inline;">';
if(third[k].child) { if(third[k].child) {
content += '<span class="row-right-row-span">'; content += '<span class="row-right-row-span">';
} else { } else {
content += '<span class="row-right-row-span-last">'; content += '<span class="row-right-row-span-last">';
} }
if(third[k].child) {// 有子流程 if(third[k].child) {// 有子流程
content += '<button class="row-right-button" data-id="' + third[k].id + '" awsui-qtip="text:\'' + third[k].name + '\',position:\'bottom\'" ondblclick=openDetail("' + third[k].id + '") onclick=clickSet(this,\'4\')>' + third[k].name + '</button>'; content += '<button class="row-right-button" data-id="' + third[k].id + '" awsui-qtip="text:\'' + third[k].name + '\',position:\'bottom\'" ondblclick=openDetail("' + third[k].id + '") onclick=clickSet(this,\'4\')>' + third[k].name + '</button>';
} else {// 无子流程 } else {// 无子流程
content += '<button class="row-right-button" data-id="' + third[k].id + '" awsui-qtip="text:\'' + third[k].name + '\',position:\'bottom\'" ondblclick=openDetail("' + third[k].id + '")>' + third[k].name + '</button>'; content += '<button class="row-right-button" data-id="' + third[k].id + '" awsui-qtip="text:\'' + third[k].name + '\',position:\'bottom\'" ondblclick=openDetail("' + third[k].id + '")>' + third[k].name + '</button>';
} }
content += '<div class="verticalbar"></div>'; content += '<div class="verticalbar"></div>';
if(third[k].child) {// 有子流程 if(third[k].child) {// 有子流程
content += '<span class="awsui-iconfont has-child-icon" data-id="' + third[k].id + '" ondblclick=openDetail("' + third[k].id + '") onclick=clickSpanSet(this,\'4\')>&#xe716;</span>'; content += '<span class="awsui-iconfont has-child-icon" data-id="' + third[k].id + '" ondblclick=openDetail("' + third[k].id + '") onclick=clickSpanSet(this,\'4\')>&#xe716;</span>';
} }
content += '</span>'; content += '</span>';
content += '</div>'; content += '</div>';
} }
content += '</div>'; content += '</div>';
} }
var tempEnd = '</div>'; var tempEnd = '</div>';
// $(obj).closest('div[class=temp]').children('div[class=button-wrap-child-child]').remove(); // $(obj).closest('div[class=temp]').children('div[class=button-wrap-child-child]').remove();
$root.find('div[class=button-wrap-child-child]').remove(); $root.find('div[class=button-wrap-child-child]').remove();
if (content.length > 0) { if (content.length > 0) {
$(obj).closest('div[class=temp]').append(tempHeader + content + tempEnd); $(obj).closest('div[class=temp]').append(tempHeader + content + tempEnd);
$(obj).closest('div[class=temp]').children('div:last').css('background', '#fbfbfb'); $(obj).closest('div[class=temp]').children('div:last').css('background', '#fbfbfb');
} }
} else { } else {
$.simpleAlert('加载失败', 'error'); $.simpleAlert('加载失败', 'error');
} }
} }
}) })
} }
//双击/单击处理 //双击/单击处理
var isdb;// 是否双击 var isdb;// 是否双击
function clickSet(obj, level) { function clickSet(obj, level) {
isdb = false; isdb = false;
window.setTimeout(function() { window.setTimeout(function() {
if (isdb) return; if (isdb) return;
if (level >= 3) { if (level >= 3) {
expandMoreLevel(obj, level);// 单击 expandMoreLevel(obj, level);// 单击
} else { } else {
expandSecendLevel(obj, level);// 单击 expandSecendLevel(obj, level);// 单击
} }
}, 300); }, 300);
} }
function clickSpanSet(obj, level) { function clickSpanSet(obj, level) {
clickSet($(obj).closest('span.row-right-row-span').find('button.row-right-button')[0],level); clickSet($(obj).closest('span.row-right-row-span').find('button.row-right-button')[0],level);
} }

View File

@ -4,28 +4,28 @@ var rowCountArr = [0];
var buttonWidth = 170; var buttonWidth = 170;
// 初始化数据 // 初始化数据
function initData() { function initData() {
first = firstLevelData; first = firstLevelData;
secend = secendLevelData; secend = secendLevelData;
// $('body').empty(); // $('body').empty();
var html = ''; var html = '';
for(var i = 0; i < first.length; i++) { for(var i = 0; i < first.length; i++) {
// 一级流程 // 一级流程
html += '<div id="row-' + first[i].id + '" class="row row-box">'; html += '<div id="row-' + first[i].id + '" class="row row-box">';
html += '<div class="row-left">'; html += '<div class="row-left">';
html += '<button id="row-button-' + first[i].id + '" class="row-left-button" data-id="' + first[i].id + '" awsui-qtip="text:\'' + first[i].name + '\',position:\'bottom\'" ondblclick=openDetail("' + first[i].id + '")>' + first[i].name + '</button>'; html += '<button id="row-button-' + first[i].id + '" class="row-left-button" data-id="' + first[i].id + '" awsui-qtip="text:\'' + first[i].name + '\',position:\'bottom\'" ondblclick=openDetail("' + first[i].id + '")>' + first[i].name + '</button>';
var childData = secend[first[i].versionId]; var childData = secend[first[i].versionId];
if (!(childData == undefined || childData.length == 0)) { if (!(childData == undefined || childData.length == 0)) {
html += '<div class="row-left-line-link"></div>'; html += '<div class="row-left-line-link"></div>';
} }
html += '</div>'; html += '</div>';
html += '<div id="row-right-' + first[i].id + '" class="row-right">'; html += '<div id="row-right-' + first[i].id + '" class="row-right">';
html +='</div>'; html +='</div>';
html += '</div>'; html += '</div>';
} }
if (html.length > 0) { if (html.length > 0) {
$('body').append(html); $('body').append(html);
initSecendLevelData(); initSecendLevelData();
} }
if ($.browser.isIE && $.browser.isIE10) { if ($.browser.isIE && $.browser.isIE10) {
$(".row-left").css("float","left"); $(".row-left").css("float","left");
$(".row-right").css("float","left"); $(".row-right").css("float","left");
@ -41,108 +41,108 @@ function initData() {
// 初始化二级数据 // 初始化二级数据
function initSecendLevelData() { function initSecendLevelData() {
var width = $('.row-right').first().width(); var width = $('.row-right').first().width();
var count = parseInt(width / buttonWidth);// 每行元素个数 var count = parseInt(width / buttonWidth);// 每行元素个数
for(var i = 0; i < first.length; i++) { for(var i = 0; i < first.length; i++) {
var id = 'row-right-' + first[i].id; var id = 'row-right-' + first[i].id;
var childData = secend[first[i].versionId]; var childData = secend[first[i].versionId];
if (childData == undefined || childData.length == 0) continue; if (childData == undefined || childData.length == 0) continue;
var rowCount = Math.ceil(childData.length / count);// 元素行数 var rowCount = Math.ceil(childData.length / count);// 元素行数
// if (rowCount > 1) { // if (rowCount > 1) {
if (true) { if (true) {
rowCountArr.push(count); rowCountArr.push(count);
} else { } else {
rowCountArr.push(childData.length); rowCountArr.push(childData.length);
} }
var content = ''; var content = '';
for(var j = 0; j < rowCount; j++) { for(var j = 0; j < rowCount; j++) {
content += '<div class="row-right-row">'; content += '<div class="row-right-row">';
for (var k = j * count,m = 0; k < childData.length; k++) { for (var k = j * count,m = 0; k < childData.length; k++) {
m++; m++;
if(m > count) break; if(m > count) break;
content += '<div style="display:inline;">'; content += '<div style="display:inline;">';
if(childData[k].child) { if(childData[k].child) {
content += '<span class="row-right-row-span">'; content += '<span class="row-right-row-span">';
} else { } else {
content += '<span class="row-right-row-span-last">'; content += '<span class="row-right-row-span-last">';
} }
if(childData[k].child) {// 有子流程 if(childData[k].child) {// 有子流程
content += '<button class="row-right-button" data-id="' + childData[k].id + '" awsui-qtip="text:\'' + childData[k].name + '\',position:\'bottom\'" ondblclick=openDetail("' + childData[k].id + '") onclick=clickSet(this,\'2\')>' + childData[k].name + '</button>'; content += '<button class="row-right-button" data-id="' + childData[k].id + '" awsui-qtip="text:\'' + childData[k].name + '\',position:\'bottom\'" ondblclick=openDetail("' + childData[k].id + '") onclick=clickSet(this,\'2\')>' + childData[k].name + '</button>';
} else {// 无子流程 } else {// 无子流程
content += '<button class="row-right-button" data-id="' + childData[k].id + '" awsui-qtip="text:\'' + childData[k].name + '\',position:\'bottom\'" ondblclick=openDetail("' + childData[k].id + '")>' + childData[k].name + '</button>'; content += '<button class="row-right-button" data-id="' + childData[k].id + '" awsui-qtip="text:\'' + childData[k].name + '\',position:\'bottom\'" ondblclick=openDetail("' + childData[k].id + '")>' + childData[k].name + '</button>';
} }
content += '<div class="verticalbar"></div>'; content += '<div class="verticalbar"></div>';
if(childData[k].child) {// 有子流程 if(childData[k].child) {// 有子流程
content += '<span class="awsui-iconfont has-child-icon" data-id="' + childData[k].id + '" ondblclick=openDetail("' + childData[k].id + '") onclick=clickSpanSet(this,\'2\')>&#xe716;</span>'; content += '<span class="awsui-iconfont has-child-icon" data-id="' + childData[k].id + '" ondblclick=openDetail("' + childData[k].id + '") onclick=clickSpanSet(this,\'2\')>&#xe716;</span>';
} }
content += '</span>'; content += '</span>';
content += '</div>'; content += '</div>';
} }
content += '</div>'; content += '</div>';
} }
if (content.length > 0) { if (content.length > 0) {
$('#' + id).html(content); $('#' + id).html(content);
} }
} }
} }
// 打开流程 // 打开流程
function openDetail(id) { function openDetail(id) {
isdb = true; isdb = true;
var param = { var param = {
id : id, id : id,
wsId : wsId wsId : wsId
} }
// 获取更多数据 // 获取更多数据
$.ajax({ $.ajax({
type : "POST", type : "POST",
url : "./jd?cmd=com.actionsoft.apps.coe.pal.publisher_client_sso_processmap_ws_check_open&sid=" + encodeURIComponent(sid), url : "./jd?cmd=com.actionsoft.apps.coe.pal.publisher_client_sso_processmap_ws_check_open&sid=" + encodeURIComponent(sid),
dataType : "JSON", dataType : "JSON",
data : param, data : param,
success : function(r) { success : function(r) {
$.simpleAlert('close'); $.simpleAlert('close');
if (r.result == 'ok') { if (r.result == 'ok') {
if (r.data.status == 'noPerm') { if (r.data.status == 'noPerm') {
$.simpleAlert('没有文件的访问权限', 'info'); $.simpleAlert('没有文件的访问权限', 'info');
} else if (r.data.status == 'typeError') { } else if (r.data.status == 'typeError') {
$.simpleAlert('流程未发布,无法访问', 'info'); $.simpleAlert('流程未发布,无法访问', 'info');
} else if (r.data.status == 'notPublish') { } else if (r.data.status == 'notPublish') {
$.simpleAlert('流程未发布,无法访问', 'info'); $.simpleAlert('流程未发布,无法访问', 'info');
} else { } else {
window.open("./w?cmd=com.actionsoft.apps.coe.pal.publisher_client_sso_page&uuid=" + id + "&sid=" + encodeURIComponent(sid));// open Windows window.open("./w?cmd=com.actionsoft.apps.coe.pal.publisher_client_sso_page&uuid=" + id + "&sid=" + encodeURIComponent(sid));// open Windows
} }
} else { } else {
$.simpleAlert('加载失败', 'error'); $.simpleAlert('加载失败', 'error');
} }
} }
}) })
} }
function checked(obj, level, click) { function checked(obj, level, click) {
// 清除已选中 // 清除已选中
var c = ''; var c = '';
if (level == 2) { if (level == 2) {
c = 'row-right'; c = 'row-right';
} else if (level == 3) { } else if (level == 3) {
c = 'button-wrap-child'; c = 'button-wrap-child';
} else { } else {
c = 'button-wrap-child-child'; c = 'button-wrap-child-child';
} }
$(obj).closest('div[class=' + c + ']').find('span').removeClass('is-active-span'); $(obj).closest('div[class=' + c + ']').find('span').removeClass('is-active-span');
$(obj).closest('div[class=' + c + ']').find('div').removeClass('is-active-verticalbar'); $(obj).closest('div[class=' + c + ']').find('div').removeClass('is-active-verticalbar');
$(obj).closest('div[class=' + c + ']').find('button').removeClass('is-active'); $(obj).closest('div[class=' + c + ']').find('button').removeClass('is-active');
$(obj).closest('div[class=' + c + ']').find('span').removeClass('icon-is-active'); $(obj).closest('div[class=' + c + ']').find('span').removeClass('icon-is-active');
$(obj).closest('div[class=' + c + ']').css('background','#fff'); $(obj).closest('div[class=' + c + ']').css('background','#fff');
if (click) { if (click) {
// 设置点击状态 // 设置点击状态
var $parent = $(obj).closest('span'); var $parent = $(obj).closest('span');
$parent.addClass('is-active-span'); $parent.addClass('is-active-span');
$(obj).addClass('is-active'); $(obj).addClass('is-active');
$parent.find('div.verticalbar').addClass('is-active-verticalbar'); $parent.find('div.verticalbar').addClass('is-active-verticalbar');
$parent.find('span:last').addClass('icon-is-active'); $parent.find('span:last').addClass('icon-is-active');
} }
} }
/* /*
@ -150,186 +150,186 @@ function checked(obj, level, click) {
* return true:当前已点击 false:当前未点击 * return true:当前已点击 false:当前未点击
* */ * */
function isClick(obj) { function isClick(obj) {
if($(obj).hasClass('is-active')) { if($(obj).hasClass('is-active')) {
return true; return true;
} }
return false; return false;
} }
// 点开第二级展开第三级流程 // 点开第二级展开第三级流程
function expandSecendLevel(obj, level) { function expandSecendLevel(obj, level) {
// 判断当前是否为已展开状态,展开则关闭 // 判断当前是否为已展开状态,展开则关闭
if(isClick(obj)) { if(isClick(obj)) {
var $root = $(obj).closest('div[class=row-right-row]'); var $root = $(obj).closest('div[class=row-right-row]');
$root.closest('div[class=row-right]').find('div[class=button-wrap-child]').remove(); $root.closest('div[class=row-right]').find('div[class=button-wrap-child]').remove();
checked(obj, level, false); checked(obj, level, false);
return; return;
} }
checked(obj, level, true); checked(obj, level, true);
var id = $(obj).attr('data-id'); var id = $(obj).attr('data-id');
var param = { var param = {
id : id, id : id,
wsId : wsId wsId : wsId
} }
// 获取更多数据 // 获取更多数据
$.ajax({ $.ajax({
type : "POST", type : "POST",
url : "./jd?cmd=com.actionsoft.apps.coe.pal.publisher_client_sso_processmap_ws_expand&sid=" + encodeURIComponent(sid), url : "./jd?cmd=com.actionsoft.apps.coe.pal.publisher_client_sso_processmap_ws_expand&sid=" + encodeURIComponent(sid),
dataType : "JSON", dataType : "JSON",
data : param, data : param,
success : function(r) { success : function(r) {
$.simpleAlert('close'); $.simpleAlert('close');
if (r.result == 'ok') { if (r.result == 'ok') {
var third = r.data.data; var third = r.data.data;
if (third.length == 0) { if (third.length == 0) {
$.simpleAlert('没有子流程数据'); $.simpleAlert('没有子流程数据');
} }
var $root = $(obj).closest('div[class=row-right-row]'); var $root = $(obj).closest('div[class=row-right-row]');
// 计算width // 计算width
var max = 0; var max = 0;
for(var i = 0; i < rowCountArr.length; i++) { for(var i = 0; i < rowCountArr.length; i++) {
if (max < parseInt(rowCountArr[i])) max = parseInt(rowCountArr[i]); if (max < parseInt(rowCountArr[i])) max = parseInt(rowCountArr[i]);
} }
var divWidth = (max * buttonWidth) - 11; var divWidth = (max * buttonWidth) - 11;
var width = divWidth - 22; var width = divWidth - 22;
// var width = $root.width() - 20; // var width = $root.width() - 20;
var count = parseInt(width / buttonWidth);// 每行元素个数 var count = parseInt(width / buttonWidth);// 每行元素个数
// 计算每行数据量 // 计算每行数据量
// 计算行数 // 计算行数
var rowCount = Math.ceil(third.length / count);// 元素行数 var rowCount = Math.ceil(third.length / count);// 元素行数
var content = ''; var content = '';
var tempHeader = '<div class="button-wrap-child" style="width:' + divWidth + 'px">'; var tempHeader = '<div class="button-wrap-child" style="width:' + divWidth + 'px">';
for(var j = 0; j < rowCount; j++) { for(var j = 0; j < rowCount; j++) {
content += '<div class="temp">'; content += '<div class="temp">';
for (var k = j * count,m = 0; k < third.length; k++) { for (var k = j * count,m = 0; k < third.length; k++) {
m++; m++;
if(m > count) break; if(m > count) break;
content += '<div style="display:inline;">'; content += '<div style="display:inline;">';
if(third[k].child) { if(third[k].child) {
content += '<span class="row-right-row-span">'; content += '<span class="row-right-row-span">';
} else { } else {
content += '<span class="row-right-row-span-last">'; content += '<span class="row-right-row-span-last">';
} }
if(third[k].child) {// 有子流程 if(third[k].child) {// 有子流程
content += '<button class="row-right-button" data-id="' + third[k].id + '" awsui-qtip="text:\'' + third[k].name + '\',position:\'bottom\'" ondblclick=openDetail("' + third[k].id + '") onclick=clickSet(this,\'3\')>' + third[k].name + '</button>'; content += '<button class="row-right-button" data-id="' + third[k].id + '" awsui-qtip="text:\'' + third[k].name + '\',position:\'bottom\'" ondblclick=openDetail("' + third[k].id + '") onclick=clickSet(this,\'3\')>' + third[k].name + '</button>';
} else {// 无子流程 } else {// 无子流程
content += '<button class="row-right-button" data-id="' + third[k].id + '" awsui-qtip="text:\'' + third[k].name + '\',position:\'bottom\'" ondblclick=openDetail("' + third[k].id + '")>' + third[k].name + '</button>'; content += '<button class="row-right-button" data-id="' + third[k].id + '" awsui-qtip="text:\'' + third[k].name + '\',position:\'bottom\'" ondblclick=openDetail("' + third[k].id + '")>' + third[k].name + '</button>';
} }
content += '<div class="verticalbar"></div>'; content += '<div class="verticalbar"></div>';
if(third[k].child) {// 有子流程 if(third[k].child) {// 有子流程
content += '<span class="awsui-iconfont has-child-icon" data-id="' + third[k].id + '" ondblclick=openDetail("' + third[k].id + '") onclick=clickSpanSet(this,\'3\') >&#xe716;</span>'; content += '<span class="awsui-iconfont has-child-icon" data-id="' + third[k].id + '" ondblclick=openDetail("' + third[k].id + '") onclick=clickSpanSet(this,\'3\') >&#xe716;</span>';
} }
content += '</span>'; content += '</span>';
content += '</div>'; content += '</div>';
} }
content += '</div>'; content += '</div>';
} }
var tempEnd = '</div>'; var tempEnd = '</div>';
$root.closest('div[class=row-right]').find('div[class=button-wrap-child]').remove(); $root.closest('div[class=row-right]').find('div[class=button-wrap-child]').remove();
if (content.length > 0) { if (content.length > 0) {
$root.append(tempHeader + content + tempEnd); $root.append(tempHeader + content + tempEnd);
$root.children('div:last').css('background', '#fbfbfb'); $root.children('div:last').css('background', '#fbfbfb');
} }
} else { } else {
$.simpleAlert('加载失败', 'error'); $.simpleAlert('加载失败', 'error');
} }
} }
}) })
} }
function expandMoreLevel(obj, level) { function expandMoreLevel(obj, level) {
var c = 'button-wrap-child'; var c = 'button-wrap-child';
if (level > 3) { if (level > 3) {
c = 'button-wrap-child-child'; c = 'button-wrap-child-child';
} }
// 判断当前是否为已展开状态,展开则关闭 // 判断当前是否为已展开状态,展开则关闭
if(isClick(obj)) { if(isClick(obj)) {
var $root = $(obj).closest('div[class=' + c + ']'); var $root = $(obj).closest('div[class=' + c + ']');
$root.find('div[class=button-wrap-child-child]').remove(); $root.find('div[class=button-wrap-child-child]').remove();
checked(obj, level, false); checked(obj, level, false);
return; return;
} }
checked(obj, level, true); checked(obj, level, true);
var id = $(obj).attr('data-id'); var id = $(obj).attr('data-id');
var param = { var param = {
id : id, id : id,
wsId : wsId wsId : wsId
} }
// 获取更多数据 // 获取更多数据
$.ajax({ $.ajax({
type : "POST", type : "POST",
url : "./jd?cmd=com.actionsoft.apps.coe.pal.publisher_client_sso_processmap_ws_expand&sid=" + encodeURIComponent(sid), url : "./jd?cmd=com.actionsoft.apps.coe.pal.publisher_client_sso_processmap_ws_expand&sid=" + encodeURIComponent(sid),
dataType : "JSON", dataType : "JSON",
data : param, data : param,
success : function(r) { success : function(r) {
$.simpleAlert('close'); $.simpleAlert('close');
if (r.result == 'ok') { if (r.result == 'ok') {
var third = r.data.data; var third = r.data.data;
if (third.length == 0) { if (third.length == 0) {
$.simpleAlert('没有子流程数据'); $.simpleAlert('没有子流程数据');
} }
var $root = $(obj).closest('div[class=' + c + ']'); var $root = $(obj).closest('div[class=' + c + ']');
// 计算width // 计算width
var width = $root.width(); var width = $root.width();
var count = parseInt(width / buttonWidth);// 每行元素个数 var count = parseInt(width / buttonWidth);// 每行元素个数
// 计算每行数据量 // 计算每行数据量
// 计算行数 // 计算行数
var rowCount = Math.ceil(third.length / count);// 元素行数 var rowCount = Math.ceil(third.length / count);// 元素行数
var content = ''; var content = '';
var tempHeader = '<div class="button-wrap-child-child">'; var tempHeader = '<div class="button-wrap-child-child">';
for(var j = 0; j < rowCount; j++) { for(var j = 0; j < rowCount; j++) {
content += '<div class="temp">'; content += '<div class="temp">';
for (var k = j * count,m = 0; k < third.length; k++) { for (var k = j * count,m = 0; k < third.length; k++) {
m++; m++;
if(m > count) break; if(m > count) break;
content += '<div style="display:inline;">'; content += '<div style="display:inline;">';
if(third[k].child) { if(third[k].child) {
content += '<span class="row-right-row-span">'; content += '<span class="row-right-row-span">';
} else { } else {
content += '<span class="row-right-row-span-last">'; content += '<span class="row-right-row-span-last">';
} }
if(third[k].child) {// 有子流程 if(third[k].child) {// 有子流程
content += '<button class="row-right-button" data-id="' + third[k].id + '" awsui-qtip="text:\'' + third[k].name + '\',position:\'bottom\'" ondblclick=openDetail("' + third[k].id + '") onclick=clickSet(this,\'4\')>' + third[k].name + '</button>'; content += '<button class="row-right-button" data-id="' + third[k].id + '" awsui-qtip="text:\'' + third[k].name + '\',position:\'bottom\'" ondblclick=openDetail("' + third[k].id + '") onclick=clickSet(this,\'4\')>' + third[k].name + '</button>';
} else {// 无子流程 } else {// 无子流程
content += '<button class="row-right-button" data-id="' + third[k].id + '" awsui-qtip="text:\'' + third[k].name + '\',position:\'bottom\'" ondblclick=openDetail("' + third[k].id + '")>' + third[k].name + '</button>'; content += '<button class="row-right-button" data-id="' + third[k].id + '" awsui-qtip="text:\'' + third[k].name + '\',position:\'bottom\'" ondblclick=openDetail("' + third[k].id + '")>' + third[k].name + '</button>';
} }
content += '<div class="verticalbar"></div>'; content += '<div class="verticalbar"></div>';
if(third[k].child) {// 有子流程 if(third[k].child) {// 有子流程
content += '<span class="awsui-iconfont has-child-icon" data-id="' + third[k].id + '" ondblclick=openDetail("' + third[k].id + '") onclick=clickSpanSet(this,\'4\')>&#xe716;</span>'; content += '<span class="awsui-iconfont has-child-icon" data-id="' + third[k].id + '" ondblclick=openDetail("' + third[k].id + '") onclick=clickSpanSet(this,\'4\')>&#xe716;</span>';
} }
content += '</span>'; content += '</span>';
content += '</div>'; content += '</div>';
} }
content += '</div>'; content += '</div>';
} }
var tempEnd = '</div>'; var tempEnd = '</div>';
// $(obj).closest('div[class=temp]').children('div[class=button-wrap-child-child]').remove(); // $(obj).closest('div[class=temp]').children('div[class=button-wrap-child-child]').remove();
$root.find('div[class=button-wrap-child-child]').remove(); $root.find('div[class=button-wrap-child-child]').remove();
if (content.length > 0) { if (content.length > 0) {
$(obj).closest('div[class=temp]').append(tempHeader + content + tempEnd); $(obj).closest('div[class=temp]').append(tempHeader + content + tempEnd);
$(obj).closest('div[class=temp]').children('div:last').css('background', '#fbfbfb'); $(obj).closest('div[class=temp]').children('div:last').css('background', '#fbfbfb');
} }
} else { } else {
$.simpleAlert('加载失败', 'error'); $.simpleAlert('加载失败', 'error');
} }
} }
}) })
} }
//双击/单击处理 //双击/单击处理
var isdb;// 是否双击 var isdb;// 是否双击
function clickSet(obj, level) { function clickSet(obj, level) {
isdb = false; isdb = false;
window.setTimeout(function() { window.setTimeout(function() {
if (isdb) return; if (isdb) return;
if (level >= 3) { if (level >= 3) {
expandMoreLevel(obj, level);// 单击 expandMoreLevel(obj, level);// 单击
} else { } else {
expandSecendLevel(obj, level);// 单击 expandSecendLevel(obj, level);// 单击
} }
}, 300); }, 300);
} }
function clickSpanSet(obj, level) { function clickSpanSet(obj, level) {
clickSet($(obj).closest('span.row-right-row-span').find('button.row-right-button')[0],level); clickSet($(obj).closest('span.row-right-row-span').find('button.row-right-button')[0],level);
} }

View File

@ -1,71 +1,71 @@
function toAddPublish2() { function toAddPublish2() {
$("#title").val(title); $("#title").val(title);
$("#nav, #content").hide(); $("#nav, #content").hide();
$("#add_div").show(); $("#add_div").show();
} }
// 新增 // 新增
function toAddPublish() { function toAddPublish() {
$("#title").val(title); $("#title").val(title);
addPublishInstance(); addPublishInstance();
} }
function giveUp() { function giveUp() {
$("#add_div").hide(); $("#add_div").hide();
$("#nav, #content").show(); $("#nav, #content").show();
$("#title").val(title); $("#title").val(title);
} }
function addPublishInstance() { function addPublishInstance() {
var title = $("#title").val(); var title = $("#title").val();
if (title == "") { if (title == "") {
window.top.$.simpleAlert("[标题]不允许为空"); window.top.$.simpleAlert("[标题]不允许为空");
return; return;
} }
if (title.length > 120) { if (title.length > 120) {
window.top.$.simpleAlert("[标题]长度不允许超过120"); window.top.$.simpleAlert("[标题]长度不允许超过120");
return; return;
} }
var params = { var params = {
title : $("#title").val(), title : $("#title").val(),
wsId: $("#wsId").val(), wsId: $("#wsId").val(),
teamId: $("#teamId").val(), teamId: $("#teamId").val(),
teamName: $("#teamName").val() teamName: $("#teamName").val()
}; };
awsui.ajax.request({ awsui.ajax.request({
url : "./jd?sid=" + $("#sid").val() + "&cmd=com.actionsoft.apps.coe.pal.publisher_save", url : "./jd?sid=" + $("#sid").val() + "&cmd=com.actionsoft.apps.coe.pal.publisher_save",
data : params, data : params,
type : "post", type : "post",
ok : function(msg) { ok : function(msg) {
$("#nav, #content").show(); $("#nav, #content").show();
$("#add_div").hide(); $("#add_div").hide();
if (msg.result == "ok") { if (msg.result == "ok") {
var data = msg.data.data; var data = msg.data.data;
openPublishInstance(data.processInstId, data.taskInstId); openPublishInstance(data.processInstId, data.taskInstId);
$("#add_div").hide(); $("#add_div").hide();
$("#nav, #content").show(); $("#nav, #content").show();
$("#title").val("流程发布"); $("#title").val("流程发布");
refreshProcessList(); refreshProcessList();
} else { } else {
window.top.$.simpleAlert("保存失败", "error", 2000); window.top.$.simpleAlert("保存失败", "error", 2000);
} }
}, },
err : function(r) { err : function(r) {
} }
}); });
} }
function openPublishInstance(processInstId, taskInstId, openState) { function openPublishInstance(processInstId, taskInstId, openState) {
if (openState == undefined) { if (openState == undefined) {
openState = ""; openState = "";
} }
$('#processInstId').val(processInstId); $('#processInstId').val(processInstId);
$('#taskInstId').val(taskInstId); $('#taskInstId').val(taskInstId);
$('#openState').val(openState); $('#openState').val(openState);
$("#openNewPage").submit();// 摒弃window.open方式 $("#openNewPage").submit();// 摒弃window.open方式
// var url = "./w?sid=" + $("#sid").val() + "&cmd=com.actionsoft.apps.coe.pal.publisher_handle" // var url = "./w?sid=" + $("#sid").val() + "&cmd=com.actionsoft.apps.coe.pal.publisher_handle"
// + "&processInstId=" + processInstId + "&taskInstId=" + taskInstId + "&openState=" + openState; // + "&processInstId=" + processInstId + "&taskInstId=" + taskInstId + "&openState=" + openState;
// window.open(url, "newwindow","top=0,left=0,toolbar=no, menubar=no, scrollbars=yes, resizable=no,location=no,status=no,width="+ (screen.availWidth - 10) +",height="+ (screen.availHeight-50)); // window.open(url, "newwindow","top=0,left=0,toolbar=no, menubar=no, scrollbars=yes, resizable=no,location=no,status=no,width="+ (screen.availWidth - 10) +",height="+ (screen.availHeight-50));
} }
@ -73,238 +73,238 @@ function openPublishInstance(processInstId, taskInstId, openState) {
//选中checkbox //选中checkbox
function selectTrCheckBox(obj) { function selectTrCheckBox(obj) {
var checked = false; var checked = false;
$("#tbody1 .awsui-checkbox").each(function(){ $("#tbody1 .awsui-checkbox").each(function(){
if ($(this).prop("checked")) { if ($(this).prop("checked")) {
checked = true; checked = true;
return false; return false;
} }
}); });
if (checked) { if (checked) {
$("#removePulishInstance").show(); $("#removePulishInstance").show();
} else { } else {
$("#removePulishInstance").hide(); $("#removePulishInstance").hide();
} }
} }
//删除task //删除task
function removePublishInstance() { function removePublishInstance() {
var processInstIds = ""; var processInstIds = "";
$("#tbody1 .awsui-checkbox").each(function(){ $("#tbody1 .awsui-checkbox").each(function(){
if ($(this).prop("checked")) { if ($(this).prop("checked")) {
processInstIds += $(this).val() + ","; processInstIds += $(this).val() + ",";
} }
}) })
if (processInstIds == "") { if (processInstIds == "") {
$.simpleAlert("请选择要删除的任务"); $.simpleAlert("请选择要删除的任务");
return; return;
} }
var options = { var options = {
title : "提示", title : "提示",
content : "确定删除吗?", content : "确定删除吗?",
model : false, model : false,
onConfirm : function() { onConfirm : function() {
var params = { var params = {
processInstIds: processInstIds processInstIds: processInstIds
} }
$.ajax({ $.ajax({
url : "./jd?sid=" + $("#sid").val() + "&cmd=com.actionsoft.apps.coe.pal.publisher_remove", url : "./jd?sid=" + $("#sid").val() + "&cmd=com.actionsoft.apps.coe.pal.publisher_remove",
data : params, data : params,
type : "post", type : "post",
success : function(msg) { success : function(msg) {
if (msg.result == "ok") { if (msg.result == "ok") {
window.top.$.simpleAlert("删除成功", "ok", 2000); window.top.$.simpleAlert("删除成功", "ok", 2000);
} else { } else {
var errNum = msg.data.errNum; var errNum = msg.data.errNum;
var errProcessInstTitles = msg.msg; var errProcessInstTitles = msg.msg;
window.top.$.simpleAlert("任务[" + errProcessInstTitles + "]删除失败", "error"); window.top.$.simpleAlert("任务[" + errProcessInstTitles + "]删除失败", "error");
} }
var successNum = msg.data.successNum; var successNum = msg.data.successNum;
totalData1 = totalData1 - successNum; totalData1 = totalData1 - successNum;
if (totalData1 <= currentpage1 * pageLimit) { if (totalData1 <= currentpage1 * pageLimit) {
if (currentpage1 > 0) { if (currentpage1 > 0) {
currentpage1 = currentpage1 - 1; currentpage1 = currentpage1 - 1;
} }
} }
refreshProcessList(); refreshProcessList();
$("#removePulishInstance").hide(); $("#removePulishInstance").hide();
} }
}); });
} }
} }
window.top.$.confirm(options);; window.top.$.confirm(options);;
} }
//刷新页面,用于流程办理关闭时调用 //刷新页面,用于流程办理关闭时调用
function refreshProcessList() { function refreshProcessList() {
var tit = $(".network_tabs").find("a[tit][class=active]").attr("tit"); var tit = $(".network_tabs").find("a[tit][class=active]").attr("tit");
if (tit == "todo") { if (tit == "todo") {
loadOutputData1(currentpage1, pageLimit, initPage1); loadOutputData1(currentpage1, pageLimit, initPage1);
} else if (tit == "done") { } else if (tit == "done") {
loadOutputData2(currentpage2, pageLimit, initPage2); loadOutputData2(currentpage2, pageLimit, initPage2);
} else if (tit == "history") { } else if (tit == "history") {
loadOutputData3(currentpage3, pageLimit, initPage3); loadOutputData3(currentpage3, pageLimit, initPage3);
} }
$("#select_all").check().on("ifChanged", function(){ $("#select_all").check().on("ifChanged", function(){
var isChecked = $(this).prop("checked"); var isChecked = $(this).prop("checked");
if (isChecked) { if (isChecked) {
$("#tbody1 .awsui-checkbox").check("option", "checked", true); $("#tbody1 .awsui-checkbox").check("option", "checked", true);
} else { } else {
$("#tbody1 .awsui-checkbox").check("option", "checked", false); $("#tbody1 .awsui-checkbox").check("option", "checked", false);
} }
}) })
} }
/*************************************************分页 begin******************************************************/ /*************************************************分页 begin******************************************************/
function initPage1() { function initPage1() {
$("#Pagination1").pagination(totalData1, { $("#Pagination1").pagination(totalData1, {
pageLimit:pageLimit, pageLimit:pageLimit,
showItem:showItem, showItem:showItem,
currentPage:currentpage1, currentPage:currentpage1,
ellipseCount:0, ellipseCount:0,
prevText:"上一页", prevText:"上一页",
nextText:"下一页", nextText:"下一页",
ellipseText:"...", ellipseText:"...",
showIfSinglePage:false, showIfSinglePage:false,
loadFirstPage:false, loadFirstPage:false,
showDisplay:true, showDisplay:true,
callback:function(pageNum, start){ callback:function(pageNum, start){
currentpage1 = pageNum - 1; currentpage1 = pageNum - 1;
loadOutputData1(pageNum - 1, showItem); loadOutputData1(pageNum - 1, showItem);
} }
}); });
} }
function loadOutputData1(pageNum, size, callback) { function loadOutputData1(pageNum, size, callback) {
var url = "./jd?sid=" + encodeURIComponent($("#sid").val()) + "&cmd=com.actionsoft.apps.coe.pal.publisher_tasklist"; var url = "./jd?sid=" + encodeURIComponent($("#sid").val()) + "&cmd=com.actionsoft.apps.coe.pal.publisher_tasklist";
var params = { var params = {
start : pageNum, start : pageNum,
size : size size : size
}; };
$.ajax({ $.ajax({
url : url, url : url,
async : false, async : false,
data : params, data : params,
type : "post", type : "post",
success : function(msg) { success : function(msg) {
$("#tbody1").empty().html(msg.data.html); $("#tbody1").empty().html(msg.data.html);
$(window).trigger('resize'); $(window).trigger('resize');
totalData1 = msg.data.totalSize; totalData1 = msg.data.totalSize;
$(".awsui-checkbox").check(); $(".awsui-checkbox").check();
$(".awsui-checkbox").on("ifChanged", function(){ $(".awsui-checkbox").on("ifChanged", function(){
selectTrCheckBox($(this)); selectTrCheckBox($(this));
}); });
if (parent.window.setHeight) { if (parent.window.setHeight) {
parent.window.setHeight(); parent.window.setHeight();
} }
if (callback) { if (callback) {
callback(); callback();
} }
$("#select_all").check().on("ifChanged", function(){ $("#select_all").check().on("ifChanged", function(){
var isChecked = $(this).prop("checked"); var isChecked = $(this).prop("checked");
if (isChecked) { if (isChecked) {
$("#tbody1 .awsui-checkbox").check("option", "checked", true); $("#tbody1 .awsui-checkbox").check("option", "checked", true);
} else { } else {
$("#tbody1 .awsui-checkbox").check("option", "checked", false); $("#tbody1 .awsui-checkbox").check("option", "checked", false);
} }
}) })
} }
}); });
} }
function initPage2() { function initPage2() {
$("#Pagination2").pagination(totalData2, { $("#Pagination2").pagination(totalData2, {
pageLimit:pageLimit, pageLimit:pageLimit,
showItem:showItem, showItem:showItem,
currentPage:currentpage2, currentPage:currentpage2,
ellipseCount:0, ellipseCount:0,
prevText:"上一页", prevText:"上一页",
nextText:"下一页", nextText:"下一页",
ellipseText:"...", ellipseText:"...",
showIfSinglePage:false, showIfSinglePage:false,
loadFirstPage:false, loadFirstPage:false,
showDisplay:true, showDisplay:true,
display:"显示 {0} 到 {1} 条, 共 {2} 条", display:"显示 {0} 到 {1} 条, 共 {2} 条",
callback:function(pageNum, start){ callback:function(pageNum, start){
currentpage2 = pageNum - 1; currentpage2 = pageNum - 1;
loadOutputData2(pageNum - 1, showItem); loadOutputData2(pageNum - 1, showItem);
} }
}); });
} }
function loadOutputData2(start, size, callback) { function loadOutputData2(start, size, callback) {
var url = "./jd?sid=" + encodeURIComponent($("#sid").val()) + "&cmd=com.actionsoft.apps.coe.pal.publisher_historytasklist"; var url = "./jd?sid=" + encodeURIComponent($("#sid").val()) + "&cmd=com.actionsoft.apps.coe.pal.publisher_historytasklist";
pageNumber = start; pageNumber = start;
var params = { var params = {
start : start, start : start,
size : size size : size
}; };
$.ajax({ $.ajax({
url : url, url : url,
async : false, async : false,
data : params, data : params,
type : "post", type : "post",
success : function(msg) { success : function(msg) {
$("#tbody2").empty().html(msg.data.html); $("#tbody2").empty().html(msg.data.html);
$(window).trigger('resize'); $(window).trigger('resize');
totalData2 = msg.data.totalSize; totalData2 = msg.data.totalSize;
if (parent.window.setHeight) { if (parent.window.setHeight) {
parent.window.setHeight(); parent.window.setHeight();
} }
if (callback) { if (callback) {
callback(); callback();
} }
} }
}); });
} }
function initPage3() { function initPage3() {
$("#Pagination3").pagination(totalData3, { $("#Pagination3").pagination(totalData3, {
pageLimit:pageLimit, pageLimit:pageLimit,
showItem:showItem, showItem:showItem,
currentPage:currentpage3, currentPage:currentpage3,
ellipseCount:0, ellipseCount:0,
prevText:"上一页", prevText:"上一页",
nextText:"下一页", nextText:"下一页",
ellipseText:"...", ellipseText:"...",
showIfSinglePage:false, showIfSinglePage:false,
loadFirstPage:false, loadFirstPage:false,
showDisplay:true, showDisplay:true,
display:"显示 {0} 到 {1} 条, 共 {2} 条", display:"显示 {0} 到 {1} 条, 共 {2} 条",
callback:function(pageNum, start){ callback:function(pageNum, start){
currentpage3 = pageNum - 1; currentpage3 = pageNum - 1;
loadOutputData3(pageNum - 1, showItem); loadOutputData3(pageNum - 1, showItem);
} }
}); });
} }
function loadOutputData3(start, size, callback) { function loadOutputData3(start, size, callback) {
var url = "./jd?sid=" + encodeURIComponent($("#sid").val()) + "&cmd=com.actionsoft.apps.coe.pal.publisher_processlist"; var url = "./jd?sid=" + encodeURIComponent($("#sid").val()) + "&cmd=com.actionsoft.apps.coe.pal.publisher_processlist";
pageNumber = start; pageNumber = start;
var params = { var params = {
start : start, start : start,
size : size size : size
}; };
$.ajax({ $.ajax({
url : url, url : url,
async : false, async : false,
data : params, data : params,
type : "post", type : "post",
success : function(msg) { success : function(msg) {
$("#tbody3").empty().html(msg.data.html); $("#tbody3").empty().html(msg.data.html);
$(window).trigger('resize'); $(window).trigger('resize');
totalData3 = msg.data.totalSize; totalData3 = msg.data.totalSize;
if (parent.window.setHeight) { if (parent.window.setHeight) {
parent.window.setHeight(); parent.window.setHeight();
} }
if (callback) { if (callback) {
callback(); callback();
} }
} }
}); });
} }
function loadHistoryRecord() { function loadHistoryRecord() {
@ -314,11 +314,11 @@ function loadHistoryRecord() {
/*************************************************分页 end******************************************************/ /*************************************************分页 end******************************************************/
function refreshTab() { function refreshTab() {
$('#nav').children('a').each(function() { $('#nav').children('a').each(function() {
if ($(this).hasClass('active')) { if ($(this).hasClass('active')) {
$(this).click(); $(this).click();
return false; return false;
} }
}) })
} }

View File

@ -10,140 +10,140 @@ var drpSourceParentId;
var isOpenMainIfranme = false; var isOpenMainIfranme = false;
var repositoryTree; var repositoryTree;
$(document).ready(function() { $(document).ready(function() {
initTree(); initTree();
repositoryTree.expandNode($("a[tbindex=process]"), true); repositoryTree.expandNode($("a[tbindex=process]"), true);
$("a[tbindex=process]").click(); $("a[tbindex=process]").click();
}); });
function initTree() { function initTree() {
$("#repositoryTree").empty(); $("#repositoryTree").empty();
var wsId = $("#wsId").val(); var wsId = $("#wsId").val();
if (wsId) { if (wsId) {
var setting = getSetings(); var setting = getSetings();
repositoryTree = awsui.tree.init($("#repositoryTree"), setting); repositoryTree = awsui.tree.init($("#repositoryTree"), setting);
$("#repositoryTree").css("height", "auto"); $("#repositoryTree").css("height", "auto");
} else { } else {
window.top.$.simpleAlert("请选择流程资产", "info", 2000); window.top.$.simpleAlert("请选择流程资产", "info", 2000);
} }
if (repositoryTree.getSelectedNode() == undefined) { if (repositoryTree.getSelectedNode() == undefined) {
repositoryTree.selectNode(repositoryTree.config.data[0].id, true); repositoryTree.selectNode(repositoryTree.config.data[0].id, true);
} }
} }
function getSetings() { function getSetings() {
var setting = { var setting = {
sort : true, sort : true,
dblClickToExpand : true, dblClickToExpand : true,
event : { event : {
onClick : clickNode onClick : clickNode
}, },
data : { data : {
keep : { keep : {
parent : true parent : true
} }
} }
}; };
setting.dataModel = { setting.dataModel = {
data : data data : data
}; };
return setting; return setting;
} }
function clickNode(treeNode) { function clickNode(treeNode) {
if (treeNode.id.length == 36) { if (treeNode.id.length == 36) {
openDesginer(treeNode.id, 0, treeNode.name, "", treeNode.versionId, false, "1"); openDesginer(treeNode.id, 0, treeNode.name, "", treeNode.versionId, false, "1");
} else { } else {
if (processRootId != "") { if (processRootId != "") {
openDesginer(processRootId, 0, treeNode.name, "", "", false, "1"); openDesginer(processRootId, 0, treeNode.name, "", "", false, "1");
} }
} }
} }
function openDesginer(uuid, openType, plName, appId, processVersionId, function openDesginer(uuid, openType, plName, appId, processVersionId,
isOpenDialog, collaboration) { isOpenDialog, collaboration) {
if(collaboration == undefined || collaboration == null) { if(collaboration == undefined || collaboration == null) {
collaboration = "0"; collaboration = "0";
} }
var params = { var params = {
sid : encodeURIComponent(jQuery('#sid').val()), sid : encodeURIComponent(jQuery('#sid').val()),
cmd : "com.actionsoft.apps.coe.pal_pl_repository_designer_viewer", cmd : "com.actionsoft.apps.coe.pal_pl_repository_designer_viewer",
uuid : uuid, uuid : uuid,
openType : openType, openType : openType,
processDefId : processVersionId, processDefId : processVersionId,
collaboration : collaboration, collaboration : collaboration,
teamId : "", teamId : "",
perms: "v", perms: "v",
filePerms: filePerms filePerms: filePerms
}, url, options; }, url, options;
if (typeof (isOpenDialog) == "boolean" && isOpenDialog) {// 打开与bpmn关联的多个版本 if (typeof (isOpenDialog) == "boolean" && isOpenDialog) {// 打开与bpmn关联的多个版本
params = { params = {
sid : encodeURIComponent(jQuery('#sid').val()), sid : encodeURIComponent(jQuery('#sid').val()),
cmd : "com.actionsoft.apps.coe.pal_pl_repository_version", cmd : "com.actionsoft.apps.coe.pal_pl_repository_version",
uuid : uuid, uuid : uuid,
appId : appId, appId : appId,
processVersionId : processVersionId processVersionId : processVersionId
}; };
url = "./w?" + connectParams(params); url = "./w?" + connectParams(params);
options = { options = {
buttons : [ // 按钮组 buttons : [ // 按钮组
{ {
text : '关闭', text : '关闭',
handler : function() { handler : function() {
window.top.closeAwsDialog(); window.top.closeAwsDialog();
} }
} ] } ]
} }
window.top.openAwsDialog(url, plName, 770, 415, options); window.top.openAwsDialog(url, plName, 770, 415, options);
return; return;
} }
url = "./w?" + connectParams(params); url = "./w?" + connectParams(params);
$("#disignerIframe").attr("src", url).attr("uuid", uuid); $("#disignerIframe").attr("src", url).attr("uuid", uuid);
} }
function connectParams(params) { function connectParams(params) {
var connParms = ""; var connParms = "";
if (typeof (params) == "object") { if (typeof (params) == "object") {
for ( var i in params) { for ( var i in params) {
connParms += i + "=" + params[i] + "&"; connParms += i + "=" + params[i] + "&";
} }
} }
return connParms.substring(0, connParms.length - 1); return connParms.substring(0, connParms.length - 1);
} }
// 展开所有节点 // 展开所有节点
function expandNodes(zTree, nodes) { function expandNodes(zTree, nodes) {
if (!nodes) if (!nodes)
return; return;
for (var i = 0, l = nodes.length; i < l; i++) { for (var i = 0, l = nodes.length; i < l; i++) {
zTree.expandNode(nodes[i], true, false, false); zTree.expandNode(nodes[i], true, false, false);
if (nodes[i].isParent) { if (nodes[i].isParent) {
expandNodes(nodes[i].children); expandNodes(nodes[i].children);
} }
} }
} }
// 自动展开两级节点 // 自动展开两级节点
function expandNodesFirst(zTree, nodes) { function expandNodesFirst(zTree, nodes) {
if (!nodes) if (!nodes)
return; return;
for (var i = 0, l = 1; i < l; i++) { for (var i = 0, l = 1; i < l; i++) {
zTree.expandNode(nodes[i], true, false, false); zTree.expandNode(nodes[i], true, false, false);
if (nodes[i].isParent && nodes[i].zAsync) { if (nodes[i].isParent && nodes[i].zAsync) {
expandNodesFirst(nodes[i].children); expandNodesFirst(nodes[i].children);
} }
} }
} }
// 自动展开n级节点 // 自动展开n级节点
function expandNodesN(zTree, nodes, n) { function expandNodesN(zTree, nodes, n) {
if (!nodes) if (!nodes)
return; return;
for (var i = 0, l = n; i < l; i++) { for (var i = 0, l = n; i < l; i++) {
zTree.expandNode(nodes[i], true, false, false); zTree.expandNode(nodes[i], true, false, false);
if (nodes[i].isParent) { if (nodes[i].isParent) {
expandNodesN(zTree, nodes[i].children, n); expandNodesN(zTree, nodes[i].children, n);
} }
} }
} }

View File

@ -1,17 +1,17 @@
$(document).ready(function(){ $(document).ready(function(){
renderBannerXPagesConfigPage(); renderBannerXPagesConfigPage();
}); });
function renderBannerXPagesConfigPage(){ function renderBannerXPagesConfigPage(){
var contentStr="<div class='xpagePublishBanner-wrap'>"; var contentStr="<div class='xpagePublishBanner-wrap'>";
//contentStr+="<h3>流程发布门户-轮播图</h3>"; //contentStr+="<h3>流程发布门户-轮播图</h3>";
contentStr+="<div class='xpages-label-text'>轮播图</div>"; contentStr+="<div class='xpages-label-text'>轮播图</div>";
contentStr+="<textarea class='url xpagesContent' readonly></textarea>"; contentStr+="<textarea class='url xpagesContent' readonly></textarea>";
contentStr+="</div>"; contentStr+="</div>";
$(".cwapp-right").append(contentStr); $(".cwapp-right").append(contentStr);
var url="./w?sid=@sid&cmd=com.actionsoft.apps.publisher_xpages_banner_msg"; var url="./w?sid=@sid&cmd=com.actionsoft.apps.publisher_xpages_banner_msg";
//$(".xpagesContent").empty(); //$(".xpagesContent").empty();
$(".xpagePublishBanner-wrap").find(".xpagesContent").val(url); $(".xpagePublishBanner-wrap").find(".xpagesContent").val(url);
} }

View File

@ -1,14 +1,14 @@
$(document).ready(function(){ $(document).ready(function(){
renderCommonXPagesConfigPage(); renderCommonXPagesConfigPage();
}); });
function renderCommonXPagesConfigPage(){ function renderCommonXPagesConfigPage(){
var contentStr="<div class='xpagePublishCommon-wrap'>"; var contentStr="<div class='xpagePublishCommon-wrap'>";
//contentStr+="<h3>流程发布门户-常用流程</h3>"; //contentStr+="<h3>流程发布门户-常用流程</h3>";
contentStr+="<div class='xpages-label-text'>设置显示个数</div>"; contentStr+="<div class='xpages-label-text'>设置显示个数</div>";
contentStr+="<input id='commonxpage_tcount' type='text' placeholder='请输入显示个数,点击空白处自动生成URL' value='' class='txt' style='width:90%;'>"; contentStr+="<input id='commonxpage_tcount' type='text' placeholder='请输入显示个数,点击空白处自动生成URL' value='' class='txt' style='width:90%;'>";
contentStr+="<textarea class='url xpagesContent' readonly></textarea>"; contentStr+="<textarea class='url xpagesContent' readonly></textarea>";
contentStr+="</div>"; contentStr+="</div>";
$(".cwapp-right").append(contentStr); $(".cwapp-right").append(contentStr);
var cwUrl = getCwUrl();//获取之前的存储的url链接 var cwUrl = getCwUrl();//获取之前的存储的url链接
if(cwUrl!=null && cwUrl!=undefined && cwUrl!=""){ if(cwUrl!=null && cwUrl!=undefined && cwUrl!=""){
@ -17,18 +17,18 @@ function renderCommonXPagesConfigPage(){
} }
$("#commonxpage_tcount").blur(function(){ $("#commonxpage_tcount").blur(function(){
var count = $('#commonxpage_tcount').val(); var count = $('#commonxpage_tcount').val();
if(count!=""){ if(count!=""){
var url="./w?sid=@sid&cmd=com.actionsoft.apps.publisher_xpages_common_msg&count="+count; var url="./w?sid=@sid&cmd=com.actionsoft.apps.publisher_xpages_common_msg&count="+count;
//$(".xpagesContent").empty(); //$(".xpagesContent").empty();
$(".xpagePublishCommon-wrap").find(".xpagesContent").val(url); $(".xpagePublishCommon-wrap").find(".xpagesContent").val(url);
}else{ }else{
$(".xpagePublishCommon-wrap").find(".xpagesContent").val(""); $(".xpagePublishCommon-wrap").find(".xpagesContent").val("");
//$(".xpagesContent").empty(); //$(".xpagesContent").empty();
} }
}); });
} }
function getParamString(url,name) { function getParamString(url,name) {

View File

@ -1,14 +1,14 @@
$(document).ready(function(){ $(document).ready(function(){
renderCommonXPagesConfigPage(); renderCommonXPagesConfigPage();
}); });
function renderCommonXPagesConfigPage(){ function renderCommonXPagesConfigPage(){
var contentStr="<div class='xpagePublishControlMap-wrap'>"; var contentStr="<div class='xpagePublishControlMap-wrap'>";
//contentStr+="<h3>流程发布门户-控制地图</h3>"; //contentStr+="<h3>流程发布门户-控制地图</h3>";
contentStr+="<div class='xpages-label-text'>设置显示个数</div>"; contentStr+="<div class='xpages-label-text'>设置显示个数</div>";
contentStr+="<input id='commonxpage_tcount' type='text' placeholder='请输入显示个数,点击空白处自动生成URL' value='' class='txt' style='width:90%;'>"; contentStr+="<input id='commonxpage_tcount' type='text' placeholder='请输入显示个数,点击空白处自动生成URL' value='' class='txt' style='width:90%;'>";
contentStr+="<textarea class='url xpagesContent' readonly></textarea>"; contentStr+="<textarea class='url xpagesContent' readonly></textarea>";
contentStr+="</div>"; contentStr+="</div>";
$(".cwapp-right").append(contentStr); $(".cwapp-right").append(contentStr);
var cwUrl = getCwUrl();//获取之前的存储的url链接 var cwUrl = getCwUrl();//获取之前的存储的url链接
@ -19,17 +19,17 @@ function renderCommonXPagesConfigPage(){
} }
$("#commonxpage_tcount").blur(function(){ $("#commonxpage_tcount").blur(function(){
var count = $('#commonxpage_tcount').val(); var count = $('#commonxpage_tcount').val();
if(count!=""){ if(count!=""){
var url="./w?sid=@sid&cmd=com.actionsoft.apps.publisher_xpages_control_msg&count="+count; var url="./w?sid=@sid&cmd=com.actionsoft.apps.publisher_xpages_control_msg&count="+count;
//$(".xpagesContent").empty(); //$(".xpagesContent").empty();
$(".xpagePublishControlMap-wrap").find(".xpagesContent").val(url); $(".xpagePublishControlMap-wrap").find(".xpagesContent").val(url);
}else{ }else{
$(".xpagePublishControlMap-wrap").find(".xpagesContent").val(""); $(".xpagePublishControlMap-wrap").find(".xpagesContent").val("");
} }
}); });
} }

View File

@ -1,14 +1,14 @@
$(document).ready(function(){ $(document).ready(function(){
renderCommonXPagesConfigPage(); renderCommonXPagesConfigPage();
}); });
function renderCommonXPagesConfigPage(){ function renderCommonXPagesConfigPage(){
var contentStr="<div class='xpagePublishDataMap-wrap'>"; var contentStr="<div class='xpagePublishDataMap-wrap'>";
contentStr+="<div class='xpages-label-text'>设置显示个数</div>"; contentStr+="<div class='xpages-label-text'>设置显示个数</div>";
//contentStr+="<h3>流程发布门户-数据地图</h3><input id='commonxpage_tcount' type='text' placeholder='设置显示个数,点击空白处自动生成URL' value='' class='txt' style='width:90%;'>"; //contentStr+="<h3>流程发布门户-数据地图</h3><input id='commonxpage_tcount' type='text' placeholder='设置显示个数,点击空白处自动生成URL' value='' class='txt' style='width:90%;'>";
contentStr+="<input id='commonxpage_tcount' type='text' placeholder='请输入显示个数,点击空白处自动生成URL' value='' class='txt' style='width:90%;'>"; contentStr+="<input id='commonxpage_tcount' type='text' placeholder='请输入显示个数,点击空白处自动生成URL' value='' class='txt' style='width:90%;'>";
contentStr+="<textarea class='url xpagesContent' readonly></textarea>"; contentStr+="<textarea class='url xpagesContent' readonly></textarea>";
contentStr+="</div>"; contentStr+="</div>";
$(".cwapp-right").append(contentStr); $(".cwapp-right").append(contentStr);
var cwUrl = getCwUrl();//获取之前的存储的url链接 var cwUrl = getCwUrl();//获取之前的存储的url链接
if(cwUrl!=null && cwUrl!=undefined && cwUrl!=""){ if(cwUrl!=null && cwUrl!=undefined && cwUrl!=""){
@ -17,18 +17,18 @@ function renderCommonXPagesConfigPage(){
} }
$("#commonxpage_tcount").blur(function(){ $("#commonxpage_tcount").blur(function(){
var count = $('#commonxpage_tcount').val(); var count = $('#commonxpage_tcount').val();
if(count!=""){ if(count!=""){
var url="./w?sid=@sid&cmd=com.actionsoft.apps.publisher_xpages_data_msg&count="+count; var url="./w?sid=@sid&cmd=com.actionsoft.apps.publisher_xpages_data_msg&count="+count;
//$(".xpagesContent").empty(); //$(".xpagesContent").empty();
//$(".xpagesContent").append(url); //$(".xpagesContent").append(url);
$(".xpagePublishDataMap-wrap").find(".xpagesContent").val(url); $(".xpagePublishDataMap-wrap").find(".xpagesContent").val(url);
}else{ }else{
//$(".xpagesContent").empty(); //$(".xpagesContent").empty();
$(".xpagePublishDataMap-wrap").find(".xpagesContent").val(""); $(".xpagePublishDataMap-wrap").find(".xpagesContent").val("");
} }
}); });
} }

View File

@ -1,14 +1,14 @@
$(document).ready(function(){ $(document).ready(function(){
renderCommonXPagesConfigPage(); renderCommonXPagesConfigPage();
}); });
function renderCommonXPagesConfigPage(){ function renderCommonXPagesConfigPage(){
var contentStr="<div class='xpagePublishFrequency-wrap'>"; var contentStr="<div class='xpagePublishFrequency-wrap'>";
contentStr+="<div class='xpages-label-text'>设置显示个数</div>"; contentStr+="<div class='xpages-label-text'>设置显示个数</div>";
//contentStr+="<h3>流程发布门户-高频流程</h3><input id='commonxpage_tcount' type='text' placeholder='设置显示个数,点击空白处自动生成URL' value='' class='txt' style='width:90%;'>"; //contentStr+="<h3>流程发布门户-高频流程</h3><input id='commonxpage_tcount' type='text' placeholder='设置显示个数,点击空白处自动生成URL' value='' class='txt' style='width:90%;'>";
contentStr+="<input id='commonxpage_tcount' type='text' placeholder='请输入显示个数,点击空白处自动生成URL' value='' class='txt' style='width:90%;'>"; contentStr+="<input id='commonxpage_tcount' type='text' placeholder='请输入显示个数,点击空白处自动生成URL' value='' class='txt' style='width:90%;'>";
contentStr+="<textarea class='url xpagesContent' readonly></textarea>"; contentStr+="<textarea class='url xpagesContent' readonly></textarea>";
contentStr+="</div>"; contentStr+="</div>";
$(".cwapp-right").append(contentStr); $(".cwapp-right").append(contentStr);
var cwUrl = getCwUrl();//获取之前的存储的url链接 var cwUrl = getCwUrl();//获取之前的存储的url链接
if(cwUrl!=null && cwUrl!=undefined && cwUrl!=""){ if(cwUrl!=null && cwUrl!=undefined && cwUrl!=""){
@ -17,18 +17,18 @@ function renderCommonXPagesConfigPage(){
} }
$("#commonxpage_tcount").blur(function(){ $("#commonxpage_tcount").blur(function(){
var count = $('#commonxpage_tcount').val(); var count = $('#commonxpage_tcount').val();
if(count!=""){ if(count!=""){
var url="./w?sid=@sid&cmd=com.actionsoft.apps.publisher_xpages_frequency_msg&count="+count; var url="./w?sid=@sid&cmd=com.actionsoft.apps.publisher_xpages_frequency_msg&count="+count;
//$(".xpagesContent").empty(); //$(".xpagesContent").empty();
//$(".xpagesContent").append(url); //$(".xpagesContent").append(url);
$(".xpagePublishFrequency-wrap").find(".xpagesContent").val(url); $(".xpagePublishFrequency-wrap").find(".xpagesContent").val(url);
}else{ }else{
//$(".xpagesContent").empty(); //$(".xpagesContent").empty();
$(".xpagePublishFrequency-wrap").find(".xpagesContent").val(""); $(".xpagePublishFrequency-wrap").find(".xpagesContent").val("");
} }
}); });
} }
function getParamString(url,name) { function getParamString(url,name) {

View File

@ -1,53 +1,53 @@
var liHeight = 21; var liHeight = 21;
function openPortal(sid, uuid, taskId) { function openPortal(sid, uuid, taskId) {
// if (taskId == "") { // if (taskId == "") {
if (true) { if (true) {
window window
.open("./w?cmd=com.actionsoft.apps.coe.pal.publisher_client_sso_page&uuid=" .open("./w?cmd=com.actionsoft.apps.coe.pal.publisher_client_sso_page&uuid="
+ uuid + "&sid=" + sid + "&taskId=" + taskId);// open Windows + uuid + "&sid=" + sid + "&taskId=" + taskId);// open Windows
} else { } else {
// 打开流程手册 // 打开流程手册
$.simpleAlert('正在打开', 'loading'); $.simpleAlert('正在打开', 'loading');
$.ajax({ $.ajax({
type : "POST", type : "POST",
url : "./jd?sid=" + sid url : "./jd?sid=" + sid
+ "&cmd=com.actionsoft.apps.coe.pal_outputreport_output_process_preview", + "&cmd=com.actionsoft.apps.coe.pal_outputreport_output_process_preview",
data : { data : {
taskId : taskId taskId : taskId
}, },
success : function(msg) { success : function(msg) {
if (msg.result == "ok") { if (msg.result == "ok") {
$.simpleAlert("close"); $.simpleAlert("close");
if (msg['data']) { if (msg['data']) {
var url = msg['data']['url']; var url = msg['data']['url'];
console.log(url); console.log(url);
window.open(url); window.open(url);
} }
} else { } else {
$.simpleAlert("close"); $.simpleAlert("close");
$.simpleAlert(msg['msg'], 'info'); $.simpleAlert(msg['msg'], 'info');
} }
} }
}); });
} }
} }
//对json进行降序排序函数 //对json进行降序排序函数
var colId="date" var colId="date"
var desc = function(x,y) var desc = function(x,y)
{ {
return (x[colId] < y[colId]) ? 1 : -1 return (x[colId] < y[colId]) ? 1 : -1
} }
//对json进行升序排序函数 //对json进行升序排序函数
var asc = function(x,y) var asc = function(x,y)
{ {
return (x[colId] > y[colId]) ? 1 : -1 return (x[colId] > y[colId]) ? 1 : -1
} }
// JSON按照时间排序 // JSON按照时间排序
function sortByDate(arr) { function sortByDate(arr) {
arr.sort(desc); arr.sort(desc);
return arr; return arr;
} }
/** /**
@ -60,25 +60,25 @@ var day = hour * 24;
var halfamonth = day * 15; var halfamonth = day * 15;
var month = day * 30; var month = day * 30;
function transferDateFormat(dateTimeStamp) { function transferDateFormat(dateTimeStamp) {
if (dateTimeStamp == '') { if (dateTimeStamp == '') {
return ""; return "";
} }
var publishDate = new Date() var publishDate = new Date()
publishDate.setTime(dateTimeStamp); publishDate.setTime(dateTimeStamp);
var now = new Date(); var now = new Date();
if (now.getFullYear() - publishDate.getFullYear() >= 1) {// 非今年发布 if (now.getFullYear() - publishDate.getFullYear() >= 1) {// 非今年发布
return publishDate.Format("yyyy年M月"); return publishDate.Format("yyyy年M月");
} else if (now.getTime() - dateTimeStamp <= minute) {// 一分钟内,刚刚 } else if (now.getTime() - dateTimeStamp <= minute) {// 一分钟内,刚刚
return "刚刚"; return "刚刚";
} else if (now.getTime() - dateTimeStamp <= hour) { } else if (now.getTime() - dateTimeStamp <= hour) {
return parseInt((now.getTime() - dateTimeStamp)/minute) + '分钟前'; return parseInt((now.getTime() - dateTimeStamp)/minute) + '分钟前';
} else if (now.getTime() - dateTimeStamp <= (now.getHours())*hour +1) { } else if (now.getTime() - dateTimeStamp <= (now.getHours())*hour +1) {
return parseInt((now.getTime() - dateTimeStamp)/hour) + '小时前'; return parseInt((now.getTime() - dateTimeStamp)/hour) + '小时前';
} else if (now.getTime() - dateTimeStamp <= day + (now.getHours())*hour) {// 昨天 } else if (now.getTime() - dateTimeStamp <= day + (now.getHours())*hour) {// 昨天
return "昨天" + publishDate.Format("HH") + "点"; return "昨天" + publishDate.Format("HH") + "点";
} else { } else {
return publishDate.Format("M月d日"); return publishDate.Format("M月d日");
} }
} }
//  对Date的扩展 Date 转化为指定格式的String //  对Date的扩展 Date 转化为指定格式的String
@ -89,23 +89,23 @@ function transferDateFormat(dateTimeStamp) {
//  (new Date()).Format("yyyy-M-d h:m:s.S")      ==> 2006-7-2 8:9:4.18  //  (new Date()).Format("yyyy-M-d h:m:s.S")      ==> 2006-7-2 8:9:4.18 
Date.prototype.Format = function(fmt) { Date.prototype.Format = function(fmt) {
var o = { var o = {
"M+" : this.getMonth() + 1, "M+" : this.getMonth() + 1,
"d+" : this.getDate(), "d+" : this.getDate(),
"H+" : this.getHours(), "H+" : this.getHours(),
"m+" : this.getMinutes(), "m+" : this.getMinutes(),
"s+" : this.getSeconds(), "s+" : this.getSeconds(),
"S+" : this.getMilliseconds() "S+" : this.getMilliseconds()
}; };
if (/(y+)/.test(fmt)) { if (/(y+)/.test(fmt)) {
fmt = fmt.replace(RegExp.$1, (this.getFullYear() + "") fmt = fmt.replace(RegExp.$1, (this.getFullYear() + "")
.substr(4 - RegExp.$1.length)); .substr(4 - RegExp.$1.length));
} }
for ( var k in o) { for ( var k in o) {
if (new RegExp("(" + k + ")").test(fmt)) { if (new RegExp("(" + k + ")").test(fmt)) {
fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k])
: (("00" + o[k]).substr(String(o[k]).length))); : (("00" + o[k]).substr(String(o[k]).length)));
} }
} }
return fmt; return fmt;
} }

View File

@ -1,14 +1,14 @@
$(document).ready(function(){ $(document).ready(function(){
renderCommonXPagesConfigPage(); renderCommonXPagesConfigPage();
}); });
function renderCommonXPagesConfigPage(){ function renderCommonXPagesConfigPage(){
var contentStr="<div class='xpagePublishNotification-wrap'>"; var contentStr="<div class='xpagePublishNotification-wrap'>";
contentStr+="<div class='xpages-label-text'>设置显示个数</div>"; contentStr+="<div class='xpages-label-text'>设置显示个数</div>";
//contentStr+="<h3>流程发布门户-发布动态</h3><input id='commonxpage_tcount' type='text' placeholder='设置显示个数,点击空白处自动生成URL' value='' class='txt' style='width:90%;'>"; //contentStr+="<h3>流程发布门户-发布动态</h3><input id='commonxpage_tcount' type='text' placeholder='设置显示个数,点击空白处自动生成URL' value='' class='txt' style='width:90%;'>";
contentStr+="<input id='commonxpage_tcount' type='text' placeholder='请输入显示个数,点击空白处自动生成URL' value='' class='txt' style='width:90%;'>"; contentStr+="<input id='commonxpage_tcount' type='text' placeholder='请输入显示个数,点击空白处自动生成URL' value='' class='txt' style='width:90%;'>";
contentStr+="<textarea class='url xpagesContent' readonly></textarea>"; contentStr+="<textarea class='url xpagesContent' readonly></textarea>";
contentStr+="</div>"; contentStr+="</div>";
$(".cwapp-right").append(contentStr); $(".cwapp-right").append(contentStr);
var cwUrl = getCwUrl();//获取之前的存储的url链接 var cwUrl = getCwUrl();//获取之前的存储的url链接
if(cwUrl!=null && cwUrl!=undefined && cwUrl!=""){ if(cwUrl!=null && cwUrl!=undefined && cwUrl!=""){
@ -17,18 +17,18 @@ function renderCommonXPagesConfigPage(){
} }
$("#commonxpage_tcount").blur(function(){ $("#commonxpage_tcount").blur(function(){
var count = $('#commonxpage_tcount').val(); var count = $('#commonxpage_tcount').val();
if(count!=""){ if(count!=""){
var url="./w?sid=@sid&cmd=com.actionsoft.apps.publisher_xpages_notification_msg&count="+count; var url="./w?sid=@sid&cmd=com.actionsoft.apps.publisher_xpages_notification_msg&count="+count;
//$(".xpagesContent").empty(); //$(".xpagesContent").empty();
//$(".xpagesContent").append(url); //$(".xpagesContent").append(url);
$(".xpagePublishNotification-wrap").find(".xpagesContent").val(url); $(".xpagePublishNotification-wrap").find(".xpagesContent").val(url);
}else{ }else{
//$(".xpagesContent").empty(); //$(".xpagesContent").empty();
$(".xpagePublishNotification-wrap").find(".xpagesContent").val(""); $(".xpagePublishNotification-wrap").find(".xpagesContent").val("");
} }
}); });
} }
function getParamString(url,name) { function getParamString(url,name) {

View File

@ -1,14 +1,14 @@
$(document).ready(function(){ $(document).ready(function(){
renderCommonXPagesConfigPage(); renderCommonXPagesConfigPage();
}); });
function renderCommonXPagesConfigPage(){ function renderCommonXPagesConfigPage(){
var contentStr="<div class='xpagePublishOrgMap-wrap'>"; var contentStr="<div class='xpagePublishOrgMap-wrap'>";
contentStr+="<div class='xpages-label-text'>设置显示个数</div>"; contentStr+="<div class='xpages-label-text'>设置显示个数</div>";
//contentStr+="<h3>流程发布门户-组织地图</h3><input id='commonxpage_tcount' type='text' placeholder='设置显示个数,点击空白处自动生成URL' value='' class='txt' style='width:90%;'>"; //contentStr+="<h3>流程发布门户-组织地图</h3><input id='commonxpage_tcount' type='text' placeholder='设置显示个数,点击空白处自动生成URL' value='' class='txt' style='width:90%;'>";
contentStr+="<input id='commonxpage_tcount' type='text' placeholder='请输入显示个数,点击空白处自动生成URL' value='' class='txt' style='width:90%;'>"; contentStr+="<input id='commonxpage_tcount' type='text' placeholder='请输入显示个数,点击空白处自动生成URL' value='' class='txt' style='width:90%;'>";
contentStr+="<textarea class='url xpagesContent' readonly></textarea>"; contentStr+="<textarea class='url xpagesContent' readonly></textarea>";
contentStr+="</div>"; contentStr+="</div>";
$(".cwapp-right").append(contentStr); $(".cwapp-right").append(contentStr);
var cwUrl = getCwUrl();//获取之前的存储的url链接 var cwUrl = getCwUrl();//获取之前的存储的url链接
if(cwUrl!=null && cwUrl!=undefined && cwUrl!=""){ if(cwUrl!=null && cwUrl!=undefined && cwUrl!=""){
@ -17,17 +17,17 @@ function renderCommonXPagesConfigPage(){
} }
$("#commonxpage_tcount").blur(function(){ $("#commonxpage_tcount").blur(function(){
var count = $('#commonxpage_tcount').val(); var count = $('#commonxpage_tcount').val();
if(count!=""){ if(count!=""){
var url="./w?sid=@sid&cmd=com.actionsoft.apps.publisher_xpages_org_msg&count="+count; var url="./w?sid=@sid&cmd=com.actionsoft.apps.publisher_xpages_org_msg&count="+count;
//$(".xpagesContent").empty(); //$(".xpagesContent").empty();
//$(".xpagesContent").append(url); //$(".xpagesContent").append(url);
$(".xpagePublishOrgMap-wrap").find(".xpagesContent").val(url); $(".xpagePublishOrgMap-wrap").find(".xpagesContent").val(url);
}else{ }else{
$(".xpagePublishOrgMap-wrap").find(".xpagesContent").val(""); $(".xpagePublishOrgMap-wrap").find(".xpagesContent").val("");
} }
}); });
} }
function getParamString(url,name) { function getParamString(url,name) {

View File

@ -1,14 +1,14 @@
$(document).ready(function(){ $(document).ready(function(){
renderCommonXPagesConfigPage(); renderCommonXPagesConfigPage();
}); });
function renderCommonXPagesConfigPage(){ function renderCommonXPagesConfigPage(){
var contentStr="<div class='xpagePublishParticipant-wrap'>"; var contentStr="<div class='xpagePublishParticipant-wrap'>";
contentStr+="<div class='xpages-label-text'>设置显示个数</div>"; contentStr+="<div class='xpages-label-text'>设置显示个数</div>";
//contentStr+="<h3>流程发布门户-我参与的</h3><input id='systemxpage_tcount' type='text' placeholder='设置显示个数,点击空白处自动生成URL' value='' class='txt' style='width:90%;'>"; //contentStr+="<h3>流程发布门户-我参与的</h3><input id='systemxpage_tcount' type='text' placeholder='设置显示个数,点击空白处自动生成URL' value='' class='txt' style='width:90%;'>";
contentStr+="<input id='systemxpage_tcount' type='text' placeholder='请输入显示个数,点击空白处自动生成URL' value='' class='txt' style='width:90%;'>"; contentStr+="<input id='systemxpage_tcount' type='text' placeholder='请输入显示个数,点击空白处自动生成URL' value='' class='txt' style='width:90%;'>";
contentStr+="<textarea class='url xpagesContent' readonly></textarea>"; contentStr+="<textarea class='url xpagesContent' readonly></textarea>";
contentStr+="</div>"; contentStr+="</div>";
$(".cwapp-right").append(contentStr); $(".cwapp-right").append(contentStr);
var cwUrl = getCwUrl();//获取之前的存储的url链接 var cwUrl = getCwUrl();//获取之前的存储的url链接
if(cwUrl!=null && cwUrl!=undefined && cwUrl!=""){ if(cwUrl!=null && cwUrl!=undefined && cwUrl!=""){
@ -17,18 +17,18 @@ function renderCommonXPagesConfigPage(){
} }
$("#systemxpage_tcount").blur(function(){ $("#systemxpage_tcount").blur(function(){
var count = $('#systemxpage_tcount').val(); var count = $('#systemxpage_tcount').val();
if(count!=""){ if(count!=""){
var url="./w?sid=@sid&cmd=com.actionsoft.apps.publisher_xpages_participant_msg&count="+count; var url="./w?sid=@sid&cmd=com.actionsoft.apps.publisher_xpages_participant_msg&count="+count;
//$(".xpagesContent").empty(); //$(".xpagesContent").empty();
//$(".xpagesContent").append(url); //$(".xpagesContent").append(url);
$(".xpagePublishParticipant-wrap").find(".xpagesContent").val(url); $(".xpagePublishParticipant-wrap").find(".xpagesContent").val(url);
}else{ }else{
//$(".xpagesContent").empty(); //$(".xpagesContent").empty();
$(".xpagePublishParticipant-wrap").find(".xpagesContent").val(""); $(".xpagePublishParticipant-wrap").find(".xpagesContent").val("");
} }
}); });
} }
function getParamString(url,name) { function getParamString(url,name) {

View File

@ -1,14 +1,14 @@
$(document).ready(function(){ $(document).ready(function(){
renderCommonXPagesConfigPage(); renderCommonXPagesConfigPage();
}); });
function renderCommonXPagesConfigPage(){ function renderCommonXPagesConfigPage(){
var contentStr="<div class='xpagePublishPostresponsibility-wrap'>"; var contentStr="<div class='xpagePublishPostresponsibility-wrap'>";
contentStr+="<div class='xpages-label-text'>设置显示个数</div>"; contentStr+="<div class='xpages-label-text'>设置显示个数</div>";
//contentStr+="<h3>流程发布门户-岗位职责</h3><input id='systemxpage_tcount' type='text' placeholder='设置显示个数,点击空白处自动生成URL' value='' class='txt' style='width:90%;'>"; //contentStr+="<h3>流程发布门户-岗位职责</h3><input id='systemxpage_tcount' type='text' placeholder='设置显示个数,点击空白处自动生成URL' value='' class='txt' style='width:90%;'>";
contentStr+="<input id='systemxpage_tcount' type='text' placeholder='请输入显示个数,点击空白处自动生成URL' value='' class='txt' style='width:90%;'>"; contentStr+="<input id='systemxpage_tcount' type='text' placeholder='请输入显示个数,点击空白处自动生成URL' value='' class='txt' style='width:90%;'>";
contentStr+="<textarea class='url xpagesContent' readonly></textarea>"; contentStr+="<textarea class='url xpagesContent' readonly></textarea>";
contentStr+="</div>"; contentStr+="</div>";
$(".cwapp-right").append(contentStr); $(".cwapp-right").append(contentStr);
var cwUrl = getCwUrl();//获取之前的存储的url链接 var cwUrl = getCwUrl();//获取之前的存储的url链接
if(cwUrl!=null && cwUrl!=undefined && cwUrl!=""){ if(cwUrl!=null && cwUrl!=undefined && cwUrl!=""){
@ -17,18 +17,18 @@ function renderCommonXPagesConfigPage(){
} }
$("#systemxpage_tcount").blur(function(){ $("#systemxpage_tcount").blur(function(){
var count = $('#systemxpage_tcount').val(); var count = $('#systemxpage_tcount').val();
if(count!=""){ if(count!=""){
var url="./w?sid=@sid&cmd=com.actionsoft.apps.publisher_xpages_postresponsibility_msg&count="+count; var url="./w?sid=@sid&cmd=com.actionsoft.apps.publisher_xpages_postresponsibility_msg&count="+count;
//$(".xpagesContent").empty(); //$(".xpagesContent").empty();
//$(".xpagesContent").append(url); //$(".xpagesContent").append(url);
$(".xpagePublishPostresponsibility-wrap").find(".xpagesContent").val(url); $(".xpagePublishPostresponsibility-wrap").find(".xpagesContent").val(url);
}else{ }else{
//$(".xpagesContent").empty(); //$(".xpagesContent").empty();
$(".xpagePublishPostresponsibility-wrap").find(".xpagesContent").val(""); $(".xpagePublishPostresponsibility-wrap").find(".xpagesContent").val("");
} }
}); });
} }
function getParamString(url,name) { function getParamString(url,name) {

View File

@ -1,19 +1,19 @@
$(document).ready(function(){ $(document).ready(function(){
renderCommonXPagesConfigPage(); renderCommonXPagesConfigPage();
}); });
function renderCommonXPagesConfigPage(){ function renderCommonXPagesConfigPage(){
getProcessMapData(); getProcessMapData();
/* /*
var contentStr="<div class='xpagePublishProcessMap-wrap'>"; var contentStr="<div class='xpagePublishProcessMap-wrap'>";
contentStr+="<div class='xpages-label-text'>请输入默认显示的资产库Id</div>"; contentStr+="<div class='xpages-label-text'>请输入默认显示的资产库Id</div>";
//contentStr+="<h3>流程发布门户-流程地图</h3>"; //contentStr+="<h3>流程发布门户-流程地图</h3>";
contentStr+="<input id='commonxpage_wsId' type='text' placeholder='默认显示的资产库Id' value='' class='txt' style='width:90%;'>"; contentStr+="<input id='commonxpage_wsId' type='text' placeholder='默认显示的资产库Id' value='' class='txt' style='width:90%;'>";
contentStr+="<div style='height:10px;width:10px;'></div>"; contentStr+="<div style='height:10px;width:10px;'></div>";
contentStr+="<div class='xpages-label-text'>请输入默认组织的单元Id</div>"; contentStr+="<div class='xpages-label-text'>请输入默认组织的单元Id</div>";
contentStr+="<input id='commonxpage_orgId' type='text' placeholder='默认组织的单元Id' value='' class='txt' style='width:90%;'>"; contentStr+="<input id='commonxpage_orgId' type='text' placeholder='默认组织的单元Id' value='' class='txt' style='width:90%;'>";
contentStr+="<textarea class='url xpagesContent' readonly></textarea>"; contentStr+="<textarea class='url xpagesContent' readonly></textarea>";
contentStr+="</div>"; contentStr+="</div>";
$(".cwapp-right").append(contentStr); $(".cwapp-right").append(contentStr);
var cwUrl = getCwUrl();//获取之前的存储的url链接 var cwUrl = getCwUrl();//获取之前的存储的url链接
if(cwUrl!=null && cwUrl!=undefined && cwUrl!=""){ if(cwUrl!=null && cwUrl!=undefined && cwUrl!=""){
@ -25,68 +25,68 @@ function renderCommonXPagesConfigPage(){
} }
$("#commonxpage_wsId, #commonxpage_orgId").blur(function(){ $("#commonxpage_wsId, #commonxpage_orgId").blur(function(){
var wsId = $('#commonxpage_wsId').val(); var wsId = $('#commonxpage_wsId').val();
var orgId = $('#commonxpage_orgId').val(); var orgId = $('#commonxpage_orgId').val();
var url="./w?sid=@sid&cmd=com.actionsoft.apps.publisher_xpages_processmap_msg&wsId="+wsId + "&orgId=" + orgId; var url="./w?sid=@sid&cmd=com.actionsoft.apps.publisher_xpages_processmap_msg&wsId="+wsId + "&orgId=" + orgId;
//$(".xpagesContent").empty(); //$(".xpagesContent").empty();
//$(".xpagesContent").append(url); //$(".xpagesContent").append(url);
$(".xpagePublishProcessMap-wrap").find(".xpagesContent").val(url); $(".xpagePublishProcessMap-wrap").find(".xpagesContent").val(url);
}); });
*/ */
} }
function getProcessMapData() { function getProcessMapData() {
var params = {}; var params = {};
var url = './jd?sid=' + sid + '&cmd=com.actionsoft.apps.publisher_workspace_and_org_msg'; var url = './jd?sid=' + sid + '&cmd=com.actionsoft.apps.publisher_workspace_and_org_msg';
awsui.ajax.post(url, params, function (responseObject) { awsui.ajax.post(url, params, function (responseObject) {
if (responseObject['result'] == 'ok') { if (responseObject['result'] == 'ok') {
var wsList = responseObject["data"]["data"]['workspaces']; var wsList = responseObject["data"]["data"]['workspaces'];
var orgList = responseObject["data"]["data"]['companys']; var orgList = responseObject["data"]["data"]['companys'];
var contentStr = "<div class='xpagePublishProcessMap-wrap'>"; var contentStr = "<div class='xpagePublishProcessMap-wrap'>";
contentStr += "<div class='xpages-label-text'>请选择默认显示的资产库</div>"; contentStr += "<div class='xpages-label-text'>请选择默认显示的资产库</div>";
contentStr += "<select class='publisher-wh-select txt xpages-select-text' style='width:95%'>"; contentStr += "<select class='publisher-wh-select txt xpages-select-text' style='width:95%'>";
contentStr += "<option value=''>--请选择--</option>"; contentStr += "<option value=''>--请选择--</option>";
for (var i = 0; i < wsList.length; i++) { for (var i = 0; i < wsList.length; i++) {
var info = wsList[i]; var info = wsList[i];
contentStr += '<option value="' + info.id + '" >' + info.name + '</option>'; contentStr += '<option value="' + info.id + '" >' + info.name + '</option>';
} }
contentStr += "</select>"; contentStr += "</select>";
contentStr += "<div class='xpages-label-text '>请选择默认组织</div>"; contentStr += "<div class='xpages-label-text '>请选择默认组织</div>";
contentStr += "<select class='publisher-org-select txt xpages-select-text' style='width:95%'>"; contentStr += "<select class='publisher-org-select txt xpages-select-text' style='width:95%'>";
contentStr += "<option value=''>--请选择--</option>"; contentStr += "<option value=''>--请选择--</option>";
for (var i = 0; i < orgList.length; i++) { for (var i = 0; i < orgList.length; i++) {
var info = orgList[i]; var info = orgList[i];
contentStr += '<option value="' + info.id + '" >' + info.name + '</option>'; contentStr += '<option value="' + info.id + '" >' + info.name + '</option>';
} }
contentStr += "</select>"; contentStr += "</select>";
contentStr += "<textarea class='url xpagesContent'></textarea>"; contentStr += "<textarea class='url xpagesContent'></textarea>";
contentStr += "</div>"; contentStr += "</div>";
$(".cwapp-right").append(contentStr); $(".cwapp-right").append(contentStr);
var cwUrl = getCwUrl();//获取之前的存储的url链接 var cwUrl = getCwUrl();//获取之前的存储的url链接
if (cwUrl != null && cwUrl != undefined && cwUrl != "") { if (cwUrl != null && cwUrl != undefined && cwUrl != "") {
//$(".xpagePublishProcessMap-wrap").find(".xpagesContent").val(cwUrl); //$(".xpagePublishProcessMap-wrap").find(".xpagesContent").val(cwUrl);
var wsId = getParamString(cwUrl, "wsId"); var wsId = getParamString(cwUrl, "wsId");
var orgId = getParamString(cwUrl, "orgId"); var orgId = getParamString(cwUrl, "orgId");
if (wsId != "" && orgId != null) { if (wsId != "" && orgId != null) {
$('.publisher-wh-select').val(wsId); $('.publisher-wh-select').val(wsId);
$('.publisher-org-select').val(orgId); $('.publisher-org-select').val(orgId);
} }
} }
$(".publisher-org-select").change(function () { $(".publisher-org-select").change(function () {
var orgId = $('.publisher-org-select option:selected').val(); var orgId = $('.publisher-org-select option:selected').val();
var wsId = $('.publisher-wh-select option:selected').val(); var wsId = $('.publisher-wh-select option:selected').val();
if (orgId != "" && wsId != "") { if (orgId != "" && wsId != "") {
var url = "./w?sid=@sid&cmd=com.actionsoft.apps.publisher_xpages_processmap_msg&wsId=" + wsId + "&orgId=" + orgId; var url = "./w?sid=@sid&cmd=com.actionsoft.apps.publisher_xpages_processmap_msg&wsId=" + wsId + "&orgId=" + orgId;
$(".xpagePublishProcessMap-wrap").find(".xpagesContent").val(url); $(".xpagePublishProcessMap-wrap").find(".xpagesContent").val(url);
} else { } else {
$(".xpagePublishProcessMap-wrap").find(".xpagesContent").val(""); $(".xpagePublishProcessMap-wrap").find(".xpagesContent").val("");
} }
}); });
} else { } else {
$.simpleAlert(responseObject['msg'], responseObject['result']); $.simpleAlert(responseObject['msg'], responseObject['result']);
} }
}, 'json'); }, 'json');
} }
function getParamString(url,name) { function getParamString(url,name) {

View File

@ -1,14 +1,14 @@
$(document).ready(function(){ $(document).ready(function(){
renderCommonXPagesConfigPage(); renderCommonXPagesConfigPage();
}); });
function renderCommonXPagesConfigPage(){ function renderCommonXPagesConfigPage(){
var contentStr="<div class='xpagePublishRcaimatrix-wrap'>"; var contentStr="<div class='xpagePublishRcaimatrix-wrap'>";
contentStr+="<div class='xpages-label-text'>设置显示个数</div>"; contentStr+="<div class='xpages-label-text'>设置显示个数</div>";
//contentStr+="<h3>流程发布门户-RCAI矩阵</h3><input id='systemxpage_tcount' type='text' placeholder='设置显示个数,点击空白处自动生成URL' value='' class='txt' style='width:90%;'>"; //contentStr+="<h3>流程发布门户-RCAI矩阵</h3><input id='systemxpage_tcount' type='text' placeholder='设置显示个数,点击空白处自动生成URL' value='' class='txt' style='width:90%;'>";
contentStr+="<input id='systemxpage_tcount' type='text' placeholder='请输入显示个数,点击空白处自动生成URL' value='' class='txt' style='width:90%;'>"; contentStr+="<input id='systemxpage_tcount' type='text' placeholder='请输入显示个数,点击空白处自动生成URL' value='' class='txt' style='width:90%;'>";
contentStr+="<textarea class='url xpagesContent' readonly></textarea>"; contentStr+="<textarea class='url xpagesContent' readonly></textarea>";
contentStr+="</div>"; contentStr+="</div>";
$(".cwapp-right").append(contentStr); $(".cwapp-right").append(contentStr);
var cwUrl = getCwUrl();//获取之前的存储的url链接 var cwUrl = getCwUrl();//获取之前的存储的url链接
if(cwUrl!=null && cwUrl!=undefined && cwUrl!=""){ if(cwUrl!=null && cwUrl!=undefined && cwUrl!=""){
@ -17,18 +17,18 @@ function renderCommonXPagesConfigPage(){
} }
$("#systemxpage_tcount").blur(function(){ $("#systemxpage_tcount").blur(function(){
var count = $('#systemxpage_tcount').val(); var count = $('#systemxpage_tcount').val();
if(count!=""){ if(count!=""){
var url="./w?sid=@sid&cmd=com.actionsoft.apps.publisher_xpages_rcaimatrix_msg&count="+count; var url="./w?sid=@sid&cmd=com.actionsoft.apps.publisher_xpages_rcaimatrix_msg&count="+count;
//$(".xpagesContent").empty(); //$(".xpagesContent").empty();
//$(".xpagesContent").append(url); //$(".xpagesContent").append(url);
$(".xpagePublishRcaimatrix-wrap").find(".xpagesContent").val(url); $(".xpagePublishRcaimatrix-wrap").find(".xpagesContent").val(url);
}else{ }else{
//$(".xpagesContent").empty(); //$(".xpagesContent").empty();
$(".xpagePublishRcaimatrix-wrap").find(".xpagesContent").val(""); $(".xpagePublishRcaimatrix-wrap").find(".xpagesContent").val("");
} }
}); });
} }
function getParamString(url,name) { function getParamString(url,name) {

View File

@ -1,14 +1,14 @@
$(document).ready(function(){ $(document).ready(function(){
renderCommonXPagesConfigPage(); renderCommonXPagesConfigPage();
}); });
function renderCommonXPagesConfigPage(){ function renderCommonXPagesConfigPage(){
var contentStr="<div class='xpagePublishResponsible-wrap'>"; var contentStr="<div class='xpagePublishResponsible-wrap'>";
contentStr+="<div class='xpages-label-text'>设置显示个数</div>"; contentStr+="<div class='xpages-label-text'>设置显示个数</div>";
//contentStr+="<h3>流程发布门户-我负责的</h3><input id='systemxpage_tcount' type='text' placeholder='设置显示个数,点击空白处自动生成URL' value='' class='txt' style='width:90%;'>"; //contentStr+="<h3>流程发布门户-我负责的</h3><input id='systemxpage_tcount' type='text' placeholder='设置显示个数,点击空白处自动生成URL' value='' class='txt' style='width:90%;'>";
contentStr+="<input id='systemxpage_tcount' type='text' placeholder='请输入显示个数,点击空白处自动生成URL' value='' class='txt' style='width:90%;'>"; contentStr+="<input id='systemxpage_tcount' type='text' placeholder='请输入显示个数,点击空白处自动生成URL' value='' class='txt' style='width:90%;'>";
contentStr+="<textarea class='url xpagesContent' readonly></textarea>"; contentStr+="<textarea class='url xpagesContent' readonly></textarea>";
contentStr+="</div>"; contentStr+="</div>";
$(".cwapp-right").append(contentStr); $(".cwapp-right").append(contentStr);
var cwUrl = getCwUrl();//获取之前的存储的url链接 var cwUrl = getCwUrl();//获取之前的存储的url链接
if(cwUrl!=null && cwUrl!=undefined && cwUrl!=""){ if(cwUrl!=null && cwUrl!=undefined && cwUrl!=""){
@ -17,18 +17,18 @@ function renderCommonXPagesConfigPage(){
} }
$("#systemxpage_tcount").blur(function(){ $("#systemxpage_tcount").blur(function(){
var count = $('#systemxpage_tcount').val(); var count = $('#systemxpage_tcount').val();
if(count!=""){ if(count!=""){
var url="./w?sid=@sid&cmd=com.actionsoft.apps.publisher_xpages_responsible_msg&count="+count; var url="./w?sid=@sid&cmd=com.actionsoft.apps.publisher_xpages_responsible_msg&count="+count;
//$(".xpagesContent").empty(); //$(".xpagesContent").empty();
//$(".xpagesContent").append(url); //$(".xpagesContent").append(url);
$(".xpagePublishResponsible-wrap").find(".xpagesContent").val(url); $(".xpagePublishResponsible-wrap").find(".xpagesContent").val(url);
}else{ }else{
//$(".xpagesContent").empty(); //$(".xpagesContent").empty();
$(".xpagePublishResponsible-wrap").find(".xpagesContent").val(""); $(".xpagePublishResponsible-wrap").find(".xpagesContent").val("");
} }
}); });
} }
function getParamString(url,name) { function getParamString(url,name) {

View File

@ -1,14 +1,14 @@
$(document).ready(function(){ $(document).ready(function(){
renderCommonXPagesConfigPage(); renderCommonXPagesConfigPage();
}); });
function renderCommonXPagesConfigPage(){ function renderCommonXPagesConfigPage(){
var contentStr="<div class='xpagePublishSystemMap-wrap'>"; var contentStr="<div class='xpagePublishSystemMap-wrap'>";
contentStr+="<div class='xpages-label-text'>设置显示个数</div>"; contentStr+="<div class='xpages-label-text'>设置显示个数</div>";
//contentStr+="<h3>流程发布门户-系统地图</h3><input id='systemxpage_tcount' type='text' placeholder='设置显示个数,点击空白处自动生成URL' value='' class='txt' style='width:90%;'>"; //contentStr+="<h3>流程发布门户-系统地图</h3><input id='systemxpage_tcount' type='text' placeholder='设置显示个数,点击空白处自动生成URL' value='' class='txt' style='width:90%;'>";
contentStr+="<input id='systemxpage_tcount' type='text' placeholder='请输入显示个数,点击空白处自动生成URL' value='' class='txt' style='width:90%;'>"; contentStr+="<input id='systemxpage_tcount' type='text' placeholder='请输入显示个数,点击空白处自动生成URL' value='' class='txt' style='width:90%;'>";
contentStr+="<textarea class='url xpagesContent' readonly></textarea>"; contentStr+="<textarea class='url xpagesContent' readonly></textarea>";
contentStr+="</div>"; contentStr+="</div>";
$(".cwapp-right").append(contentStr); $(".cwapp-right").append(contentStr);
var cwUrl = getCwUrl();//获取之前的存储的url链接 var cwUrl = getCwUrl();//获取之前的存储的url链接
if(cwUrl!=null && cwUrl!=undefined && cwUrl!=""){ if(cwUrl!=null && cwUrl!=undefined && cwUrl!=""){
@ -17,18 +17,18 @@ function renderCommonXPagesConfigPage(){
} }
$("#systemxpage_tcount").blur(function(){ $("#systemxpage_tcount").blur(function(){
var count = $('#systemxpage_tcount').val(); var count = $('#systemxpage_tcount').val();
if(count!=""){ if(count!=""){
var url="./w?sid=@sid&cmd=com.actionsoft.apps.publisher_xpages_system_msg&count="+count; var url="./w?sid=@sid&cmd=com.actionsoft.apps.publisher_xpages_system_msg&count="+count;
//$(".xpagesContent").empty(); //$(".xpagesContent").empty();
//$(".xpagesContent").append(url); //$(".xpagesContent").append(url);
$(".xpagePublishSystemMap-wrap").find(".xpagesContent").val(url); $(".xpagePublishSystemMap-wrap").find(".xpagesContent").val(url);
}else{ }else{
//$(".xpagesContent").empty(); //$(".xpagesContent").empty();
$(".xpagePublishSystemMap-wrap").find(".xpagesContent").val(""); $(".xpagePublishSystemMap-wrap").find(".xpagesContent").val("");
} }
}); });
} }
function getParamString(url,name) { function getParamString(url,name) {

View File

@ -13,131 +13,131 @@
* FONT-FACE * FONT-FACE
* ====================================================================================================================*/ * ====================================================================================================================*/
@font-face { @font-face {
font-family: 'flexslider-icon'; font-family: 'flexslider-icon';
src: url('fonts/flexslider-icon.eot'); src: url('fonts/flexslider-icon.eot');
src: url('fonts/flexslider-icon.eot?#iefix') format('embedded-opentype'), url('fonts/flexslider-icon.woff') format('woff'), url('fonts/flexslider-icon.ttf') format('truetype'), url('fonts/flexslider-icon.svg#flexslider-icon') format('svg'); src: url('fonts/flexslider-icon.eot?#iefix') format('embedded-opentype'), url('fonts/flexslider-icon.woff') format('woff'), url('fonts/flexslider-icon.ttf') format('truetype'), url('fonts/flexslider-icon.svg#flexslider-icon') format('svg');
font-weight: normal; font-weight: normal;
font-style: normal; font-style: normal;
} }
/* ==================================================================================================================== /* ====================================================================================================================
* RESETS * RESETS
* ====================================================================================================================*/ * ====================================================================================================================*/
.flex-container a:hover, .flex-container a:hover,
.flex-slider a:hover { .flex-slider a:hover {
outline: none; outline: none;
} }
.slides, .slides,
.slides > li, .slides > li,
.flex-control-nav, .flex-control-nav,
.flex-direction-nav { .flex-direction-nav {
margin: 0; margin: 0;
padding: 0; padding: 0;
list-style: none; list-style: none;
} }
.flex-pauseplay span { .flex-pauseplay span {
text-transform: capitalize; text-transform: capitalize;
} }
/* ==================================================================================================================== /* ====================================================================================================================
* BASE STYLES * BASE STYLES
* ====================================================================================================================*/ * ====================================================================================================================*/
.flexslider { .flexslider {
margin: 0; margin: 0;
padding: 0; padding: 0;
} }
.flexslider .slides > li { .flexslider .slides > li {
display: none; display: none;
-webkit-backface-visibility: hidden; -webkit-backface-visibility: hidden;
} }
.flexslider .slides img { .flexslider .slides img {
width: 100%; width: 100%;
display: block; display: block;
} }
.flexslider .slides:after { .flexslider .slides:after {
content: "\0020"; content: "\0020";
display: block; display: block;
clear: both; clear: both;
visibility: hidden; visibility: hidden;
line-height: 0; line-height: 0;
height: 0; height: 0;
} }
html[xmlns] .flexslider .slides { html[xmlns] .flexslider .slides {
display: block; display: block;
} }
* html .flexslider .slides { * html .flexslider .slides {
height: 1%; height: 1%;
} }
.no-js .flexslider .slides > li:first-child { .no-js .flexslider .slides > li:first-child {
display: block; display: block;
} }
/* ==================================================================================================================== /* ====================================================================================================================
* DEFAULT THEME * DEFAULT THEME
* ====================================================================================================================*/ * ====================================================================================================================*/
.flexslider { .flexslider {
/* margin: 0 0 60px; */ /* margin: 0 0 60px; */
margin: 0; margin: 0;
background: #fff; background: #fff;
border: 0px solid #fff; border: 0px solid #fff;
position: relative; position: relative;
zoom: 1; zoom: 1;
-webkit-border-radius: 4px; -webkit-border-radius: 4px;
-moz-border-radius: 4px; -moz-border-radius: 4px;
border-radius: 4px; border-radius: 4px;
-webkit-box-shadow: '' 0 1px 4px rgba(0, 0, 0, 0.2); -webkit-box-shadow: '' 0 1px 4px rgba(0, 0, 0, 0.2);
-moz-box-shadow: '' 0 1px 4px rgba(0, 0, 0, 0.2); -moz-box-shadow: '' 0 1px 4px rgba(0, 0, 0, 0.2);
-o-box-shadow: '' 0 1px 4px rgba(0, 0, 0, 0.2); -o-box-shadow: '' 0 1px 4px rgba(0, 0, 0, 0.2);
box-shadow: '' 0 1px 4px rgba(0, 0, 0, 0.2); box-shadow: '' 0 1px 4px rgba(0, 0, 0, 0.2);
} }
.flexslider .slides { .flexslider .slides {
zoom: 1; zoom: 1;
} }
.flexslider .slides img { .flexslider .slides img {
height:auto; height:auto;
-moz-user-select: none; -moz-user-select: none;
} }
.flex-viewport { .flex-viewport {
max-height: 2000px; max-height: 2000px;
-webkit-transition: all 1s ease; -webkit-transition: all 1s ease;
-moz-transition: all 1s ease; -moz-transition: all 1s ease;
-ms-transition: all 1s ease; -ms-transition: all 1s ease;
-o-transition: all 1s ease; -o-transition: all 1s ease;
transition: all 1s ease; transition: all 1s ease;
} }
.loading .flex-viewport { .loading .flex-viewport {
max-height: 300px; max-height: 300px;
} }
@-moz-document url-prefix() { @-moz-document url-prefix() {
.loading .flex-viewport { .loading .flex-viewport {
max-height: none; max-height: none;
} }
} }
.carousel li { .carousel li {
margin-right: 5px; margin-right: 5px;
} }
.flex-direction-nav { .flex-direction-nav {
*height: 0; *height: 0;
} }
.flex-direction-nav a { .flex-direction-nav a {
width: 32px; width: 32px;
height: 35px; height: 35px;
margin: -50px 0 0; margin: -50px 0 0;
display: block; display: block;
background: url('../images/ad_ctr1.png') no-repeat 0 0; background: url('../images/ad_ctr1.png') no-repeat 0 0;
position: absolute; position: absolute;
top: 50%; top: 50%;
z-index: 10; z-index: 10;
cursor: pointer; cursor: pointer;
text-indent: -9999px; text-indent: -9999px;
opacity: 0; opacity: 0;
filter: alpha(opacity=0); filter: alpha(opacity=0);
-webkit-transition: all .3s ease; -webkit-transition: all .3s ease;
} }
.flex-direction-nav .flex-next { .flex-direction-nav .flex-next {
background-position: -32px 0px; background-position: -32px 0px;
right: 0; right: 0;
} }
.flex-direction-nav .flex-prev { .flex-direction-nav .flex-prev {
background-position: 2px 0px; background-position: 2px 0px;
left: 0; left: 0;
} }
/* .flex-direction-nav a { /* .flex-direction-nav a {
text-decoration: none; text-decoration: none;
@ -178,128 +178,128 @@ html[xmlns] .flexslider .slides {
text-align: right; text-align: right;
} */ } */
.flexslider:hover .flex-direction-nav .flex-prev { .flexslider:hover .flex-direction-nav .flex-prev {
opacity: 0.7; opacity: 0.7;
left: 10px; left: 10px;
} }
.flexslider:hover .flex-direction-nav .flex-prev:hover { .flexslider:hover .flex-direction-nav .flex-prev:hover {
opacity: 1; opacity: 1;
} }
.flexslider:hover .flex-direction-nav .flex-next { .flexslider:hover .flex-direction-nav .flex-next {
opacity: 0.7; opacity: 0.7;
right: 10px; right: 10px;
} }
.flexslider:hover .flex-direction-nav .flex-next:hover { .flexslider:hover .flex-direction-nav .flex-next:hover {
opacity: 1; opacity: 1;
} }
.flex-direction-nav .flex-disabled { .flex-direction-nav .flex-disabled {
opacity: 0!important; opacity: 0!important;
filter: alpha(opacity=0); filter: alpha(opacity=0);
cursor: default; cursor: default;
z-index: -1; z-index: -1;
} }
.flex-pauseplay a { .flex-pauseplay a {
display: block; display: block;
width: 20px; width: 20px;
height: 20px; height: 20px;
position: absolute; position: absolute;
bottom: 5px; bottom: 5px;
left: 10px; left: 10px;
opacity: 0.8; opacity: 0.8;
z-index: 10; z-index: 10;
overflow: hidden; overflow: hidden;
cursor: pointer; cursor: pointer;
color: #000; color: #000;
} }
.flex-pauseplay a:before { .flex-pauseplay a:before {
font-family: "flexslider-icon"; font-family: "flexslider-icon";
font-size: 20px; font-size: 20px;
display: inline-block; display: inline-block;
content: '\f004'; content: '\f004';
} }
.flex-pauseplay a:hover { .flex-pauseplay a:hover {
opacity: 1; opacity: 1;
} }
.flex-pauseplay a.flex-play:before { .flex-pauseplay a.flex-play:before {
content: '\f003'; content: '\f003';
} }
.flex-control-nav { .flex-control-nav {
width: 100%; width: 100%;
position: absolute; position: absolute;
bottom: -40px; bottom: -40px;
text-align: center; text-align: center;
z-index: 999; z-index: 999;
} }
.flex-control-nav li { .flex-control-nav li {
margin: 0 6px; margin: 0 6px;
display: inline-block; display: inline-block;
zoom: 1; zoom: 1;
*display: inline; *display: inline;
} }
.flex-control-paging li a { .flex-control-paging li a {
width: 11px; width: 11px;
height: 11px; height: 11px;
display: block; display: block;
background: #666; background: #666;
background: rgba(0, 0, 0, 0.5); background: rgba(0, 0, 0, 0.5);
cursor: pointer; cursor: pointer;
text-indent: -9999px; text-indent: -9999px;
-webkit-box-shadow: inset 0 0 3px rgba(0, 0, 0, 0.3); -webkit-box-shadow: inset 0 0 3px rgba(0, 0, 0, 0.3);
-moz-box-shadow: inset 0 0 3px rgba(0, 0, 0, 0.3); -moz-box-shadow: inset 0 0 3px rgba(0, 0, 0, 0.3);
-o-box-shadow: inset 0 0 3px rgba(0, 0, 0, 0.3); -o-box-shadow: inset 0 0 3px rgba(0, 0, 0, 0.3);
box-shadow: inset 0 0 3px rgba(0, 0, 0, 0.3); box-shadow: inset 0 0 3px rgba(0, 0, 0, 0.3);
-webkit-border-radius: 20px; -webkit-border-radius: 20px;
-moz-border-radius: 20px; -moz-border-radius: 20px;
border-radius: 20px; border-radius: 20px;
} }
.flex-control-paging li a:hover { .flex-control-paging li a:hover {
background: #333; background: #333;
background: rgba(0, 0, 0, 0.7); background: rgba(0, 0, 0, 0.7);
} }
.flex-control-paging li a.flex-active { .flex-control-paging li a.flex-active {
background: #000; background: #000;
background: rgba(0, 0, 0, 0.9); background: rgba(0, 0, 0, 0.9);
cursor: default; cursor: default;
} }
.flex-control-thumbs { .flex-control-thumbs {
margin: 5px 0 0; margin: 5px 0 0;
position: static; position: static;
overflow: hidden; overflow: hidden;
} }
.flex-control-thumbs li { .flex-control-thumbs li {
width: 25%; width: 25%;
float: left; float: left;
margin: 0; margin: 0;
} }
.flex-control-thumbs img { .flex-control-thumbs img {
width: 100%; width: 100%;
height: auto; height: auto;
display: block; display: block;
opacity: .7; opacity: .7;
cursor: pointer; cursor: pointer;
-moz-user-select: none; -moz-user-select: none;
-webkit-transition: all 1s ease; -webkit-transition: all 1s ease;
-moz-transition: all 1s ease; -moz-transition: all 1s ease;
-ms-transition: all 1s ease; -ms-transition: all 1s ease;
-o-transition: all 1s ease; -o-transition: all 1s ease;
transition: all 1s ease; transition: all 1s ease;
} }
.flex-control-thumbs img:hover { .flex-control-thumbs img:hover {
opacity: 1; opacity: 1;
} }
.flex-control-thumbs .flex-active { .flex-control-thumbs .flex-active {
opacity: 1; opacity: 1;
cursor: default; cursor: default;
} }
/* ==================================================================================================================== /* ====================================================================================================================
* RESPONSIVE * RESPONSIVE
* ====================================================================================================================*/ * ====================================================================================================================*/
@media screen and (max-width: 860px) { @media screen and (max-width: 860px) {
.flex-direction-nav .flex-prev { .flex-direction-nav .flex-prev {
opacity: 1; opacity: 1;
left: 10px; left: 10px;
} }
.flex-direction-nav .flex-next { .flex-direction-nav .flex-next {
opacity: 1; opacity: 1;
right: 10px; right: 10px;
} }
} }

View File

@ -4,38 +4,38 @@
2013-9-30: Created. 2013-9-30: Created.
--> -->
<svg> <svg>
<metadata> <metadata>
Created by iconfont Created by iconfont
</metadata> </metadata>
<defs> <defs>
<font id="iconfont" horiz-adv-x="1024" > <font id="iconfont" horiz-adv-x="1024" >
<font-face <font-face
font-family="iconfont" font-family="iconfont"
font-weight="500" font-weight="500"
font-stretch="normal" font-stretch="normal"
units-per-em="1024" units-per-em="1024"
ascent="896" ascent="896"
descent="-128" descent="-128"
/> />
<missing-glyph /> <missing-glyph />
<glyph glyph-name="tongzhi" unicode="&#58925;" d="M856.798419 102.887554l-73.742515 129.741923L783.055904 494.156866c0 100.20112-75.31636 208.644971-185.111998 248.378927-5.348821 53.104475-40.835034 91.831498-87.334068 91.831498-46.434565 0-82.048691-38.728046-87.332021-91.831498-109.73424-39.733956-185.049576-148.176784-185.049576-248.378927l0-261.527388-77.329203-136.096654c-5.158487-8.997931-5.03262-20.008706 0.125867-28.944216 5.15951-8.933463 14.724353-14.346753 25.042349-14.346753l184.04162 0c13.528108-65.310472 71.353095-114.51308 140.501988-114.51308 69.213361 0 127.036301 49.202609 140.500964 114.51308l184.04162 0c0.505513 0 0.881067 0 1.322112 0 16.045441 0 29.007661 12.898775 29.007661 28.944216C865.482195 90.302935 862.209662 97.664599 856.798419 102.887554M510.609839 776.291594c10.444886 0 18.875906-7.927553 24.287149-19.756973-8.05342 0.818645-15.85613 2.705622-24.287149 2.705622s-16.232706-1.886977-24.287149-2.705622C491.734956 768.365064 500.165975 776.291594 510.609839 776.291594M510.609839-3.258974c-36.808324 0-67.576071 23.657816-79.532381 56.500828l159.062715 0C578.186933 20.399865 547.482631-3.258974 510.609839-3.258974M235.90022 111.192707l56.502875 99.476619c2.515287 4.28049 3.89982 9.314133 3.89982 14.34573L296.302915 494.156866c0 97.747231 91.611487 207.070102 214.306924 207.070102 122.694413 0 214.431767-109.322871 214.431767-207.070102L725.041606 225.015056c0-5.031597 1.322112-10.06524 3.774977-14.34573l56.565297-99.476619L235.90022 111.192707z" horiz-adv-x="1024" />
<glyph glyph-name="tongzhi" unicode="&#58925;" d="M856.798419 102.887554l-73.742515 129.741923L783.055904 494.156866c0 100.20112-75.31636 208.644971-185.111998 248.378927-5.348821 53.104475-40.835034 91.831498-87.334068 91.831498-46.434565 0-82.048691-38.728046-87.332021-91.831498-109.73424-39.733956-185.049576-148.176784-185.049576-248.378927l0-261.527388-77.329203-136.096654c-5.158487-8.997931-5.03262-20.008706 0.125867-28.944216 5.15951-8.933463 14.724353-14.346753 25.042349-14.346753l184.04162 0c13.528108-65.310472 71.353095-114.51308 140.501988-114.51308 69.213361 0 127.036301 49.202609 140.500964 114.51308l184.04162 0c0.505513 0 0.881067 0 1.322112 0 16.045441 0 29.007661 12.898775 29.007661 28.944216C865.482195 90.302935 862.209662 97.664599 856.798419 102.887554M510.609839 776.291594c10.444886 0 18.875906-7.927553 24.287149-19.756973-8.05342 0.818645-15.85613 2.705622-24.287149 2.705622s-16.232706-1.886977-24.287149-2.705622C491.734956 768.365064 500.165975 776.291594 510.609839 776.291594M510.609839-3.258974c-36.808324 0-67.576071 23.657816-79.532381 56.500828l159.062715 0C578.186933 20.399865 547.482631-3.258974 510.609839-3.258974M235.90022 111.192707l56.502875 99.476619c2.515287 4.28049 3.89982 9.314133 3.89982 14.34573L296.302915 494.156866c0 97.747231 91.611487 207.070102 214.306924 207.070102 122.694413 0 214.431767-109.322871 214.431767-207.070102L725.041606 225.015056c0-5.031597 1.322112-10.06524 3.774977-14.34573l56.565297-99.476619L235.90022 111.192707z" horiz-adv-x="1024" />
<glyph glyph-name="wancheng" unicode="&#58916;" d="M486.4 265.6c-19.2-19.2-48-19.2-67.2-3.2l-137.6 131.2-32-35.2 137.6-131.2c38.4-35.2 96-35.2 134.4 3.2l281.6 297.6-35.2 32L486.4 265.6zM512 844.8c-252.8 0-460.8-204.8-460.8-460.8s204.8-460.8 460.8-460.8 460.8 204.8 460.8 460.8S764.8 844.8 512 844.8zM512-28.8c-227.2 0-412.8 185.6-412.8 412.8s185.6 412.8 412.8 412.8 412.8-185.6 412.8-412.8S739.2-28.8 512-28.8z" horiz-adv-x="1024" />
<glyph glyph-name="yiban" unicode="&#58955;" d="M374.720915 276.112828 210.629673 276.112828l0-55.112202 158.683069 0C370.012683 239.772154 371.848495 258.164037 374.720915 276.112828L374.720915 276.112828zM210.629673 490.089224l353.807095 0c29.618575 13.797237 61.45363 22.044062 94.675266 23.715121l0 31.399127L210.629673 545.203472 210.629673 490.089224 210.629673 490.089224zM160.554184 124.462942c-20.847817 0-29.540803 8.698103-29.540803 29.526477l0 593.077573c0 20.828374 8.694009 29.52443 29.540803 29.52443l548.628222 0c20.826328 0 29.54592-8.696056 29.54592-29.52443L738.728326 509.842103c23.485901-4.300956 33.708729-11.326976 54.92596-20.72502L793.654286 786.737504c0 24.76708-20.083407 44.847417-44.847417 44.847417L120.934838 831.584921c-24.769127 0-44.852534-20.081361-44.852534-44.847417l0-672.728658c0-24.758893 20.083407-44.847417 44.852534-44.847417l283.845697 0c-11.346419 21.156856-20.263509 31.520901-26.356274 55.301514L181.020308 124.462942 160.554184 124.462942zM210.629673 679.748794l448.481338 0 0-55.113225-448.481338 0 0 55.113225ZM681.446715 473.719394c-148.146085 0-268.25358-120.090099-268.25358-268.257673 0-148.145062 120.112612-268.257673 268.25358-268.257673 148.164504 0 268.25665 120.113635 268.25665 268.257673C949.703365 353.628272 829.61122 473.719394 681.446715 473.719394zM681.925622-11.299091C562.932508-11.299091 466.477712 85.151611 466.477712 204.143703c0 118.998231 96.455819 215.45712 215.44791 215.45712 119.001301 0 215.452004-96.458889 215.452004-215.45712C897.376603 85.151611 800.921807-11.299091 681.925622-11.299091zM210.629673 410.660196l0-55.113225 197.292412 0c8.973372 19.527752 19.332301 37.97387 30.9325 55.113225L210.629673 410.660196zM824.259328 309.639408 639.752104 125.132184 545.963021 218.655208 506.232135 178.815851 639.752104 45.670411 863.990215 269.908522 824.259328 309.639408Z" horiz-adv-x="1024" />
<glyph glyph-name="daiban" unicode="&#59397;" d="M120.759083 3.4679V768.352217c0 4.252196 3.447422 7.713952 7.699618 7.713952h643.527285c4.252196 0 7.713952-3.461756 7.713952-7.713952V459.760347h55.82018V768.352217c0 35.024045-28.495752 63.534132-63.534132 63.534132H128.458701c-35.024045 0-63.519798-28.510087-63.519798-63.534132v-764.884317c0-35.024045 28.495752-63.534132 63.519798-63.534133h360.269409v55.820181H128.458701c-4.252196 0-7.699618 3.461756-7.699618 7.713952zM287.660582 343.213528c-15.41357 0-27.91009-12.48321-27.91009-27.91009s12.49652-27.91009 27.91009-27.91009h111.449918c15.41357 0 27.91009 12.48321 27.91009 27.91009s-12.49652 27.91009-27.91009 27.91009h-111.449918zM636.53722 466.300926c0 15.42688-12.49652 27.91009-27.91009 27.91009H287.660582c-15.41357 0-27.91009-12.48321-27.91009-27.91009s12.49652-27.91009 27.91009-27.91009h320.966548c15.41357 0 27.91009 12.48321 27.91009 27.91009zM608.62713 639.704097H287.660582c-15.41357 0-27.91009-12.48321-27.91009-27.91009s12.49652-27.91009 27.91009-27.91009h320.966548c15.41357 0 27.91009 12.48321 27.91009 27.91009s-12.49652 27.91009-27.91009 27.91009zM820.392212 177.251956h-55.643048v90.271873c0 15.42688-12.49652 27.91009-27.91009 27.91009s-27.91009-12.48321-27.91009-27.91009v-118.181963c0-15.42688 12.49652-27.91009 27.91009-27.91009H820.393236c15.41357 0 27.91009 12.48321 27.91009 27.91009-0.001024 15.42688-12.497544 27.91009-27.911114 27.91009zM738.670805 380.874078c-121.258739 0-219.559921-98.300158-219.559921-219.559921 0-121.259763 98.300158-219.560945 219.559921-219.560945 121.259763 0 219.560945 98.300158 219.560945 219.560945 0 121.259763-98.301182 219.559921-219.560945 219.559921z m0-383.299662c-90.286208 0-163.739741 73.453533-163.739741 163.740765 0 90.286208 73.453533 163.739741 163.739741 163.739741 90.286208 0 163.739741-73.453533 163.739741-163.739741 0.001024-90.287232-73.452509-163.740765-163.739741-163.740765z" horiz-adv-x="1024" />
<glyph glyph-name="shijian" unicode="&#58935;" d="M512-128C230.4-128 0 102.39999999999998 0 384S230.4 896 512 896s512-230.4 512-512-230.4-512-512-512z m0 960C262.4 832 64 633.6 64 384s198.4-448 448-448 448 198.4 448 448S761.6 832 512 832zM729.6 352H512c-19.2 0-32 19.2-32 32V716.8c0 19.2 12.8 32 32 32s32-12.8 32-32v-294.4h185.6c19.2 0 32-12.8 32-32s-12.8-38.4-32-38.4z" horiz-adv-x="1024" />
<glyph glyph-name="wancheng" unicode="&#58916;" d="M486.4 265.6c-19.2-19.2-48-19.2-67.2-3.2l-137.6 131.2-32-35.2 137.6-131.2c38.4-35.2 96-35.2 134.4 3.2l281.6 297.6-35.2 32L486.4 265.6zM512 844.8c-252.8 0-460.8-204.8-460.8-460.8s204.8-460.8 460.8-460.8 460.8 204.8 460.8 460.8S764.8 844.8 512 844.8zM512-28.8c-227.2 0-412.8 185.6-412.8 412.8s185.6 412.8 412.8 412.8 412.8-185.6 412.8-412.8S739.2-28.8 512-28.8z" horiz-adv-x="1024" /> </font>
</defs></svg>
<glyph glyph-name="yiban" unicode="&#58955;" d="M374.720915 276.112828 210.629673 276.112828l0-55.112202 158.683069 0C370.012683 239.772154 371.848495 258.164037 374.720915 276.112828L374.720915 276.112828zM210.629673 490.089224l353.807095 0c29.618575 13.797237 61.45363 22.044062 94.675266 23.715121l0 31.399127L210.629673 545.203472 210.629673 490.089224 210.629673 490.089224zM160.554184 124.462942c-20.847817 0-29.540803 8.698103-29.540803 29.526477l0 593.077573c0 20.828374 8.694009 29.52443 29.540803 29.52443l548.628222 0c20.826328 0 29.54592-8.696056 29.54592-29.52443L738.728326 509.842103c23.485901-4.300956 33.708729-11.326976 54.92596-20.72502L793.654286 786.737504c0 24.76708-20.083407 44.847417-44.847417 44.847417L120.934838 831.584921c-24.769127 0-44.852534-20.081361-44.852534-44.847417l0-672.728658c0-24.758893 20.083407-44.847417 44.852534-44.847417l283.845697 0c-11.346419 21.156856-20.263509 31.520901-26.356274 55.301514L181.020308 124.462942 160.554184 124.462942zM210.629673 679.748794l448.481338 0 0-55.113225-448.481338 0 0 55.113225ZM681.446715 473.719394c-148.146085 0-268.25358-120.090099-268.25358-268.257673 0-148.145062 120.112612-268.257673 268.25358-268.257673 148.164504 0 268.25665 120.113635 268.25665 268.257673C949.703365 353.628272 829.61122 473.719394 681.446715 473.719394zM681.925622-11.299091C562.932508-11.299091 466.477712 85.151611 466.477712 204.143703c0 118.998231 96.455819 215.45712 215.44791 215.45712 119.001301 0 215.452004-96.458889 215.452004-215.45712C897.376603 85.151611 800.921807-11.299091 681.925622-11.299091zM210.629673 410.660196l0-55.113225 197.292412 0c8.973372 19.527752 19.332301 37.97387 30.9325 55.113225L210.629673 410.660196zM824.259328 309.639408 639.752104 125.132184 545.963021 218.655208 506.232135 178.815851 639.752104 45.670411 863.990215 269.908522 824.259328 309.639408Z" horiz-adv-x="1024" />
<glyph glyph-name="daiban" unicode="&#59397;" d="M120.759083 3.4679V768.352217c0 4.252196 3.447422 7.713952 7.699618 7.713952h643.527285c4.252196 0 7.713952-3.461756 7.713952-7.713952V459.760347h55.82018V768.352217c0 35.024045-28.495752 63.534132-63.534132 63.534132H128.458701c-35.024045 0-63.519798-28.510087-63.519798-63.534132v-764.884317c0-35.024045 28.495752-63.534132 63.519798-63.534133h360.269409v55.820181H128.458701c-4.252196 0-7.699618 3.461756-7.699618 7.713952zM287.660582 343.213528c-15.41357 0-27.91009-12.48321-27.91009-27.91009s12.49652-27.91009 27.91009-27.91009h111.449918c15.41357 0 27.91009 12.48321 27.91009 27.91009s-12.49652 27.91009-27.91009 27.91009h-111.449918zM636.53722 466.300926c0 15.42688-12.49652 27.91009-27.91009 27.91009H287.660582c-15.41357 0-27.91009-12.48321-27.91009-27.91009s12.49652-27.91009 27.91009-27.91009h320.966548c15.41357 0 27.91009 12.48321 27.91009 27.91009zM608.62713 639.704097H287.660582c-15.41357 0-27.91009-12.48321-27.91009-27.91009s12.49652-27.91009 27.91009-27.91009h320.966548c15.41357 0 27.91009 12.48321 27.91009 27.91009s-12.49652 27.91009-27.91009 27.91009zM820.392212 177.251956h-55.643048v90.271873c0 15.42688-12.49652 27.91009-27.91009 27.91009s-27.91009-12.48321-27.91009-27.91009v-118.181963c0-15.42688 12.49652-27.91009 27.91009-27.91009H820.393236c15.41357 0 27.91009 12.48321 27.91009 27.91009-0.001024 15.42688-12.497544 27.91009-27.911114 27.91009zM738.670805 380.874078c-121.258739 0-219.559921-98.300158-219.559921-219.559921 0-121.259763 98.300158-219.560945 219.559921-219.560945 121.259763 0 219.560945 98.300158 219.560945 219.560945 0 121.259763-98.301182 219.559921-219.560945 219.559921z m0-383.299662c-90.286208 0-163.739741 73.453533-163.739741 163.740765 0 90.286208 73.453533 163.739741 163.739741 163.739741 90.286208 0 163.739741-73.453533 163.739741-163.739741 0.001024-90.287232-73.452509-163.740765-163.739741-163.740765z" horiz-adv-x="1024" />
<glyph glyph-name="shijian" unicode="&#58935;" d="M512-128C230.4-128 0 102.39999999999998 0 384S230.4 896 512 896s512-230.4 512-512-230.4-512-512-512z m0 960C262.4 832 64 633.6 64 384s198.4-448 448-448 448 198.4 448 448S761.6 832 512 832zM729.6 352H512c-19.2 0-32 19.2-32 32V716.8c0 19.2 12.8 32 32 32s32-12.8 32-32v-294.4h185.6c19.2 0 32-12.8 32-32s-12.8-38.4-32-38.4z" horiz-adv-x="1024" />
</font>
</defs></svg>

Before

Width:  |  Height:  |  Size: 6.7 KiB

After

Width:  |  Height:  |  Size: 6.5 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 1.2 MiB

After

Width:  |  Height:  |  Size: 1.2 MiB