ywStanding.vue 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349
  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. <el-button
  8. class="btn-check"
  9. size="medium"
  10. type="primary"
  11. @click="outlist"
  12. >导出
  13. </el-button>
  14. </div>
  15. <div class="tabbox">
  16. <el-table
  17. height="calc(100% - 40px)"
  18. class="com-table"
  19. ref="multipleTable"
  20. :data="tableData"
  21. tooltip-effect="dark"
  22. size="small"
  23. border
  24. style="width: 100%"
  25. >
  26. <el-table-column prop="demandName" label="需求名称">
  27. </el-table-column>
  28. <el-table-column prop="groupName" label="提出部门/地市">
  29. </el-table-column>
  30. <el-table-column prop="busiStartTime" label="时间段">
  31. <template slot-scope="scope">
  32. {{ scope.row.busiStartTime + "~" + scope.row.busiEndTime }}
  33. </template>
  34. </el-table-column>
  35. <el-table-column prop="status" label="状态"> </el-table-column>
  36. <el-table-column prop="support" label="支撑方"> </el-table-column>
  37. <el-table-column prop="workload" label="工作量"> </el-table-column>
  38. </el-table>
  39. <el-pagination
  40. class="pageBox"
  41. @current-change="currchange"
  42. layout="prev, pager, next"
  43. background
  44. :total="total"
  45. >
  46. </el-pagination>
  47. </div>
  48. </div>
  49. </fullscreen>
  50. </template>
  51. <script>
  52. import mySearch from "../../../components/search.vue";
  53. import toolList from "../../../components/toolList.vue";
  54. export default {
  55. components: {
  56. mySearch,
  57. toolList,
  58. },
  59. data() {
  60. return {
  61. searchList: [
  62. {
  63. type: "input",
  64. tit: "需求名称",
  65. value: "",
  66. width: "23%",
  67. },
  68. {
  69. type: "input",
  70. tit: "部门或地市",
  71. value: "",
  72. width: "23%",
  73. },
  74. {
  75. type: "date",
  76. tit: "开始时间",
  77. value: "",
  78. width: "23%",
  79. },
  80. {
  81. type: "date",
  82. tit: "结束时间",
  83. value: "",
  84. width: "23%",
  85. },
  86. ],
  87. tooltit: "线上业务需求台账",
  88. fullscreen: false,
  89. total: 0,
  90. page: 1,
  91. pageSize: 10,
  92. tableData: [],
  93. dialogStatus: false,
  94. disableStatus: false,
  95. titname: "终端",
  96. infolist: {},
  97. typeOptions: [
  98. {
  99. dataCode: 1,
  100. dataName: 111,
  101. },
  102. ],
  103. userInfo: {},
  104. params: {},
  105. infoApply: [],
  106. };
  107. },
  108. methods: {
  109. //搜索数据
  110. searchInfo(v) {
  111. this.params = {};
  112. v[0] ? (this.params.demandName = v[0]) : "";
  113. v[1] ? (this.params.deptOrCity = v[1]) : "";
  114. v[2]
  115. ? (this.params.startTime = this.$formatDate(v[2], "YYYY-MM-DD"))
  116. : "";
  117. v[3] ? (this.params.endTime = this.$formatDate(v[3], "YYYY-MM-DD")) : "";
  118. this.handleInit();
  119. },
  120. // 初始化列表
  121. handleInit() {
  122. this.$http({
  123. url: "/market/mkOnlineChannel/ledgerList",
  124. method: "post",
  125. headers: {
  126. "Content-Type": "application/json",
  127. },
  128. data: {
  129. ...this.params,
  130. page: this.page,
  131. pageSize: this.pageSize,
  132. },
  133. }).then(
  134. ({
  135. data: {
  136. body: { data, count },
  137. },
  138. }) => {
  139. this.total = count;
  140. this.tableData = data;
  141. this.total = count;
  142. }
  143. );
  144. },
  145. outlist() {
  146. // let data = {
  147. // colStr:
  148. // "demandName,deptName,busiStartTime,busiEndTime,factoryName,workLoad",
  149. // fileName: "台账.xlsx",
  150. // tital: [
  151. // [
  152. // {
  153. // colNum: "0",
  154. // colSpan: "0",
  155. // rowSpan: "1",
  156. // val: "需求名称",
  157. // },
  158. // {
  159. // colNum: "1",
  160. // colSpan: "0",
  161. // rowSpan: "1",
  162. // val: "提出部门",
  163. // },
  164. // {
  165. // colNum: "2",
  166. // colSpan: "0",
  167. // rowSpan: "1",
  168. // val: "开始时间",
  169. // },
  170. // {
  171. // colNum: "3",
  172. // colSpan: "0",
  173. // rowSpan: "1",
  174. // val: "结束时间",
  175. // },
  176. // {
  177. // colNum: "4",
  178. // colSpan: "0",
  179. // rowSpan: "1",
  180. // val: "支撑方",
  181. // },
  182. // {
  183. // colNum: "5",
  184. // colSpan: "0",
  185. // rowSpan: "1",
  186. // val: "工作量",
  187. // },
  188. // ],
  189. // ],
  190. // };
  191. // // data.tital = JSON.stringify(data.tital)
  192. this.$http({
  193. url: "/market/mkOnlineChannel/exportLedger",
  194. method: "post",
  195. headers: {
  196. "Content-Type": "application/json",
  197. },
  198. responseType: "blob",
  199. data: this.params,
  200. }).then((response) => {
  201. if (window.navigator && window.navigator.msSaveOrOpenBlob) {
  202. let blob = new Blob([response.data], {
  203. type: "application/vnd.ms-excel",
  204. });
  205. window.navigator.msSaveOrOpenBlob(
  206. blob,
  207. new Date().getTime() + ".xlsx"
  208. );
  209. } else {
  210. /* 火狐谷歌的文件下载方式 */
  211. var blob = new Blob([response.data]);
  212. var downloadElement = document.createElement("a");
  213. var href = window.URL.createObjectURL(blob);
  214. downloadElement.href = href;
  215. downloadElement.download = new Date().getTime() + ".xlsx";
  216. document.body.appendChild(downloadElement);
  217. downloadElement.click();
  218. document.body.removeChild(downloadElement);
  219. window.URL.revokeObjectURL(href);
  220. }
  221. });
  222. },
  223. // 分页
  224. currchange(v) {
  225. this.page = v;
  226. this.handleInit();
  227. },
  228. //获取列表
  229. getList(v, n) {
  230. v.sts = 1;
  231. this.pageSize = n;
  232. let _this = this;
  233. this.$http({
  234. url: "/market/cChannelDemand/queryPage",
  235. method: "post",
  236. headers: {
  237. "Content-Type": "application/json",
  238. page: '{"pageNo":"' + n + '","pageSize":"10"}',
  239. },
  240. data: v,
  241. }).then((res) => {
  242. this.tableData = res.data.data;
  243. this.total = res.data.totalRecord;
  244. });
  245. },
  246. //功能栏
  247. iconCli(v) {
  248. if (v === 1) {
  249. this.handleInit();
  250. }
  251. if (v === 2) {
  252. this.fullscreen = !this.fullscreen;
  253. }
  254. },
  255. // =======================
  256. getUser() {
  257. this.userInfo = JSON.parse(window.sessionStorage.userInfo);
  258. this.infolist = {
  259. opNo: "",
  260. opName: "",
  261. };
  262. this.infolist.opNo = this.userInfo.loginNo;
  263. this.infolist.opName = this.userInfo.loginName;
  264. },
  265. },
  266. mounted() {
  267. // this.getList({}, 1);
  268. this.handleInit();
  269. this.getUser();
  270. },
  271. created() {},
  272. };
  273. </script>
  274. <style scoped lang="scss">
  275. .onetab {
  276. margin-bottom: 20px;
  277. padding: 0 20px;
  278. }
  279. .titbox {
  280. div {
  281. float: right;
  282. i {
  283. font-size: 22px;
  284. margin-left: 20px;
  285. cursor: pointer;
  286. }
  287. }
  288. }
  289. .tabbox {
  290. margin-top: 15px;
  291. }
  292. .pageBox {
  293. text-align: right;
  294. margin-top: 10px;
  295. }
  296. .info-line {
  297. width: 100%;
  298. display: block;
  299. padding-left: 20px;
  300. div {
  301. width: 50%;
  302. display: inline-block;
  303. }
  304. span {
  305. width: 80px;
  306. display: inline-block;
  307. text-align: left;
  308. i {
  309. color: red;
  310. display: inline-block;
  311. padding-right: 5px;
  312. }
  313. }
  314. .el-select,
  315. .el-input {
  316. width: calc(100% - 100px);
  317. }
  318. }
  319. .online {
  320. width: 100%;
  321. .el-select {
  322. width: calc(100% - 100px);
  323. }
  324. span {
  325. vertical-align: top;
  326. }
  327. .el-textarea {
  328. width: calc(100% - 100px);
  329. }
  330. }
  331. </style>