experCollec.vue 9.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339
  1. <template>
  2. <fullscreen :fullscreen.sync="fullscreen" class="container">
  3. <div class="container-box">
  4. <toolList @iconCli='iconCli' :tooltit='tooltit'></toolList>
  5. <div class="search">
  6. <mySearch :searchList="searchList" @searchInfo="searchInfo"></mySearch>
  7. </div>
  8. <div class="tabbox">
  9. <el-table height="calc(100% - 40px)" class="com-table" ref="multipleTable" :data="tableData"
  10. tooltip-effect="dark" size="small" border style="width: 100%" v-loading="loading">
  11. <el-table-column prop="cityName" label="来源">
  12. </el-table-column>
  13. <el-table-column prop="expTitle" label="标题">
  14. </el-table-column>
  15. <el-table-column prop="marketExp" label="营销经验">
  16. </el-table-column>
  17. <el-table-column prop="opTime" label="收集时间">
  18. </el-table-column>
  19. <el-table-column prop="opName" label="发起人">
  20. </el-table-column>
  21. <el-table-column label="附件">
  22. <template slot-scope="scope">
  23. <span @click="downfile(scope.row)" style="cursor: pointer;">{{scope.row.fileName}}</span>
  24. </template>
  25. </el-table-column>
  26. </el-table>
  27. <el-pagination class="pageBox" @current-change="currchange" layout="prev, pager, next" background
  28. :total="total">
  29. </el-pagination>
  30. </div>
  31. </div>
  32. </fullscreen>
  33. </template>
  34. <script>
  35. import mySearch from "../../../components/search.vue";
  36. import myMessage from "../../../components/myMessage.vue"
  37. import toolList from '../../../components/toolList'
  38. import myUpload from '../../../components/upload'
  39. import uploadDown from '../../../components/uploadDown.vue'
  40. import deptTreeOnly from "../../../components/deptTreeOnly.vue"
  41. export default {
  42. components: {
  43. mySearch,
  44. myMessage,
  45. toolList,
  46. myUpload,
  47. uploadDown,
  48. deptTreeOnly
  49. },
  50. data() {
  51. return {
  52. searchList: [{
  53. type: 'input',
  54. tit: '标题',
  55. value: '',
  56. width: '98%',
  57. }],
  58. tooltit: '经验共享库',
  59. fullscreen: false,
  60. total: 0,
  61. pageSize: 1,
  62. tableData: [{}],
  63. dialogStatus: false,
  64. disableStatus: false,
  65. titname: '',
  66. infolist: {},
  67. userInfo: {},
  68. params: {},
  69. centerDialogVisible: false,
  70. messTit: '',
  71. delid: '',
  72. loading: false,
  73. loadinged: false,
  74. docType: [],
  75. contentType: [],
  76. infodata: [{}],
  77. infodatat: [{}],
  78. uploadstatus: false,
  79. regionopt: [],
  80. companyFlag: '',
  81. treeListonly: {},
  82. defaultList: [],
  83. closeList: false,
  84. visionchonly: false,
  85. depttype: 0,
  86. }
  87. },
  88. methods: {
  89. downfile(v){
  90. this.$http({
  91. url: '/market/compatt/downfile',
  92. method: "post",
  93. headers: {
  94. "Content-Type": "application/json",
  95. },
  96. responseType: "blob",
  97. data: {"id": v.fileId, "fileName": v.fileName},
  98. }).then((response) => {
  99. if (window.navigator && window.navigator.msSaveOrOpenBlob) {
  100. let blob = new Blob([response.data], {
  101. type: 'application/vnd.ms-excel'
  102. });
  103. window.navigator.msSaveOrOpenBlob(blob, v.fileName);
  104. } else {
  105. /* 火狐谷歌的文件下载方式 */
  106. var blob = new Blob([response.data])
  107. var downloadElement = document.createElement('a')
  108. var href = window.URL.createObjectURL(blob);
  109. downloadElement.href = href;
  110. downloadElement.download = v.fileName;
  111. document.body.appendChild(downloadElement);
  112. downloadElement.click();
  113. document.body.removeChild(downloadElement);
  114. window.URL.revokeObjectURL(href);
  115. }
  116. });
  117. },
  118. dialogCheck(v) {
  119. },
  120. //搜索数据
  121. searchInfo(v) {
  122. this.params = {};
  123. v[0] ? this.params.expTitle = v[0] : '';
  124. this.getList(this.params, this.pageSize);
  125. },
  126. closedia() {
  127. this.infolist = {};
  128. this.infodata = [{}];
  129. this.attList = [];
  130. this.dialogStatus = false;
  131. },
  132. //获取列表
  133. getList(v, n) {
  134. this.pageSize = n;
  135. let _this = this;
  136. this.loading = true;
  137. this.$http({
  138. url: "/market/cStoreScheTrainExpDetail/queryPage",
  139. method: "post",
  140. headers: {
  141. "Content-Type": "application/json",
  142. "page": '{"pageNo":"' + n + '","pageSize":"10"}'
  143. },
  144. data: v,
  145. }).then((res) => {
  146. this.tableData = res.data.data;
  147. this.total = res.data.totalRecord;
  148. this.loading = false;
  149. });
  150. },
  151. // 分页
  152. currchange(v) {
  153. this.pageSize = v;
  154. this.getList(this.params, this.pageSize);
  155. },
  156. //功能栏
  157. iconCli(v) {
  158. if (v === 1) {
  159. this.getList(this.params, this.pageSize);
  160. }
  161. if (v === 2) {
  162. this.fullscreen = !this.fullscreen
  163. }
  164. },
  165. getUser() {
  166. this.userInfo = JSON.parse(window.sessionStorage.userInfo);
  167. },
  168. },
  169. mounted() {
  170. this.getList({}, 1);
  171. this.getUser();
  172. },
  173. created() {
  174. }
  175. }
  176. </script>
  177. <style scoped lang="scss">
  178. .onetab {
  179. margin-bottom: 20px;
  180. padding: 0 20px;
  181. }
  182. .titbox {
  183. div {
  184. float: right;
  185. i {
  186. font-size: 22px;
  187. margin-left: 20px;
  188. cursor: pointer;
  189. }
  190. }
  191. }
  192. .tabbox {
  193. margin-top: 15px;
  194. }
  195. .pageBox {
  196. text-align: right;
  197. margin-top: 10px;
  198. }
  199. .info-line {
  200. width: 100%;
  201. display: block;
  202. padding-left: 20px;
  203. div {
  204. width: 50%;
  205. display: inline-block;
  206. }
  207. span {
  208. width: 100px;
  209. display: inline-block;
  210. text-align: left;
  211. i {
  212. color: red;
  213. display: inline-block;
  214. padding-right: 5px;
  215. }
  216. }
  217. .el-select,
  218. .el-input {
  219. width: calc(100% - 120px);
  220. }
  221. }
  222. .online {
  223. width: 100%;
  224. .el-select {
  225. width: calc(100% - 120px);
  226. }
  227. span {
  228. vertical-align: top;
  229. }
  230. .el-textarea {
  231. width: calc(100% - 120px);
  232. }
  233. .tree {
  234. width: calc(50% - 60px);
  235. display: inline-block;
  236. margin-right: 20px;
  237. height: 300px;
  238. overflow-y: scroll;
  239. .el-icon-error {
  240. float: right;
  241. font-size: 20px;
  242. margin-top: 9px;
  243. cursor: pointer;
  244. }
  245. }
  246. .treeUser {
  247. margin: 0;
  248. border: 1px solid #ddd;
  249. p {
  250. background: #f4f4f4;
  251. padding: 0 20px;
  252. margin-bottom: 5px;
  253. }
  254. }
  255. .treeUserb {
  256. width: calc(100% - 100px);
  257. border: 1px solid #ddd;
  258. background: #f4f4f4;
  259. border-radius: 3px;
  260. height: auto;
  261. overflow: hidden;
  262. p {
  263. display: inline-block;
  264. padding: 0 20px;
  265. margin-bottom: 5px;
  266. }
  267. }
  268. }
  269. .adv-type {
  270. margin-top: 20px;
  271. display: flex;
  272. justify-content: space-between;
  273. flex-wrap: wrap;
  274. // border: 1px solid #ddd;
  275. border-radius: 5px;
  276. padding: 20px;
  277. box-shadow: 0 2px 12px 0 rgba(0, 0, 0, .1);
  278. div {
  279. width: 33%;
  280. text-align: center;
  281. height: 80px;
  282. overflow: hidden;
  283. min-width: 100px;
  284. cursor: pointer;
  285. padding-top: 10px;
  286. margin: 10px 0;
  287. }
  288. div:hover {
  289. background: #CFE8FC;
  290. border-radius: 5px;
  291. }
  292. span {
  293. width: 100%;
  294. display: inline-block;
  295. height: 40px;
  296. // line-height: 40px;
  297. i {
  298. color: #0074D9;
  299. font-size: 36px;
  300. }
  301. }
  302. }
  303. </style>