recall.vue 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283
  1. <template>
  2. <div class="container" style="margin: 15px 0 0 0">
  3. <fullscreen
  4. :fullscreen.sync="fullscreen"
  5. class="container-box"
  6. style="margin: 0 !important; padding: 0 !important"
  7. >
  8. <div class="titbox">
  9. <h2>绩效回复</h2>
  10. <div>
  11. <i class="el-icon-refresh" @click="iconCli(1)"></i>
  12. <i class="el-icon-full-screen" @click="iconCli(2)"></i>
  13. <!-- <i class="el-icon-folder-opened"></i>-->
  14. <!-- <i class="el-icon-view"></i>-->
  15. <!-- <i class="el-icon-more"></i>-->
  16. </div>
  17. </div>
  18. <div class="search">
  19. <mySearch :searchList="searchList" @searchInfo="searchInfo"></mySearch>
  20. </div>
  21. <div class="tabbox">
  22. <el-table
  23. height="calc(100% - 40px)"
  24. v-loading="loading"
  25. class="com-table"
  26. ref="multipleTable"
  27. :data="tableData"
  28. tooltip-effect="dark"
  29. size="small"
  30. border
  31. style="width: 100%"
  32. >
  33. <el-table-column
  34. align="center"
  35. prop="tabName"
  36. label="绩效模板名称"
  37. show-overflow-tooltip
  38. >
  39. </el-table-column>
  40. <el-table-column
  41. align="center"
  42. prop="kpiTitle"
  43. show-overflow-tooltip
  44. label="绩效标题"
  45. >
  46. </el-table-column>
  47. <!-- <el-table-column
  48. align="center"
  49. prop="sendTime"
  50. show-overflow-tooltip
  51. label="派发时间"
  52. >
  53. </el-table-column> -->
  54. <el-table-column
  55. align="center"
  56. prop="sendName"
  57. show-overflow-tooltip
  58. label="派发人"
  59. >
  60. </el-table-column>
  61. <el-table-column
  62. align="center"
  63. prop="receiveName"
  64. show-overflow-tooltip
  65. label="接收人"
  66. >
  67. </el-table-column>
  68. <!-- <el-table-column
  69. align="center"
  70. prop="requiredTime"
  71. show-overflow-tooltip
  72. label="要求回复时间"
  73. >
  74. </el-table-column> -->
  75. <el-table-column
  76. align="center"
  77. prop="stsDesc"
  78. show-overflow-tooltip
  79. label="任务状态"
  80. >
  81. </el-table-column>
  82. <el-table-column
  83. align="center"
  84. prop="opTime"
  85. show-overflow-tooltip
  86. label="回复时间"
  87. >
  88. </el-table-column>
  89. <!-- <el-table-column
  90. align="center"
  91. prop="overTimeDesc"
  92. show-overflow-tooltip
  93. label="是否超时回复"
  94. >
  95. </el-table-column> -->
  96. <el-table-column
  97. align="center"
  98. width="120"
  99. prop="sts"
  100. label="开启编辑"
  101. >
  102. <template slot-scope="scope">
  103. <el-switch
  104. @click.native="
  105. chenck(scope.row.id, scope.row.sts, scope.row.stsDesc)
  106. "
  107. v-model="scope.row.sts"
  108. active-text="开"
  109. inactive-text="关"
  110. active-value="0"
  111. inactive-value="1"
  112. >
  113. </el-switch>
  114. </template>
  115. </el-table-column>
  116. </el-table>
  117. <el-pagination
  118. class="pageBox"
  119. @current-change="currchange"
  120. layout="prev, pager, next"
  121. background
  122. :total="total"
  123. >
  124. </el-pagination>
  125. </div>
  126. </fullscreen>
  127. </div>
  128. </template>
  129. <script>
  130. import mySearch from "../../../components/search";
  131. export default {
  132. components: {
  133. mySearch,
  134. },
  135. data() {
  136. return {
  137. loginNo: JSON.parse(sessionStorage.userInfo).loginNo,
  138. fullscreen: false,
  139. total: 0,
  140. pageSize: 1,
  141. tableData: [],
  142. searchList: [
  143. // {
  144. // type: "input",
  145. // tit: "预算名称",
  146. // value: "",
  147. // width: "100%",
  148. // options: [],
  149. // },
  150. {
  151. type: "sel",
  152. tit: "回复状态",
  153. value: "",
  154. width: "100%",
  155. options: [
  156. { dataCode: "0", dataName: "待回复" },
  157. { dataCode: "1", dataName: "已回复" },
  158. ],
  159. },
  160. ],
  161. params: {
  162. woNo: "",
  163. sts: "",
  164. },
  165. loading: false,
  166. fileList: [],
  167. fileName: "",
  168. };
  169. },
  170. methods: {
  171. chenck(id, sts, stsDesc) {
  172. this.$http({
  173. url: "/market/kpidept/update",
  174. method: "post",
  175. headers: {
  176. "Content-Type": "application/json",
  177. },
  178. data: { id: id, sts: sts, stsDesc: sts == 0 ? "未回复" : "已回复" },
  179. }).then((res) => {
  180. if (res.data.result == 0) {
  181. this.$message({
  182. message: "操作成功",
  183. type: "success",
  184. });
  185. this.getList(this.params, this.pageSize);
  186. }
  187. });
  188. },
  189. //搜索数据
  190. searchInfo(v) {
  191. // this.params = {};
  192. // v[0] ? (this.params.tabName = v[0]) : "";
  193. // v[1] ? (this.params.sts = v[1]) : "";
  194. v[0] ? (this.params.sts = v[0]) : "";
  195. this.getList(this.params, this.pageSize);
  196. },
  197. //获取列表
  198. getList(v, n) {
  199. this.loading = true;
  200. this.pageSize = n;
  201. this.$http({
  202. url: "/market/kpidept/queryPage",
  203. method: "post",
  204. headers: {
  205. "Content-Type": "application/json",
  206. page: '{"pageNo":"' + n + '","pageSize":"10"}',
  207. },
  208. data: v,
  209. }).then((res) => {
  210. this.loading = false;
  211. this.tableData = res.data.data;
  212. this.total = res.data.totalRecord;
  213. });
  214. },
  215. //功能栏
  216. iconCli(v) {
  217. if (v === 1) {
  218. this.getList(this.params, this.pageSize);
  219. }
  220. if (v === 2) {
  221. this.fullscreen = !this.fullscreen;
  222. }
  223. },
  224. // 分页
  225. currchange(v) {
  226. this.pageSize = v;
  227. this.getList(this.params, this.pageSize);
  228. },
  229. },
  230. mounted() {
  231. if (JSON.stringify(this.$route.query) != "{}") {
  232. this.params.woNo = this.$route.query.id;
  233. }
  234. this.getList(this.params, this.pageSize);
  235. },
  236. watch: {
  237. $route() {
  238. this.getList(this.params, this.pageSize);
  239. },
  240. },
  241. };
  242. </script>
  243. <style scoped>
  244. .el-upload-list {
  245. float: right;
  246. }
  247. .el-input__suffix {
  248. cursor: pointer;
  249. }
  250. .container .el-upload {
  251. width: auto !important;
  252. }
  253. </style>
  254. <style scoped lang="scss">
  255. .btn-default {
  256. display: inline;
  257. margin-left: 10px;
  258. }
  259. .titbox {
  260. margin-bottom: 20px;
  261. div {
  262. float: right;
  263. i {
  264. font-size: 22px;
  265. margin-left: 20px;
  266. cursor: pointer;
  267. }
  268. }
  269. }
  270. .tabbox {
  271. margin-top: 15px;
  272. }
  273. .pageBox {
  274. text-align: right;
  275. margin-top: 10px;
  276. }
  277. </style>