manage-system.html 37 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777
  1. {template 'common/header'}
  2. {if !in_array($do, array('install_success', 'module_detail')) && $module_support_name == 'welcome_support'}
  3. <ul class="we7-page-tab">
  4. <li {if $do == 'installed'}class="active"{/if}><a href="{php echo url('module/manage-system/installed', array('support' => $module_support_name))}">已安装应用 </a></li>
  5. {if permission_check_account_user('see_module_manage_system_except_installed')}
  6. <li {if $do == 'recycle' && $_GPC['type'] == MODULE_RECYCLE_INSTALL_DISABLED}class="active"{/if}>
  7. <a href="{php echo url('module/manage-system/recycle', array('support' => $module_support_name, 'type' => MODULE_RECYCLE_INSTALL_DISABLED))}">
  8. 已停用应用
  9. </a>
  10. </li>
  11. <li {if $do == 'not_installed'}class="active"{/if}>
  12. <a href="{php echo url('module/manage-system/not_installed', array('support' => $module_support_name))}">
  13. 未安装应用<span class="color-red"> ({$module_uninstall_total}) </span>
  14. </a>
  15. </li>
  16. <li {if $do == 'recycle' && $_GPC['type'] == MODULE_RECYCLE_UNINSTALL_IGNORE}class="active"{/if}>
  17. <a href="{php echo url('module/manage-system/recycle', array('support' => $module_support_name, 'type' => MODULE_RECYCLE_UNINSTALL_IGNORE))}">
  18. 回收站
  19. </a>
  20. </li>
  21. {if $module_support_name == MODULE_SUPPORT_ACCOUNT_NAME}
  22. <li {if $do == 'subscribe'}class="active"{/if}><a href="{php echo url('module/manage-system/subscribe', array('support' => $module_support_name))}">订阅管理</a></li>
  23. {/if}
  24. {/if}
  25. </ul>
  26. {/if}
  27. {if $do == 'installed'}
  28. <div id="js-system-module" ng-controller="installedCtrl" ng-cloak>
  29. <div class="search-box clearfix we7-margin-bottom ">
  30. <select name="" class="select-letter we7-margin-right" ng-init="letter = '全部'" ng-model="letter" ng-change="searchLetter(letter)">
  31. <option value="{{item == '按字母筛选(全部)' ? '全部' : item}}" ng-repeat="item in letters">{{item}}</option>
  32. </select>
  33. <select name="" id="" class="we7-margin-right">
  34. <option data-url="{php echo filter_url('support:all');}" {if $_GPC['support'] == ''} selected {/if}>按应用类型筛选</option>
  35. {loop $account_all_type_sign $type_sign}
  36. {php $account_name = ''}
  37. {loop $account_all_type $account_type}
  38. {if $type_sign == $account_type['type_sign']}
  39. {php $account_name = $account_type['title']}
  40. {/if}
  41. {/loop}
  42. <option data-url="{php echo filter_url('support:' . $type_sign . '_support');}" {if $_GPC['support'] == $type_sign. '_support'} selected {/if}>{$account_name}</option>
  43. {/loop}
  44. </select>
  45. <div class="search-form">
  46. <div class="input-group">
  47. <input class="form-control" name="title" ng-model="search.moduleName" ng-keyup="searchModuleName($event)" type="text" placeholder="名称" >
  48. <span class="input-group-btn"><button ng-click="searchModuleName()" class="btn btn-default" id="search"><i class="fa fa-search"></i></button></span>
  49. </div>
  50. </div>
  51. {if permission_check_account_user('see_module_manage_system_ugrade')}
  52. <div class="we7-form" ng-show="checkUpgradeSuccess">
  53. <input type="checkbox" name="" ng-click="filter()" ng-model="search.newBranch" id="filter-1" value="1">
  54. <label class="checkbox-inline" for="filter-1">
  55. 新分支
  56. </label>
  57. <span class="we7-margin-right"></span>
  58. <input type="checkbox" name="" ng-click="filter()" ng-model="search.newVersion" id="filter-2" value="1">
  59. <label class="checkbox-inline" for="filter-2">
  60. 新版本
  61. </label>
  62. </div>
  63. {/if}
  64. </div>
  65. <form action="" method="get">
  66. <table class="table we7-table table-hover vertical-middle table-manage">
  67. <col width="140px" />
  68. <col width="250px"/>
  69. {if permission_check_account_user('see_module_manage_system_welcome_support') && $_GPC['support'] == 'welcome_support'}<col width="100px">{/if}
  70. <col width="500px" />
  71. <tr>
  72. <th class="text-left bg-light-gray">
  73. 应用名/版本 <a href="javascript:;" class="color-default we7-margin-left-sm"></a>
  74. </th>
  75. <th></th>
  76. {if permission_check_account_user('see_module_manage_system_welcome_support') && $_GPC['support'] == 'welcome_support'}<th>启用</th>{/if}
  77. <th class="text-left bg-light-gray">支持</th>
  78. <th class="text-left bg-light-gray">来源</th>
  79. <th class="text-right bg-light-gray">操作</th>
  80. </tr>
  81. <tr ng-repeat="module in moduleList">
  82. <td class="text-left module-img table-action-td">
  83. <img ng-click="initModuleLogo()" ng-if="module.main_module == '' && module.logo" ng-src="{{ module.logo }}" class="img-responsive module-img icon"/>
  84. <img ng-click="initModuleLogo()" ng-show="module.main_module == '' && !module.logo" src="./resource/images/init_module_logo.png" class="img-responsive module-img icon"/>
  85. <div class="img" ng-if="module.main_module != ''">
  86. <img alt="子应用icon" class="plugin-img" ng-src="{{ module.logo }}"/>
  87. <img ng-click="initModuleLogo()" alt="子应用icon" class="plugin-img" src="./resource/images/init_module_logo.png" ng-if="!module.logo" />
  88. <img alt="主应用icon" class="module-img" ng-src="{{ module.main_module_logo }}"/>
  89. <img ng-click="initModuleLogo()" alt="主应用icon" class="module-img" src="./resource/images/init_module_logo.png" ng-if="!module.main_module_logo"/>
  90. </div>
  91. </td>
  92. <td class="text-left">
  93. <p>{{ module.title }}</p>
  94. {if permission_check_account_user('see_module_manage_system_newversion')}
  95. <span>版本:{{ module.version }} </span><span class="color-red" ng-if="module.new_version && isFounder == 1">发现新版本</span>
  96. {/if}
  97. </td>
  98. {if permission_check_account_user('see_module_manage_system_welcome_support') && $_GPC['support'] == 'welcome_support'}
  99. <td><div class="switch" ng-class="{'switchOn' : welcome_module == module.name}" ng-click="change_welcome_module(module.name)"></div></td>
  100. {/if}
  101. <td class="text-left">
  102. {{ module.support_name }}
  103. </td>
  104. <td class="text-left" ng-switch="module.from">
  105. <span ng-switch-when="cloud">商城</span>
  106. <span ng-switch-when="local">本地</span>
  107. </td>
  108. <td class="vertical-middle {if $_GPC['support'] != 'welcome_support'} table-manage-td {/if}">
  109. <div class="link-group">
  110. {if permission_check_account_user('see_module_manage_system_ugrade')}
  111. <a ng-href="{{ './index.php?c=module&a=manage-system&do=upgrade&module_name='+module.name}}" class="color-red del" ng-if="module.new_version && module.from == 'local'">升级</a>
  112. <a href="{php echo url('module/manage-system/module_detail')}&name={{ module.name }}&show=upgrade" class="color-red del" ng-if="module.new_branch">新分支</a>
  113. <a href="{php echo url('module/manage-system/module_detail')}&name={{ module.name }}&show=upgrade" class="color-red del" ng-if="module.new_version">升级</a>
  114. {/if}
  115. {if $module_support_name != 'all' && !empty($module_support_name)}
  116. <a href="{php echo url('module/manage-system/module_detail')}&name={{ module.name }}&support={$module_support_name}&type={ACCOUNT_TYPE_OFFCIAL_NORMAL}" ng-if="isFounder == 1">管理设置</a>
  117. {else}
  118. <a href="{php echo url('module/manage-system/module_detail')}&name={{ module.name }}&support={{ module.support }}&type={ACCOUNT_TYPE_OFFCIAL_NORMAL}" ng-if="isFounder == 1">管理设置</a>
  119. {/if}
  120. {if permission_check_account_user('see_module_manage_system_stop') && $_GPC['support'] == 'welcome_support'}
  121. <a href="{php echo url('module/manage-system/recycle_post')}&module_name={{ module.name }}&support={$module_support_name}" onclick="return confirm('确认停用模块?')">停用</a>
  122. <a href="{php echo url('home/welcome/ext', array('system_welcome' => 1))}&m={{ module.name }}" ng-if="isFounder == 1">管理</a>
  123. {/if}
  124. </div>
  125. {if $_GPC['support'] != 'welcome_support'}
  126. <div class="manage-option text-right">
  127. <a href="{php echo url('module/manage-system/module_detail')}&name={{ module.name }}&support={$module_support_name}&type={ACCOUNT_TYPE_OFFCIAL_NORMAL}" ng-if="isFounder == 1">基本信息</a>
  128. <a href="{php echo url('module/manage-system/module_detail')}&name={{ module.name }}&support={$module_support_name}&type={ACCOUNT_TYPE_OFFCIAL_NORMAL}&show=group" ng-if="isFounder == 1">应用权限组</a>
  129. {if $module_support_name == MODULE_SUPPORT_ACCOUNT_NAME}
  130. <a href="{php echo url('module/manage-system/module_detail')}&name={{ module.name }}&support={$module_support_name}&type={ACCOUNT_TYPE_OFFCIAL_NORMAL}&show=subscribe" ng-if="isFounder == 1 && module.subscribes.length">订阅消息</a>
  131. {/if}
  132. {if permission_check_account_user('see_module_manage_system_stop')}
  133. {if $module_support_name != 'all' && !empty($module_support_name)}
  134. <a href="{php echo url('module/manage-system/recycle_post')}&module_name={{ module.name }}&support={$module_support_name}" onclick="return confirm('确认停用模块?')">停用</a>
  135. {else}
  136. <a href="{php echo url('module/manage-system/recycle_post')}&module_name={{ module.name }}&support={{ module.support }}" onclick="return confirm('确认停用模块?')">停用</a>
  137. {/if}
  138. {/if}
  139. </div>
  140. {/if}
  141. </td>
  142. </tr>
  143. <tr ng-if="moduleList | we7IsEmpty">
  144. <td colspan="100">
  145. <div class="we7-empty-block">暂无</div>
  146. </td>
  147. </tr>
  148. </table>
  149. <div class="select-all" ng-hide="search.moduleName || (search.letter && search.letter != '全部') || search.newVersion || search.newBranch">
  150. <div class="we7-form text-right js-pager">
  151. {$pager}
  152. </div>
  153. </div>
  154. </form>
  155. </div>
  156. <script>
  157. angular.module('moduleApp').value('config', {
  158. 'isFounder' : '{if $_W['isfounder']}1{else}2{/if}',
  159. 'moduleList': {php echo json_encode($module_list)},
  160. 'editModuleUrl': "{php echo url('module/manage-system/get_module_info')}",
  161. 'saveModuleUrl' : "{php echo url('module/manage-system/save_module_info')}",
  162. 'checkUpgradeUrl' : "{php echo url('module/manage-system/check_upgrade')}",
  163. 'getUpgradeInfoUrl' : "{php echo url('module/manage-system/get_upgrade_info')}",
  164. 'filterUrl' : "{php echo url('module/manage-system/filter')}",
  165. 'welcome_module' : '{$_W['setting']['site_welcome_module']}',
  166. 'set_site_welcome_url' : "{php echo url('module/manage-system/set_site_welcome_module')}",
  167. 'initModuleLogoUrl' : "{php echo url('module/manage-system/init_modules_logo')}"
  168. });
  169. angular.bootstrap($('#js-system-module'), ['moduleApp']);
  170. require(['fileUploader']);
  171. </script>
  172. {elseif $do == 'not_installed' || $do == 'recycle'}
  173. <div id="js-system-module-not_installed" ng-controller="notInstalledCtrl" ng-cloak>
  174. <div class="search-box clearfix we7-margin-bottom">
  175. <select name="" class="select-letter we7-margin-right" ng-init="letter = '{php echo $_GPC['letter']?$_GPC['letter']:'全部'}'" ng-model="letter" ng-change="searchLetter(letter)">
  176. <option value="{{item == '按字母筛选(全部)' ? '全部' : item}}" ng-repeat="item in letters">{{item}}</option>
  177. </select>
  178. <form action="" method="get" class="search-form">
  179. <input type="hidden" name="c" value="module">
  180. <input type="hidden" name="a" value="manage-system">
  181. <input type="hidden" name="do" value="{$do}">
  182. <input type="hidden" name="type" value="{$type}">
  183. <input type="hidden" name="support" value="{$module_support_name}">
  184. <input type="hidden" name="letter" value="{$letter}">
  185. <div class="input-group ">
  186. <input class="form-control" name="title" value="{$title}" type="text" placeholder="名称" >
  187. <span class="input-group-btn"><button id="search" class="btn btn-default"><i class="fa fa-search"></i></button></span>
  188. </div>
  189. </form>
  190. </div>
  191. <div class="clearfix"> </div>
  192. <table class="table we7-table table-hover vertical-middle table-manage">
  193. <col width="90px">
  194. <col width="250px">
  195. <col>
  196. <col with="80px">
  197. <tr>
  198. <th class="text-left">应用名称</th>
  199. <th></th>
  200. <th >支持</th>
  201. <th class="text-right">操作</th>
  202. </tr>
  203. <tr ng-repeat="module in module_list">
  204. <td class="text-left module-img">
  205. <img ng-src="{{ module.logo }}" alt="" class="module-img ">
  206. </td>
  207. <td class="text-left">
  208. <p>{{ module.title }}</p>
  209. <span>版本:{{ module.version }} </span>
  210. </td>
  211. {if $do == 'not_installed'}
  212. <td class="text-left">
  213. <p ng-repeat="item in module | moduleInfo" ng-bind="item.name"></p>
  214. </td>
  215. {else}
  216. <td class="text-left">
  217. <p>{{ module.support_name }}</p>
  218. </td>
  219. {/if}
  220. <td class="" ng-if="permission_check.see_module_manage_system_install">
  221. <!-- recycle start -->
  222. <div ng-if="do == 'recycle'" class="link-group">
  223. {if permission_check_account_user('see_module_manage_system_stop')}
  224. {if $_GPC['support'] != 'all' && !empty($_GPC['support'])}
  225. <a href="{php echo url('module/manage-system/recycle_post', array('support' => $module_support_name))}&module_name={{ module.name }}" class="">恢复</a>
  226. {else}
  227. <a href="{php echo url('module/manage-system/recycle_post')}&module_name={{ module.name }}&support={{ module.support }}" class="">恢复</a>
  228. {/if}
  229. {/if}
  230. {if $type == MODULE_RECYCLE_INSTALL_DISABLED}
  231. {if $module_support_name == 'all' || empty($module_support_name)}
  232. <a href="javascript:void(0);" class="" ng-click="uninstallModule('{php echo url("module/manage-system/uninstall")}', module.name, module.support)">卸载</a>
  233. {else}
  234. <a href="javascript:void(0);" class="" ng-click="uninstallModule('{php echo url("module/manage-system/uninstall", array("support" => $module_support_name))}', module.name, '{$module_support_name}')">卸载</a>
  235. {/if}
  236. {else}
  237. <a ng-if="module.cloud_id > 0 && permission_check.see_module_manage_system_shopinfo" ng-href="{{ 'https://bbs.5g-yun.com/module-' + module.cloud_id + '.html' }}" target="_blank" >查看商城详情</a>
  238. {/if}
  239. </div>
  240. <!-- recycle end -->
  241. <!-- not_installed start -->
  242. <div class="link-group" ng-if="do == 'not_installed'">
  243. <!-- 安装 start-->
  244. <a href="javascript:;" multiple="true" we7-modal-type title="'选中安装应用类型'" type-list="module.supportArray" ng-if="module.supportArray.length > 1" on-confirm="modalConfirm(type, module, 'install')">{if $_GPC['status'] == 'recycle'}启用{else}安装{/if}</a>
  245. <a href="javascript:;" ng-if="module.supportArray.length == 1" ng-click="modalConfirm(module.supportArray, module, 'install')">{if $_GPC['status'] == 'recycle'}启用{else}安装{/if}</a>
  246. <!-- 安装 end-->
  247. <!-- 删除 -->
  248. <a href="javascript:;" we7-modal-type multiple="true" type-list="module.supportArray" ng-if="module.supportArray.length > 1" on-confirm="modalConfirm(type, module, 'delete')">删除</a>
  249. <a href="javascript:;" ng-if="module.supportArray.length == 1" ng-click="modalConfirm(module.supportArray, module, 'delete')">删除</a>
  250. <!--删除end-->
  251. <a ng-if="module.cloud_id > 0 && permission_check.see_module_manage_system_shopinfo" ng-href="{{ 'https://bbs.5g-yun.com/module-' + module.cloud_id + '.html' }}" target="_blank" >查看商城详情</a>
  252. <!-- 安装 end-->
  253. </div>
  254. <!-- not_installed end -->
  255. </td>
  256. </tr>
  257. <tr ng-if="module_list | we7IsEmpty">
  258. <td colspan="100">
  259. <div class="we7-empty-block">暂无</div>
  260. </td>
  261. </tr>
  262. </table>
  263. </form>
  264. <div class="js-pager text-right">
  265. {$pager}
  266. </div>
  267. </div>
  268. <script>
  269. angular.module('moduleApp').value('config', {
  270. 'module_list' : {php echo json_encode($modulelist)},
  271. 'support': {php echo json_encode($_GPC['support'])},
  272. 'module_support_types' : {php echo json_encode($module_support_types)},
  273. 'permission_check' : {php echo json_encode($permission_check)},
  274. 'do' : "{php echo $do}",
  275. 'support' : "{php echo $_GPC['support']}",
  276. 'install_url' : "{php echo url('module/manage-system/install')}",
  277. 'delete_url' : "{php echo url('module/manage-system/recycle_post')}",
  278. });
  279. angular.bootstrap($('#js-system-module-not_installed'), ['moduleApp']);
  280. </script>
  281. {elseif $do == 'module_detail'}
  282. <div class="js-system-module-detail" ng-controller="detailCtrl" ng-cloak>
  283. <ol class="breadcrumb we7-breadcrumb">
  284. <a href="{php echo url('module/manage-system/installed')}"><i class="wi wi-back-circle"></i> </a>
  285. <li>
  286. <a href="{php echo url('module/manage-system/installed')}">应用列表</a>
  287. </li>
  288. <li>
  289. 应用管理
  290. </li>
  291. </ol>
  292. <div class="user-head-info ">
  293. <div class="img " ng-if="moduleinfo.main_module != ''">
  294. <img alt="子应用icon" class="plugin-img" ng-src="{{ moduleinfo.logo }}"/>
  295. <img alt="主应用icon" class="module-img" ng-src="{{ moduleinfo.main_module_logo }}"/>
  296. </div>
  297. <img ng-src="{{ moduleinfo.logo }}" class="user-avatar img-rounded pull-left" ng-if="moduleinfo.main_module == ''">
  298. <div class="info">
  299. <h3 class="title">{{ moduleinfo.title }}</h3>
  300. <i class="wi wi-wx-apply" ng-if="moduleinfo.{MODULE_SUPPORT_ACCOUNT_NAME} == 2"></i>
  301. <i class="wi wi-wxapp-apply" ng-if="moduleinfo.wxapp_support == 2 && moduleinfo.{MODULE_SUPPORT_ACCOUNT_NAME} != 2"></i>
  302. </div>
  303. {if permission_check_account_user('see_module_manage_system_shopinfo')}
  304. <a ng-if="isFounder == 1 && moduleinfo.cloud_mid != ''" ng-href="{{ 'https://bbs.5g-yun.com/module-' + moduleinfo.cloud_mid + '.html' }}" target="_blank" class="btn btn-primary ">查看商城详情</a>
  305. {/if}
  306. </div>
  307. <div class="btn-group we7-btn-group we7-margin-bottom">
  308. <a href="javascript:;" ng-click="changeShow('base')" class="btn " ng-class="{'active' : show == 'base' || show == ''}">基本信息</a>
  309. <a href="javascript:;" ng-click="changeShow('plugin')" class="btn " ng-class="{'active' : show == 'plugin'}" ng-show="moduleinfo.main_module == '' && moduleinfo.plugin_list != undefined && moduleinfo.plugin_list != ''">模块子应用</a>
  310. <a href="javascript:;" ng-click="changeShow('group')" class="btn " ng-class="{'active' : show == 'group'}">应用权限组</a>
  311. {if !empty($module_info['subscribes'])}
  312. <a href="javascript:;" ng-click="changeShow('subscribe')" class="btn " ng-class="{'active' : show == 'subscribe'}">订阅消息</a>
  313. {/if}
  314. {if permission_check_account_user('see_module_manage_system_ugrade')}
  315. <a href="javascript:;" ng-click="changeShow('upgrade')" class="btn " ng-class="{'active' : show == 'upgrade'}">升级</a>
  316. {/if}
  317. {if permission_check_account_user('see_workorder')}
  318. <a href="javascript:;" ng-click="changeShow('workorder')" ng-class="{'active' : show == 'workorder'}" class="btn">工单系统</a>
  319. {/if}
  320. </div>
  321. <div id="iframepanel" ng-if="show == 'workorder'">
  322. <iframe src="" frameborder="0" width="100%" scrolling="no" id="workorderiframe">
  323. </iframe>
  324. </div>
  325. <table class="table we7-table table-hover table-form" ng-show="show == 'base' || show == ''">
  326. <col width="140px">
  327. <col />
  328. <col width="100px">
  329. <tr>
  330. <th class="text-left" colspan="3">编辑模块基本信息</th>
  331. </tr>
  332. <tr>
  333. <td class="table-label">模块标题</td>
  334. <td>{{ moduleinfo.title }}</td>
  335. {if permission_check_account_user('see_module_manage_system_info_edit')}
  336. <td class="text-right">
  337. <div class="link-group"><a href="javascript:;" ng-click="editModule('title', moduleinfo.title)">修改</a></div>
  338. </td>
  339. {/if}
  340. </tr>
  341. {if permission_check_account_user('see_module_manage_system_detailinfo')}
  342. <tr>
  343. <td class="table-label">模块作者</td>
  344. <td >{{ moduleinfo.author }}</td>
  345. <td></td>
  346. </tr>
  347. <tr>
  348. <td class="table-label">模块版本</td>
  349. <td >{{ moduleinfo.version }}</td>
  350. <td></td>
  351. </tr>
  352. {/if}
  353. <tr>
  354. <td class="table-label">模块简述</td>
  355. <td>{{ moduleinfo.ability }}</td>
  356. {if permission_check_account_user('see_module_manage_system_info_edit')}
  357. <td class="text-right">
  358. <div class="link-group"><a href="javascript:;" ng-click="editModule('ability', moduleinfo.ability)">修改</a></div>
  359. </td>
  360. {/if}
  361. </tr>
  362. <tr>
  363. <td class="table-label">模块介绍</td>
  364. <td>{{ moduleinfo.description }}</td>
  365. {if permission_check_account_user('see_module_manage_system_info_edit')}
  366. <td class="text-right">
  367. <div class="link-group"><a href="javascript:;" ng-click="editModule('description', moduleinfo.description)">修改</a></div>
  368. </td>
  369. {/if}
  370. </tr>
  371. <tr>
  372. <td class="table-label">模块缩略图</td>
  373. <td><img ng-src="{{ moduleinfo.logo }}" alt="" style="width:65px; height:65px;" class="img-rounded"/></td>
  374. {if permission_check_account_user('see_module_manage_system_info_edit')}
  375. <td class="text-right">
  376. <div class="link-group"><a href="javascript:;" ng-click="editModule('logo', moduleinfo.logo)">修改</a></div>
  377. </td>
  378. {/if}
  379. </tr>
  380. <tr>
  381. <td class="table-label">模块封面</td>
  382. <td><img ng-src="{{ moduleinfo.preview }}" alt="" style="width:65px; height:65px;" class="img-rounded"/></td>
  383. {if permission_check_account_user('see_module_manage_system_info_edit')}
  384. <td class="text-right">
  385. <div class="link-group"><a href="javascript:;" ng-click="editModule('preview', moduleinfo.preview)">修改</a></div>
  386. </td>
  387. {/if}
  388. </tr>
  389. </table>
  390. <table class="table we7-table table-hover vertical-middle table-manage" ng-show="(show == '' || show == 'base') && moduleinfo.relation">
  391. <col width="150px"/>
  392. <col />
  393. <col />
  394. <tr>
  395. <th colspan="3" class="text-left">可关联</th>
  396. </tr>
  397. <tr ng-repeat="relation in moduleinfo.relation">
  398. <td class="text-left">
  399. {{ we7TypeDefault[relation].name }}
  400. </td>
  401. <td class="text-left">
  402. <img ng-src="{{ moduleinfo.logo }}" class="img-responsive pull-left" style="width: 50px;height: 50px; margin-right: 10px;"/>
  403. <p>{{ moduleinfo.title }}</p>
  404. <span class="color-gray">版本:{{ moduleinfo.version }} </span>
  405. </td>
  406. <td class="text-right">
  407. <div class="link-group"><a href="{php echo url('module/manage-system/module_detail')}name={{moduleinfo.name}}&support={{relation}}&type={{moduleinfo.type}}">查看</a></div>
  408. </td>
  409. </tr>
  410. </table>
  411. <div class="panel we7-panel" ng-show="show == 'plugin' && moduleinfo.main_module == ''">
  412. <div class="panel-heading">
  413. 模块子应用
  414. </div>
  415. <div class="panel-body">
  416. <div class="plugin-list clearfix">
  417. <div class="item" ng-repeat="plugin in moduleinfo.plugin_list">
  418. <a href="{php echo url('module/manage-system/module_detail')}name={{plugin.name}}" target="_blank">
  419. <div class="img">
  420. <img ng-src="{{ plugin.logo }}" alt="子应用icon" class="plugin-img"/>
  421. <img ng-src="{{ moduleinfo.logo }}" alt="主应用icon" class="module-img"/>
  422. </div>
  423. <div class="name">{{ plugin.title }}</div>
  424. </a>
  425. </div>
  426. </div>
  427. </div>
  428. </div>
  429. <table class="table we7-table table-hover vertical-middle" ng-show="show == 'upgrade'" ng-if="isFounder == 1 && (localUpgradeInfo && !upgradeInfo || !upgradeInfo.branches)">
  430. <col width="300px"/>
  431. <col />
  432. <col width="200px;"/>
  433. <tr>
  434. <th>分支名称</th>
  435. <th>目前版本</th>
  436. <th>最新版本</th>
  437. <th class="text-right">操作</th>
  438. </tr>
  439. <tr>
  440. <td>---</td>
  441. <td>{{ moduleinfo.version }}</td>
  442. <td><span ng-if="localUpgradeInfo">本地:{{localUpgradeInfo.best_version}}</span></td>
  443. <td class="text-right">
  444. {if permission_check_account_user('see_module_manage_system_ugrade')}
  445. <a ng-if="localUpgradeInfo" href="{php echo url('module/manage-system/upgrade')}module_name={{ moduleinfo.name }}" class="btn btn-primary">本地升级</a>
  446. {/if}
  447. </td>
  448. </tr>
  449. </table>
  450. <table class="table we7-table table-hover vertical-middle" ng-show="show == 'upgrade'" ng-if="isFounder == 1 && upgradeInfo.from == 'cloud' && branch.displayorder >= upgradeInfo.site_branch.displayorder" ng-repeat="branch in upgradeInfo.branches">
  451. <col width="300px"/>
  452. <!-- <col /> -->
  453. <col />
  454. <col />
  455. <col width="200px"/>
  456. <tr>
  457. <th class="text-left">分支名称</th>
  458. <!-- <th>分支价格</th> -->
  459. <th>目前版本</th>
  460. <th>最新版本</th>
  461. <th class="text-right">操作</th>
  462. </tr>
  463. <tbody>
  464. <tr>
  465. <td class="text-left">{{ branch.name }}</td>
  466. <!-- <td class="color-red">
  467. <span ng-if="branch.displayorder > upgradeInfo.site_branch.displayorder" ng-bind="branch.price"></span>
  468. <span ng-if="branch.displayorder == upgradeInfo.site_branch.displayorder && branch.id > upgradeInfo.site_branch.id" ng-bind="branch.upgrade_price"></span>
  469. <span class="label label-success" ng-if="branch.id == upgradeInfo.site_branch.id">当前分支</span>
  470. </td> -->
  471. <td>{{ upgradeInfo.site_branch.id == branch.id ? moduleinfo.version : ''}}</td>
  472. <td>线上:{{ branch.version.version }}<br><span ng-if="localUpgradeInfo">本地:{{localUpgradeInfo.best_version}}</span></td>
  473. <td class="text-right">
  474. <span class="text text-success" ng-if="branch.id == upgradeInfo.site_branch.id && branch.version.version == moduleinfo.version">无需升级</span>
  475. {if permission_check_account_user('see_module_manage_system_ugrade')}
  476. <a ng-if="localUpgradeInfo" href="{php echo url('module/manage-system/upgrade')}module_name={{ moduleinfo.name }}" class="btn btn-primary">本地升级</a>
  477. <a href="javascript:;" ng-click="notice(service_expire, upgradeInfo.id, upgradeInfo.name)" ng-if="branch.id == upgradeInfo.site_branch.id && branch.version.version != moduleinfo.version" class="btn btn-primary">升级</a>
  478. {/if}
  479. <a href="javascript:;" ng-click="upgrade(branch.upgrade_price, upgradeInfo.name, upgradeInfo.id)" ng-if="branch.displayorder > upgradeInfo.site_branch.displayorder || (branch.displayorder == upgradeInfo.site_branch.displayorder && branch.id > upgradeInfo.site_branch.id)" class="btn btn-danger">购买</a>
  480. </td>
  481. </tr>
  482. <tr>
  483. <td class="text-left">{{ branch.id == upgradeInfo.site_branch.id ? '版本更新内容' : ''}}</td>
  484. <td colspan="4" class="text-right">
  485. <a class="color-default view-detail" ng-if="branch.id == upgradeInfo.site_branch.id && branch.version.version != moduleinfo.version" href="javascript:;" data-id="{{ branch.id }}" onclick="change($(this))">查看详情 <i class="wi wi-angle-down"></i></a>
  486. <a href="https://bbs.5g-yun.com/module-{{upgradeInfo.id}}.html" ng-if="branch.displayorder > upgradeInfo.site_branch.displayorder || (branch.displayorder == upgradeInfo.site_branch.displayorder && branch.id > upgradeInfo.site_branch.id)" class="color-default view-detail" target="_blank">查看分支详情</a>
  487. </td>
  488. </tr>
  489. <tr id="version-detail-{{ branch.id }}" style="display:none">
  490. <td colspan="5" class="details-versions">
  491. <div class="js-version-lists">
  492. <div class="details-version">
  493. <div class="details-version-time">
  494. <p class="time-d">{{ branch.day }}</p>
  495. <p class="time-y-m">{{ branch.month }}</p>
  496. </div>
  497. <i class="fa fa-circle-o"></i>
  498. <div class="details-version-content">
  499. <div class="panel panel-version">
  500. <div class="panel-heading">
  501. 版本号:{{ branch.version.version }} - {{ branch.name }} <span class="time-h" ng-bind="branch.hour"></span>
  502. </div>
  503. <div class="panel-body" ng-bind-html="branch.version.description">
  504. </div>
  505. </div>
  506. </div>
  507. </div>
  508. </div>
  509. {if $recent_versions['total'] > 10}
  510. <div class="text-center">
  511. <a href="javascript:;" class="btn c-blue js-versions-more">加载更多<i class="fa fa-angle-down"></i></a>
  512. </div>
  513. {/if}
  514. </td>
  515. </tr>
  516. </tbody>
  517. </table>
  518. <div class="module-group" ng-if="isFounder == 1">
  519. <table class="table we7-table table-hover" ng-show="show == 'group'">
  520. <col />
  521. <col width="100px" />
  522. <tr>
  523. <th class="text-left">
  524. 应用权限组
  525. </th>
  526. <th class="text-right">
  527. {if permission_check_account_user('see_module_manage_system_group_add')}
  528. <a href="{php echo url('module/group')}" class="color-default">添加</a>
  529. {/if}
  530. </th>
  531. </tr>
  532. <tr>
  533. <td class="text-left">
  534. <span>所有服务</span>
  535. </td>
  536. <td>
  537. </td>
  538. </tr>
  539. {loop $module_group $group}
  540. <tr>
  541. <td class="text-left">
  542. <span>{$group['name']}</span>
  543. </td>
  544. <td class="text-right">
  545. {if permission_check_account_user('see_module_manage_system_group_add')}
  546. <div class="link-group"><a href="{php echo url('module/group/post', array('id' => $group['id']))}">设置</a></div>
  547. {/if}
  548. </td>
  549. </tr>
  550. {/loop}
  551. </table>
  552. </div>
  553. {if !empty($module_info['subscribes'])}
  554. <div class="panel we7-panel module-subscription" ng-if="isFounder == 1" ng-show="show == 'subscribe'">
  555. <div class="panel-heading ">
  556. 订阅详情
  557. <div class="pull-right subscription-switch">
  558. <span >启用订阅</span>
  559. <label>
  560. <input name="" id="" class="form-control" type="checkbox" style="display: none;">
  561. <div class="switch" ng-class="{ 'switchOn' : !moduleinfo.is_receive_ban || moduleinfo.is_receive_ban == 0}" ng-click="changeSwitch()"></div>
  562. </label>
  563. </div>
  564. </div>
  565. <div class="panel-body">
  566. <ul>
  567. {loop $module_info['subscribes'] $subscribe}
  568. <li>{$subscribes_type[$subscribe]} <label ng-if="subscribe == 2" class="label label-danger">通讯失败</label> </li>
  569. {/loop}
  570. </ul>
  571. </div>
  572. </div>
  573. {/if}
  574. <table class="table we7-table table-hover" ng-if="isFounder == 1">
  575. <col width="255px"/>
  576. <col width="130px"/>
  577. <col width="250px"/>
  578. <col width="122px"/>
  579. <col />
  580. </table>
  581. <div class="modal fade" id="module-info" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
  582. <div class="modal-dialog we7-modal-dialog" style="width:800px">
  583. <div class="modal-content">
  584. <div class="modal-header">
  585. <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
  586. <h4 class="modal-title">编辑模块信息</h4>
  587. </div>
  588. <div class="modal-body">
  589. <div class="form-group" ng-show="editType == 'title'">
  590. <label class="col-sm-2 control-label"> 模块标题</label>
  591. <div class="col-sm-10">
  592. <input type="text" name="title" ng-model="moduleOriginal.title" class="form-control">
  593. <span class="help-block">模块的名称, 显示在用户的模块列表中. 不要超过10个字符</span>
  594. </div>
  595. </div>
  596. <div class="form-group" ng-show="editType == 'ability'">
  597. <label class="col-sm-2 control-label"> 模块简述</label>
  598. <div class="col-sm-10">
  599. <input type="text" name="ability" ng-model="moduleOriginal.ability" class="form-control">
  600. <span class="help-block">模块功能描述, 使用简单的语言描述模块的作用, 来吸引用户</span>
  601. </div>
  602. </div>
  603. <div class="form-group" ng-show="editType == 'description'">
  604. <label class="col-sm-2 control-label"> 模块介绍</label>
  605. <div class="col-sm-10">
  606. <textarea type="text" name="description" ng-model="moduleOriginal.description" class="form-control" rows="5">{{ moduleinfo.description }}</textarea>
  607. <span class="help-block">模块详细描述, 详细介绍模块的功能和使用方法</span>
  608. </div>
  609. </div>
  610. <div class="form-group" ng-show="editType == 'logo'">
  611. <label class="col-sm-2 control-label"> 模块缩略图</label>
  612. <div class="col-sm-10">
  613. <div class="we7-input-img" ng-class="{ 'active' : moduleOriginal.logo }" style="width: 100px;height: 100px;">
  614. <img ng-src="{{ moduleOriginal.logo }}" ng-if="moduleOriginal.logo">
  615. <a href="javascript:;" class="input-addon" ng-hide="moduleOriginal.logo" ng-click="changePicture('logo')"><span>+</span></a>
  616. <input type="hidden" name="thumb">
  617. <div class="cover-dark">
  618. <a href="javascript:;" class="cut" ng-click="changePicture('logo')">更换</a>
  619. <a href="javascript:;" class="del" ng-click="delPicture('logo')"><i class="fa fa-times text-danger"></i></a>
  620. </div>
  621. </div>
  622. <span class="help-block">用 48*48 的图片来让你的模块更吸引眼球吧。仅支持jpg格式</span>
  623. </div>
  624. </div>
  625. <div class="form-group" ng-show="editType == 'preview'">
  626. <label class="col-sm-2 control-label"> 模块封面</label>
  627. <div class="col-sm-10">
  628. <div class="we7-input-img" ng-class="{ 'active' : moduleOriginal.preview}" style="width: 100px;height: 100px;">
  629. <img ng-src="{{ moduleOriginal.preview }}">
  630. <a href="javascript:;" class="input-addon" ng-click="changePicture('preview')"><span>+</span></a>
  631. <input type="hidden" name="thumb">
  632. <div class="cover-dark">
  633. <a href="javascript:;" class="cut" ng-click="changePicture('preview')">更换</a>
  634. <a href="javascript:;" class="del" ng-click="delPicture('preview')"><i class="fa fa-times text-danger"></i></a>
  635. </div>
  636. </div>
  637. <span class="help-block">模块封面, 大小为 600*350, 更好的设计将会获得官方推荐位置。仅支持jpg格式</span>
  638. </div>
  639. </div>
  640. </div>
  641. <div class="modal-footer">
  642. <button class="btn btn-primary" type="text" name="submit" ng-click="save()" data-dismiss="modal">保存</button>
  643. <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
  644. <input type="hidden" name="token" value="c781f0df">
  645. </div>
  646. </div>
  647. </div>
  648. </div>
  649. </div>
  650. <script>
  651. require(['fileUploader'], function() {
  652. angular.module('moduleApp').value('config', {
  653. 'isFounder' : "{if $_W['isfounder']}1{else}2{/if}",
  654. 'show' : "{$_GPC['show']}",
  655. 'moduleInfo' : {php echo json_encode($module_info)},
  656. 'receiveBanUrl' : "{php echo url('module/manage-system/change_receive_ban')}",
  657. 'editModuleUrl' : "{php echo url('module/manage-system/get_module_info')}",
  658. 'saveModuleUrl' : "{php echo url('module/manage-system/save_module_info')}",
  659. 'checkReceiveUrl' : "{php echo url('module/manage-system/check_subscribe')}",
  660. 'getUpgradeInfoUrl' : "{php echo url('module/manage-system/get_upgrade_info')}",
  661. 'getLocalUpgradeInfoUrl' : "{php echo url('module/manage-system/get_local_upgrade_info')}",
  662. 'getWorkorderIframeUrl' : "{php echo url('system/workorder/module')}"
  663. });
  664. angular.bootstrap($('.js-system-module-detail'), ['moduleApp']);
  665. });
  666. if(window.addEventListener) {
  667. window.addEventListener('message', function(e){
  668. $('#workorderiframe').height(e.data.height+200); //选中图片导致高度又变高了
  669. });
  670. }
  671. </script>
  672. {elseif $do == 'subscribe'}
  673. <div class="alert alert-info we7-page-alert">
  674. 如果模块测试订阅消息失败,为了不影响系统整体通知,请禁用这些通知失败的模块
  675. </div>
  676. <div class="js-system-module-subscribe" ng-controller="subscribeCtrl" ng-cloak>
  677. <div class="panel we7-panel panel-table js-test" ng-repeat="(name, module) in subscribe_module track by name">
  678. <div class="panel-heading clearfix">
  679. <div class="pull-right" ng-click="change_ban(module.name)">
  680. <input class="form-control" type="checkbox" style="display: none;">
  681. <div ng-class="module.receive_ban == 0 ? 'switch switchOn' : 'switch'"></div>
  682. </div>
  683. {{ module.title }}
  684. </div>
  685. <div class="panel-body clearfix">
  686. <div class="col-md-3 col-sm-4 col-xs-6 item" style="line-height: 30px; cursor:pointer;" ng-repeat="subscribe in module.subscribe" ng-if="subscribe != 'text'">
  687. {{ types[subscribe] }}
  688. <p class="pull-right">
  689. <span class="label label-success" ng-if="module.subscribe_success == 1">正常</span>
  690. <span class="label label-danger" ng-if="module.subscribe_success == 2">失败</span>
  691. </p>
  692. </div>
  693. </div>
  694. </div>
  695. </div>
  696. <script type="text/javascript">
  697. angular.module('moduleApp').value('config', {
  698. 'subscribe_module' : {php echo json_encode($subscribe_module)},
  699. 'types' : {php echo json_encode($subscribe_type)},
  700. 'change_ban_url' : "{php echo url('module/manage-system/change_receive_ban')}",
  701. 'check_receive_url' : "{php echo url('module/manage-system/check_subscribe')}"
  702. });
  703. angular.bootstrap($('.js-system-module-subscribe'), ['moduleApp']);
  704. </script>
  705. {elseif $do == 'install_success'}
  706. <ul class="we7-step">
  707. <li class="new"><span class="content">1. 安装应用</span></li>
  708. <li class="new"><span class="content">2. 分配应用权限</span> </li>
  709. <li class="new active"><span class="content">3. 安装成功</span> </li>
  710. </ul>
  711. <div class="distribution-steps">
  712. <div class="we7-margin-bottom-sm font-lg">应用分配到公众号使用的流程说明</div>
  713. <div class="steps-container">
  714. <div>
  715. <div class="num">1</div>
  716. <div class="title">
  717. <span class="wi wi-appjurisdiction"></span>添加应用权限组
  718. </div>
  719. <div class="content">
  720. 设置应用权限组名称,选择需要添加的公众号应用、小程序应用、微站模板,保存提交。
  721. <div><a href="{php echo url('module/group/post')}" class="color-default">去添加应用组 ></a></div>
  722. </div>
  723. </div>
  724. <div>
  725. <div class="num">2</div>
  726. <div class="title">
  727. <span class="wi wi-userjurisdiction"></span>添加用户权限组
  728. </div>
  729. <div class="content">
  730. 设置用户权限组名称,选择可以添加的的公众号,小程序数量、有效期并选择应用权限组,然后保存提交。
  731. <div><a href="{php echo url('user/group/post')}" class="color-default">去添加用户权限组 ></a></div>
  732. </div>
  733. </div>
  734. <div>
  735. <div class="num">3</div>
  736. <div class="title">
  737. <span class="wi wi-user-group"></span>分配用户权限组
  738. </div>
  739. <div class="content">
  740. 改用户组权限,分配成功后此用户组即可使用该应用组的所有应用。
  741. <div><a href="{php echo url('user/group')}" class="color-default">去分配用户组 ></a></div>
  742. </div>
  743. </div>
  744. </div>
  745. </div>
  746. <div class="we7-margin-top">
  747. {if $module_support_name == MODULE_SUPPORT_SYSTEMWELCOME_NAME}
  748. <a class="btn btn-primary" href="{php echo url('module/manage-system/installed', array('support' => MODULE_SUPPORT_SYSTEMWELCOME_NAME))}">返回已安装应用列表</a>
  749. {else}
  750. <a class="btn btn-primary" href="{php echo url('module/manage-system/installed')}">返回已安装应用列表</a>
  751. {/if}
  752. </div>
  753. {/if}
  754. {template 'common/footer'}