e59ca06ed96c5617c281ce578fb3b19d1c5cb49f.svn-base 9.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245
  1. <template>
  2. <a-card :bordered="false">
  3. <!-- 查询区域 -->
  4. <div class="table-page-search-wrapper">
  5. <a-form layout="inline" @keyup.enter.native="searchQuery">
  6. <a-row :gutter="24">
  7. <a-col :xl="6" :lg="7" :md="8" :sm="24">
  8. <a-form-item label="名称">
  9. <a-input placeholder="请输入名称" v-model="queryParam.name"></a-input>
  10. </a-form-item>
  11. </a-col>
  12. <a-col :xl="6" :lg="7" :md="8" :sm="24">
  13. <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
  14. <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
  15. <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
  16. <!-- <a @click="handleToggleSearch" style="margin-left: 8px">-->
  17. <!-- {{ toggleSearchStatus ? '收起' : '展开' }}-->
  18. <!-- <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>-->
  19. <!-- </a>-->
  20. </span>
  21. </a-col>
  22. </a-row>
  23. </a-form>
  24. </div>
  25. <!-- 查询区域-END -->
  26. <!-- 操作按钮区域 -->
  27. <div class="table-operator">
  28. <a-button @click="handleAdd" type="primary" icon="plus">新增</a-button>
  29. <a-button type="primary" icon="download" @click="handleExportXls('rm_videogeo')">导出</a-button>
  30. <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader"
  31. :action="importExcelUrl" @change="handleImportExcel">
  32. <a-button type="primary" icon="import">导入</a-button>
  33. </a-upload>
  34. <!-- 高级查询区域 -->
  35. <j-super-query :fieldList="superFieldList" ref="superQueryModal"
  36. @handleSuperQuery="handleSuperQuery"></j-super-query>
  37. <a-dropdown v-if="selectedRowKeys.length > 0">
  38. <a-menu slot="overlay">
  39. <a-menu-item key="1" @click="batchDel">
  40. <a-icon type="delete"/>
  41. 删除
  42. </a-menu-item>
  43. </a-menu>
  44. <a-button style="margin-left: 8px"> 批量操作
  45. <a-icon type="down"/>
  46. </a-button>
  47. </a-dropdown>
  48. </div>
  49. <!-- table区域-begin -->
  50. <div>
  51. <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
  52. <i class="anticon anticon-info-circle ant-alert-icon"></i> 已选择 <a
  53. style="font-weight: 600">{{ selectedRowKeys.length }}</a>项
  54. <a style="margin-left: 24px" @click="onClearSelected">清空</a>
  55. </div>
  56. <a-table
  57. ref="table"
  58. size="middle"
  59. :scroll="{x:true}"
  60. bordered
  61. rowKey="id"
  62. :columns="columns"
  63. :dataSource="dataSource"
  64. :pagination="ipagination"
  65. :loading="loading"
  66. :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange}"
  67. class="j-table-force-nowrap"
  68. @change="handleTableChange">
  69. <template slot="videoNameSlot" slot-scope="text,record">
  70. <a @click="handleDetail(record)">{{ text }}</a>
  71. </template>
  72. <template slot="htmlSlot" slot-scope="text">
  73. <div v-html="text"></div>
  74. </template>
  75. <template slot="imgSlot" slot-scope="text">
  76. <span v-if="!text" style="font-size: 12px;font-style: italic;">无图片</span>
  77. <img v-else :src="getImgView(text)" height="25px" alt=""
  78. style="max-width:80px;font-size: 12px;font-style: italic;"/>
  79. </template>
  80. <template slot="fileSlot" slot-scope="text">
  81. <span v-if="!text" style="font-size: 12px;font-style: italic;">无文件</span>
  82. <a-button
  83. v-else
  84. :ghost="true"
  85. type="primary"
  86. icon="download"
  87. size="small"
  88. @click="downloadFile(text)">
  89. 下载
  90. </a-button>
  91. </template>
  92. <span slot="action" slot-scope="text, record">
  93. <a @click="handleView(record)">查看</a>
  94. <a-divider type="vertical"/>
  95. <a-dropdown>
  96. <a class="ant-dropdown-link">更多 <a-icon type="down"/></a>
  97. <a-menu slot="overlay">
  98. <a-menu-item>
  99. <a @click="handleEdit(record)">编辑</a>
  100. </a-menu-item>
  101. <a-menu-item>
  102. <a @click="handleDetail(record)">详情</a>
  103. </a-menu-item>
  104. <a-menu-item>
  105. <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
  106. <a>删除</a>
  107. </a-popconfirm>
  108. </a-menu-item>
  109. </a-menu>
  110. </a-dropdown>
  111. </span>
  112. </a-table>
  113. </div>
  114. <rm-videogeo-modal ref="modalForm" @ok="modalFormOk"></rm-videogeo-modal>
  115. </a-card>
  116. </template>
  117. <script>
  118. import '@/assets/less/TableExpand.less'
  119. import {mixinDevice} from '@/utils/mixin'
  120. import {JeecgListMixin} from '@/mixins/JeecgListMixin'
  121. import RmVideogeoModal from './modules/RmVideogeoModal'
  122. const videoServer = "http://222.133.41.37:9306/video/index.html";
  123. export default {
  124. name: 'RmVideogeoList',
  125. mixins: [JeecgListMixin, mixinDevice],
  126. components: {
  127. RmVideogeoModal
  128. },
  129. data() {
  130. return {
  131. description: 'rm_videogeo管理页面',
  132. // 表头
  133. columns: [
  134. {
  135. title: '序号',
  136. dataIndex: '',
  137. key: 'rowIndex',
  138. width: 60,
  139. align: "center",
  140. customRender: function (t, r, index) {
  141. return parseInt(index) + 1;
  142. }
  143. },
  144. {
  145. title: '名称',
  146. align: "center",
  147. dataIndex: 'name',
  148. scopedSlots: { customRender: 'videoNameSlot' }
  149. },
  150. {
  151. title: 'IP地址',
  152. align: "center",
  153. dataIndex: 'ip'
  154. },
  155. {
  156. title: '端口号',
  157. align: "center",
  158. dataIndex: 'port'
  159. },
  160. {
  161. title: '用户名',
  162. align: "center",
  163. dataIndex: 'username'
  164. },
  165. {
  166. title: '密码',
  167. align: "center",
  168. dataIndex: 'password'
  169. },
  170. {
  171. title: '经度',
  172. align: "center",
  173. dataIndex: 'lng'
  174. },
  175. {
  176. title: '纬度',
  177. align: "center",
  178. dataIndex: 'lat'
  179. },
  180. {
  181. title: '操作',
  182. dataIndex: 'action',
  183. align: "center",
  184. fixed: "right",
  185. width: 147,
  186. scopedSlots: {customRender: 'action'}
  187. }
  188. ],
  189. url: {
  190. list: "/hzz.video/rmVideogeo/list",
  191. delete: "/hzz.video/rmVideogeo/delete",
  192. deleteBatch: "/hzz.video/rmVideogeo/deleteBatch",
  193. exportXlsUrl: "/hzz.video/rmVideogeo/exportXls",
  194. importExcelUrl: "hzz.video/rmVideogeo/importExcel",
  195. },
  196. dictOptions: {},
  197. superFieldList: [],
  198. }
  199. },
  200. created() {
  201. this.getSuperFieldList();
  202. },
  203. computed: {
  204. importExcelUrl: function () {
  205. return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
  206. },
  207. },
  208. methods: {
  209. initDictConfig() {
  210. },
  211. getSuperFieldList() {
  212. let fieldList = [];
  213. fieldList.push({type: 'string', value: 'name', text: '名称', dictCode: ''})
  214. fieldList.push({type: 'string', value: 'ip', text: 'IP地址', dictCode: ''})
  215. fieldList.push({type: 'string', value: 'port', text: '端口号', dictCode: ''})
  216. fieldList.push({type: 'string', value: 'username', text: '用户名', dictCode: ''})
  217. fieldList.push({type: 'string', value: 'password', text: '密码', dictCode: ''})
  218. fieldList.push({type: 'double', value: 'lng', text: '经度', dictCode: ''})
  219. fieldList.push({type: 'double', value: 'lat', text: '纬度', dictCode: ''})
  220. this.superFieldList = fieldList
  221. },
  222. handleView(record){
  223. let m_url = videoServer+"?ssIP="+record.ip+"&ssPort="+record.port+
  224. "&ssUsername="+record.username+"&ssPassword="+record.password;
  225. window.open(m_url,"_blank");
  226. }
  227. }
  228. }
  229. </script>
  230. <style scoped>
  231. @import '~@assets/less/common.less';
  232. </style>