1002110103_edit.jsp 10.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260
  1. <html>
  2. <head>
  3. </head>
  4. <body>
  5. <div id="space-content">
  6. <el-form action="@service{name:'article_list', page:'article_list'}@" method="post" :inline="true" :model="obj">
  7. <el-container class="space-container">
  8. <div class="space-tbs">
  9. <el-tabs v-model="obj.dcode" @tab-click="handleClick">
  10. <div class="advanced-query" v-show="obj.showForm">
  11. <el-row :gutter="20">
  12. <el-col :span="7" :offset="1">
  13. <el-form-item label="所属栏目" prop="navigation">
  14. <el-cascader filterable v-model="obj.navigation" collapse-tags :props="{ label: 'name', value: 'navigationid', emitPath: false, multiple: true, checkStrictly: true }" :options="navigationOptions" placeholder="请选择" clearable size="small"></el-cascader>
  15. </el-form-item>
  16. </el-col>
  17. <el-col :span="14" :offset="1">
  18. <el-form-item label="发布时间" prop="dateTime">
  19. <el-date-picker v-model="obj.dateTime" type="daterange" align="right" clearable size="small" format="yyyy-MM-dd" value-format="yyyy-MM-dd" unlink-panels range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" :picker-options="pickerOptions">
  20. </el-date-picker>
  21. </el-form-item>
  22. </el-col>
  23. </el-row>
  24. <el-row :gutter="20">
  25. <el-col :span="7" :offset="1">
  26. <el-form-item label="我发布的" prop="issue">
  27. <el-switch v-model="obj.issue">
  28. </el-switch>
  29. </el-form-item>
  30. </el-col>
  31. <el-col :span="14" :offset="1">
  32. <el-form-item label="排序规则" prop="sort">
  33. <el-radio-group v-model="obj.sort" size="small">
  34. <el-radio-button label="sort_new">按最新发布时间</el-radio-button>
  35. <el-radio-button label="sort_top">按点击量从高到低</el-radio-button>
  36. <el-radio-button label="sort_bottom">按点击量从低到高</el-radio-button>
  37. </el-radio-group>
  38. </el-form-item>
  39. </el-col>
  40. </el-row>
  41. <el-row>
  42. <el-col>
  43. <el-form-item class="formBtn">
  44. <el-button size="mini" onclick="space.forms.hide();">收起</el-button>
  45. <el-button size="mini" @click="space.forms.reset()">重置</el-button>
  46. <el-button size="mini" :loading="loading" type="primary" onclick="space.forms.submit();">查询</el-button>
  47. </el-form-item>
  48. </el-col>
  49. </el-row>
  50. </div>
  51. <el-tab-pane label="所有" name=""></el-tab-pane>
  52. <el-tab-pane label="在用" name="61"></el-tab-pane>
  53. <el-tab-pane label="停用" name="71"></el-tab-pane>
  54. </el-tabs>
  55. <div class="tab-right">
  56. <div class="tabs-right-search">
  57. <el-input placeholder="搜索文章标题" v-model="obj.title" size="small" clearable>
  58. <i slot="suffix" class="el-input__icon el-icon-search space-search-icon" onclick="space.forms.submit();" ></i>
  59. <el-button slot="append" icon="spaceicon icon-filter" title="高级查询" onclick="space.forms.show();" :class="{'activeColor':obj.showForm}"></el-button>
  60. </el-input>
  61. </div>
  62. <div class="tabs-right-btns">
  63. <el-button type="primary" permission="article_manage" icon="el-icon-s-promotion" plain size="small" onclick='@service{ name: `article_add`, show:`true`, refresh:`true`, page:`article_add` }@'>录入</el-button>
  64. </div>
  65. </div>
  66. </div>
  67. </el-container>
  68. </el-form>
  69. <table lay-filter="appDataTable" class="layui-table">
  70. <thead>
  71. <tr>
  72. <th lay-data="{field:'1'}">标题</th>
  73. <th lay-data="{field:'2'}">所属网站</th>
  74. <th lay-data="{field:'3'}">栏目</th>
  75. <th lay-data="{field:'3a', width: 200}">发布人</th>
  76. <th lay-data="{field:'5', width: 160 }">发布时间</th>
  77. <th lay-data="{field:'6', width: 120 }">阅读次数</th>
  78. <th lay-data="{field:'7', width: 120 }">状态</th>
  79. <th lay-data="{field:'8', width: 80 }">操作</th>
  80. </tr>
  81. </thead>
  82. <tbody>
  83. <c:forEach items="${articleList}" var="item">
  84. <tr onclick='@service{ name:`article_info`, page:`article_info`, params:`{articleid: "${item.articleid}"}`, show:`true` }@'>
  85. <td>
  86. <c:if test="${item.sticktop == 1}">
  87. <span class="layui-badge" style="color: #409EFF;background: #ecf5ff;border-color: #b3d8ff;height: 22px;line-height: 22px;">置顶</span>
  88. </c:if>
  89. ${item.title}
  90. </td>
  91. <td>
  92. ${item.website_name}
  93. </td>
  94. <td>
  95. <span v-if="obj.navigation.length==0 || obj.navigation.indexOf('${item.navigationid}')!=-1">
  96. ${item.navAllName}
  97. </span>
  98. <span v-if="obj.navigation.length>0 && obj.navigation.indexOf('${item.navigationid}')==-1" class="layui-badge" style="height: 22px;line-height: 22px;color: #333;background: #E0E0E0;border-color: #E0E0E0;font-size: 14px;">
  99. <i class="el-icon-s-promotion"></i>抄送 | ${item.navAllName}
  100. </span>
  101. </td>
  102. <td>${item.pname_dname}</td>
  103. <td>
  104. <c:if test="${item.release_time != '' && item.release_time != null}">
  105. <app:dateTime type="format" key="yyyy-MM-dd HH:mm" value="${item.release_time}" />
  106. </c:if>
  107. </td>
  108. <td>${item.read_count}次</td>
  109. <td>
  110. <app:codeBookTranslate name="sys.dcode" filter="{'dcode':'${item.dcode }'}" />
  111. </td>
  112. <td>
  113. <div class="laytable-btns">
  114. <el-button-group>
  115. <c:if test="${item.create_pid == appUser.userId}">
  116. <el-button v-if='space.utils.dcode.isRoughDraft("${item.dcode}")' size="small" type="primary" permission="article_flow_manage"
  117. onclick='@service{ name:`article_start`, page:`sys.common_audit.apply`, params:`{articleid: "${item.articleid}"}`, show:`true`, refresh:`true` }@' >提交</el-button>
  118. <el-button v-if='space.utils.dcode.isRoughDraft("${item.dcode}")' size="small" type="primary" permission="article_modify"
  119. onclick='@service{ name:`article_info`, page:`article_modify`, params:`{articleid: "${item.articleid}"}`, show:`true`, refresh:`true` }@' >修改</el-button>
  120. <c:if test="${item.ascode == 10000}">
  121. <el-button v-if='space.utils.dcode.isRoughDraft("${item.dcode}")' size="small" type="primary" permission="article_add"
  122. onclick='@service{ name:`article_info`, page:`article_delete`, params:`{articleid: "${item.articleid}"}`, show:`true`, refresh:`true` }@' >删除</el-button>
  123. </c:if>
  124. </c:if>
  125. <c:if test="${item.create_pid == appUser.userId}">
  126. <el-button v-if='space.utils.dcode.isDisable("${item.dcode}") || space.utils.dcode.isEnable("${item.dcode}")' permission="article_change"
  127. size="small" type="primary" onclick='@service{ name:`article_info`, page:`article_change`, params:`{articleid: "${item.articleid}"}`, show:`true`, refresh:`true` }@'>变动</el-button>
  128. </c:if>
  129. <c:if test="${item.create_pid != appUser.userId}">
  130. <el-button v-if='space.utils.dcode.isDisable("${item.dcode}") || space.utils.dcode.isEnable("${item.dcode}")'
  131. size="small" repetition-group="change" permission="article_unit_admin_change" type="primary" permission="article_change"
  132. onclick='@service{ name:`article_info`, page:`article_change`, params:`{articleid: "${item.articleid}"}`, show:`true`, refresh:`true` }@'>变动</el-button>
  133. <c:if test="${item.isManagerDepartmentArticleFlag == 'true'}">
  134. <el-button v-if='space.utils.dcode.isDisable("${item.dcode}") || space.utils.dcode.isEnable("${item.dcode}")'
  135. size="small" repetition-group="change" permission="article_department_admin_change" type="primary" permission="article_change"
  136. onclick='@service{ name:`article_info`, page:`article_change`, params:`{articleid: "${item.articleid}"}`, show:`true`, refresh:`true` }@'>变动</el-button>
  137. </c:if>
  138. </c:if>
  139. </el-button-group>
  140. </div>
  141. </td>
  142. </tr>
  143. </c:forEach>
  144. </tbody>
  145. </table>
  146. <app:appPage />
  147. </div>
  148. </body>
  149. <script type="text/javascript">
  150. space.vue = new Vue({
  151. el: space.appContent,
  152. data() {
  153. return {
  154. obj: {
  155. title: '${title}',
  156. dateTime: space.utils.parseAry('${dateTime}'),
  157. navigation: space.utils.parseAry('${navigation}'),
  158. issue: space.utils.parseBoolean('${issue}'),
  159. sort: '${sort}',
  160. dcode: '${dcode}',
  161. showForm: space.utils.parseBoolean('${showForm}')
  162. },
  163. navigationOptions: [],
  164. pickerOptions: {
  165. shortcuts: [{
  166. text: '最近一周',
  167. onClick(picker) {
  168. const end = new Date();
  169. const start = new Date();
  170. start.setTime(start.getTime() - 3600 * 1000 * 24 * 7);
  171. picker.$emit('pick', [start, end]);
  172. }
  173. }, {
  174. text: '最近一个月',
  175. onClick(picker) {
  176. const end = new Date();
  177. const start = new Date();
  178. start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
  179. picker.$emit('pick', [start, end]);
  180. }
  181. }, {
  182. text: '最近三个月',
  183. onClick(picker) {
  184. const end = new Date();
  185. const start = new Date();
  186. start.setTime(start.getTime() - 3600 * 1000 * 24 * 90);
  187. picker.$emit('pick', [start, end]);
  188. }
  189. }]
  190. },
  191. loading: false
  192. };
  193. },
  194. created: function() {
  195. var _this = this;
  196. space.utils.ajax({
  197. url: '@service{ name:`article_getIssueNavList` }@',
  198. dataType: 'json',
  199. callback: function(data) {
  200. _this.navigationOptions = data.data.data;
  201. }
  202. });
  203. },
  204. methods: {
  205. handleClick: function(tab, event) {
  206. space.forms.submit();
  207. },
  208. }
  209. });
  210. </script>
  211. </html>