userCenterMyFeedBackService.vue 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490
  1. <template>
  2. <div style="width: 100%;background: #fff;min-height: 700px;"
  3. class="userCenterMyProject">
  4. <div style="height: 60px;line-height: 60px;padding-top: 30px;margin-left: 30px;margin-right: 30px; border-bottom: 1px solid rgba(228, 228, 228, 1);">
  5. {{$t('common.MyFeetBack')}}
  6. </div>
  7. <!-- <div style="margin: 20px 0 0px 30px;"-->
  8. <!-- v-if="$i18n.locale=='zh'">-->
  9. <!-- <span v-for="(item,index) in taberPhone"-->
  10. <!-- style="margin-right: 70px;padding: 10px;"-->
  11. <!-- :class="item.value==taberIndex?'taberPhone1 cursor':'taberPhone2 cursor'"-->
  12. <!-- @click="getTaberPhone(item,index)">{{$t(item.label)}}</span>-->
  13. <!-- </div>-->
  14. <!-- <div style="margin: 20px 0 0px 30px;"-->
  15. <!-- v-else>-->
  16. <!-- <span v-for="(item,index) in taberPhone"-->
  17. <!-- style="margin-right: 40px;padding: 10px;"-->
  18. <!-- :class="item.value==taberIndex?'taberPhone1 cursor':'taberPhone2 cursor'"-->
  19. <!-- @click="getTaberPhone(item,index)"-->
  20. <!-- :style="{marginRight:index==4?'0':'40px'}">{{$t(item.label)}}</span>-->
  21. <!-- </div>-->
  22. <div style="margin: 20px 0 0px 30px;">
  23. <el-table :data="tableData"
  24. stripe
  25. highlight-current-row
  26. @row-click="toLook"
  27. class="projectName"
  28. style="width: 100%">
  29. <template slot="empty">
  30. {{$t('common.UserNoData')}}
  31. </template>
  32. <el-table-column type="index" fixed :label="$t('common.serialNumber')" width="80"> </el-table-column>
  33. <el-table-column prop="suggestion" :label="$t('common.SuggestedType')" width='200'> </el-table-column>
  34. <el-table-column prop="status" :label="$t('common.Status')" width='320'> </el-table-column>
  35. <el-table-column prop="report" :label="$t('common.ContentFeedback')" width='320'> </el-table-column>
  36. <el-table-column prop="answer" :label="$t('common.ReplyContent')" width='320'> </el-table-column>
  37. <!-- <el-table-column :prop="senderDate" :formatter="dateFormat" :label="$t('common.ConsultationTime')" width="150"></el-table-column>-->
  38. <!-- <el-table-column fixed="right" prop="adddress5" :label="$t('common.Option')" width="210">-->
  39. <!-- <template slot-scope="scope">-->
  40. <!-- <el-button-->
  41. <!-- @click="change(scope.row)"-->
  42. <!-- @click.stop-->
  43. <!-- v-if="scope.row.consultMessageInfo"-->
  44. <!-- type="text"-->
  45. <!-- size="small"-->
  46. <!-- >-->
  47. <!-- {{$t('common.check')}}-->
  48. <!-- </el-button>-->
  49. <!-- <el-button-->
  50. <!-- @click.native.prevent="deleteRow(scope.$index, tableData)"-->
  51. <!-- @click.stop-->
  52. <!-- type="text"-->
  53. <!-- size="small">-->
  54. <!-- {{$t('common.Delete')}}-->
  55. <!-- </el-button>-->
  56. <!-- </template>-->
  57. <!-- </el-table-column>-->
  58. </el-table>
  59. <div style="width: 100%;text-align: center;">
  60. <el-pagination
  61. style="margin-top: 50px;height: 80px;"
  62. background
  63. layout="prev, pager, next"
  64. :total=totalCount @size-change="handleSizeChange"
  65. @current-change="handleCurrentChange">
  66. </el-pagination>
  67. </div>
  68. <!-- <el-dialog-->
  69. <!-- v-if="row.consultMessageInfo"-->
  70. <!-- :title="$t('common.IntentionConsultation')"-->
  71. <!-- :visible.sync="dialogVisible"-->
  72. <!-- width="30%"-->
  73. <!-- :before-close="handleClose">-->
  74. <!-- <div style="padding: 0 20px;">-->
  75. <!-- <div class="consultTitle">-->
  76. <!-- <span>{{projectName}}</span>-->
  77. <!-- </div>-->
  78. <!-- <div style="border-bottom:1px solid #dfdfdf">-->
  79. <!-- <div style="margin-top:24px;">-->
  80. <!-- <div style="display:inline-block;background:#0091ff;width:20px;height:20px;color:#fff;line-height:20px;border-radius:50%;text-align:center">Q</div>-->
  81. <!-- <span style="color:#0091ff;margin-left:10px">{{$t('common.qustion')}}:</span>-->
  82. <!-- </div>-->
  83. <!-- <p v-html="row.content"></p>-->
  84. <!-- <span style="float:right;margin-bottom:20px">{{$t('common.qustionTime')}}:{{dateFormat(row)}}</span>-->
  85. <!-- <div style="clear:both"></div>-->
  86. <!-- </div>-->
  87. <!-- <div>-->
  88. <!-- <div style="margin-top:24px;">-->
  89. <!-- <div style="display:inline-block;background:#6dd400;width:20px;height:20px;color:#fff;line-height:20px;border-radius:50%;text-align:center">A</div>-->
  90. <!-- <span style="color:#6dd400;margin-left:10px">{{$t('common.replyMessage')}}</span>-->
  91. <!-- </div>-->
  92. <!-- <p v-html="row.consultMessageInfo.content"></p>-->
  93. <!-- <span style="float:right;margin-bottom:20px">{{$t('common.replyMessageTime')}}:{{dateFormat(row)}}</span>-->
  94. <!-- <div style="clear:both"></div>-->
  95. <!-- </div>-->
  96. <!-- </div>-->
  97. <!-- </el-dialog>-->
  98. </div>
  99. </div>
  100. </template>
  101. <script>
  102. import Base from "@/views/base/Base"
  103. import { getDicts } from '@/api/dict';
  104. import {getReport} from "@/api/operation/feedback/feedback";
  105. import moment from 'moment'
  106. import { getToken,resetToken } from '@/utils/auth'
  107. import Bus from "@/api/bus";
  108. export default {
  109. name: 'userCenterMyFeedBackService',
  110. extends: Base,
  111. data () {
  112. return {
  113. formInline: {
  114. user: '',
  115. region: ''
  116. },
  117. taberPhone: [{
  118. label: "common.IntentionConsultation",
  119. value: '1'
  120. }, {
  121. label: "common.thinkTankConsultation",
  122. value: '6'
  123. }],
  124. taberIndex: '',
  125. suggestionDicts:[],
  126. statusDicts:[],
  127. // baseMemberApplies: [],
  128. // coopCustomServices: [],
  129. // resourceApplications: [],
  130. // memberApplyStatus: [],
  131. // serviceTypeDicts: [],
  132. // childTypeDicts: [],
  133. // supportWayDicts: [],
  134. // phaseDicts: [],
  135. // statusDicts: [],
  136. phaseDictsEnMap: {
  137. '1': 'Fill in the information',
  138. '2': 'Preliminary review',
  139. '3': 'Approval by the Chairman Office Meeting',
  140. '4': 'Qualification',
  141. '5': 'Membership confirmation',
  142. '6': 'Issue the certificate',
  143. '7': 'Complete'
  144. },
  145. memberApplyStatusEnMap: {
  146. '1': 'Not audit',
  147. '2': 'To audit',
  148. '3': 'Approved',
  149. '4': 'Rejected',
  150. },
  151. customServiceMap: {
  152. '0': 'Draft',
  153. '1': 'To audit',
  154. '2': 'Rejected',
  155. '3': 'Approved'
  156. },
  157. auditStatusDicts: [],
  158. auditStatusDictsENMap: {
  159. '1': 'Have not been submitted',
  160. '2': 'To audit',
  161. '3': 'First approval rejected',
  162. '4': 'First approval agreed',
  163. '5': 'Second approval is rejected',
  164. '6': 'Second approval is agreed',
  165. },
  166. // baseLeagueApplies: [],
  167. // releaseStatus: [],
  168. // thinkTankConsultations: [],
  169. // thinkTankTypeDicts: [],
  170. tableData: [],
  171. dialogVisible:false,
  172. dialogVisible1:false,
  173. projectName: "",
  174. totalCount:0,
  175. totalCount1:0,
  176. row:{},
  177. rowConsultations: {},
  178. param: {
  179. pageNo:0,
  180. pageSize:10,
  181. language:'',
  182. },
  183. items: {
  184. pageNo:0,
  185. pageSize:10,
  186. }
  187. }
  188. },
  189. watch: {
  190. '$i18n.locale' () {
  191. this.getDicts()
  192. this.getinitData(this.taberIndex);
  193. },
  194. 'taberIndex' () {
  195. this.getinitData(this.taberIndex);
  196. }
  197. },
  198. mounted () {
  199. this.taberIndex = this.$route.params.index ? this.$route.params.index : '1'
  200. this.getDicts()
  201. },
  202. computed: {
  203. suggestionMap:function(){
  204. return this.suggestionDicts.array2Obj("value","label");
  205. }
  206. },
  207. methods: {
  208. getDicts () {
  209. if (this.$i18n.locale === 'zh') {
  210. getDicts("SUGGESTION_DICT").then(result => {
  211. var stautusZH =[{
  212. label:"未处理",
  213. value:null
  214. },
  215. {
  216. label: "已处理",
  217. value: "1"
  218. }
  219. ]
  220. if (result.data) {
  221. this.suggestionDicts = result.data[0];
  222. this.statusDicts=stautusZH
  223. this.tableData.forEach((i) => {
  224. this.suggestionDicts.forEach((v) =>{
  225. if (i.suggestion==v.value){
  226. i.suggestion=v.label
  227. }
  228. } )
  229. this.statusDicts.forEach((v) =>{
  230. if (i.status==v.value){
  231. i.status=v.label
  232. }
  233. } )
  234. })
  235. }
  236. });
  237. } else {
  238. getDicts("SUGGESTION_DICT_EN").then(result => {
  239. var stautusEN=[
  240. {
  241. label:" Unprocessed",
  242. value:null
  243. },
  244. {
  245. label: "Processed",
  246. value: "1"
  247. }
  248. ]
  249. if (result.data) {
  250. this.suggestionDicts = result.data[0];
  251. this.statusDicts=stautusEN
  252. this.tableData.forEach((i) => {
  253. this.suggestionDicts.forEach((v) =>{
  254. if (i.suggestion==v.value){
  255. i.suggestion=v.label
  256. }
  257. } )
  258. this.statusDicts.forEach((v) =>{
  259. if (i.status==v.value){
  260. i.status=v.label
  261. }
  262. } )
  263. })
  264. }
  265. });
  266. }
  267. console.log(this.suggestion)
  268. },
  269. getFeedBack(){
  270. let token = getToken();
  271. this.tableData = []
  272. this.param.language = this.$i18n.locale.toUpperCase();
  273. getReport(this.param,token).then(res=>{
  274. this.tableData=res.data.feedbacks;
  275. this.totalCount=res.data.page.totalCount-0;
  276. this.resetToken();
  277. this.getDicts();
  278. })
  279. },
  280. dateFormat(row) {
  281. return moment(row.senderDate).format('YYYY-MM-DD');
  282. },
  283. getinitData (index) {
  284. this.getFeedBack();
  285. // if (index == "1") {
  286. // this.getReply()
  287. // }
  288. //
  289. //
  290. // if (index == "6") {
  291. // this.getThinkTankConsultations();
  292. // }
  293. },
  294. // changeToAlliance (index, rows) {
  295. // this.$router.push('userCentermyConcernsProgressCheckAlliance', rows)
  296. // },
  297. // handleCurrentChange(val) {
  298. // this.param.pageNo=val;
  299. // this.getReply()
  300. //
  301. // },
  302. // getTaberPhone (item, index) {
  303. // this.taberIndex = item.value
  304. // console.log(this.taberIndex)
  305. // },
  306. // handleCurrentChange1 (val) {
  307. // this.item.pageNo=val;
  308. // this.getThinkTankConsultations();
  309. // },
  310. YymmddFormat (newDate) {
  311. let Month = newDate.getMonth() + 1;
  312. Month = Month >= 10 ? Month : '0' + Month;
  313. let d = newDate.getDate();
  314. d = d >= 10 ? d : '0' + d
  315. return [
  316. [newDate.getFullYear(), Month, d].join('-'), [newDate.getHours(), newDate.getMinutes()].join(':')
  317. ].join(' ');
  318. },
  319. // edit (row) {
  320. // console.log(row);
  321. // this.$router.push({ name: 'IntroductionMemberProfile', query: { data: row, key: 'custom', index: this.taberIndex } })
  322. // },
  323. // toApply (row) {
  324. // console.log(row);
  325. // this.$router.push({ name: 'resourceSharingResourceApply', query: { key: row.id } })
  326. // },
  327. // toLook (row) {
  328. // this.toView('projectPresentationDetails',row.columnCode)
  329. // },
  330. toView(router, json) {
  331. window.localStorage.setItem('router', '');
  332. this.$store.commit('modify', router);
  333. Bus.$emit("router", router); //存 Bus.$emit
  334. const { href } =this.$router.resolve({
  335. name: router,
  336. query: {
  337. key: json,
  338. }
  339. });
  340. window.open(href, '_blank');
  341. },
  342. toDel (row) {
  343. let params = {
  344. id: row.id
  345. }
  346. this.$confirm(this.$i18n.locale === 'zh' ? '确定删除?' : 'Are you sure you want to delete?', this.$t('common.Tips'), {
  347. confirmButtonText: this.$t('common.OK'),
  348. cancelButtonText: this.$t('common.cancel'),
  349. type: 'warning'
  350. }).then(() => {
  351. deleteByDoor(params).then(result => {
  352. this.$message({
  353. type: 'success',
  354. message: this.$i18n.locale === 'zh' ? '删除成功!' : 'Successfully deleted'
  355. });
  356. this.getDicts()
  357. })
  358. }).catch(() => {
  359. this.$message({
  360. type: 'info',
  361. message: this.$t('common.Cancelled'),
  362. });
  363. });
  364. },
  365. del (row, index) {
  366. this.$confirm(this.$i18n.locale === 'zh' ? '确定删除?' : 'Are you sure you want to delete?', this.$t('common.Tips'), {
  367. confirmButtonText: this.$t('common.OK'),
  368. cancelButtonText: this.$t('common.cancel'),
  369. type: 'warning'
  370. }).then(() => {
  371. del(row.id).then(() => {
  372. this.$message({
  373. type: 'success',
  374. message: this.$i18n.locale === 'zh' ? '删除成功!' : 'Successfully deleted'
  375. });
  376. })
  377. this.getinitData(index);
  378. })
  379. .catch(() => {
  380. this.$message({
  381. type: "info",
  382. message: this.$t('common.Cancelled'),
  383. });
  384. });
  385. },
  386. view (row) {
  387. this.$router.push({ name: 'IntroductionMemberProfile', query: { data: row, key: 'custom', disable: true, index: this.taberIndex } })
  388. },
  389. commit(row) {
  390. this.$confirm(this.$i18n.locale === 'zh' ? '确定提交?' : 'Are you sure you want to commit?', this.$t('common.Tips'), {
  391. confirmButtonText: this.$t('common.OK'),
  392. cancelButtonText: this.$t('common.cancel'),
  393. type: 'warning'
  394. }).then(() => {
  395. commit(row.id).then(() => {
  396. this.$message({
  397. type: 'success',
  398. message: this.$i18n.locale === 'zh' ? '提交成功!' : 'Commit Successfully'
  399. });
  400. this.getThinkTankConsultations();
  401. })
  402. })
  403. .catch(() => {
  404. });
  405. },
  406. toDelThink(row) {
  407. this.$confirm(this.$i18n.locale === 'zh' ? '确定删除?' : 'Are you sure you want to delete?', this.$t('common.Tips'), {
  408. confirmButtonText: this.$t('common.OK'),
  409. cancelButtonText: this.$t('common.cancel'),
  410. type: 'warning'
  411. }).then(() => {
  412. deleteTo(row.id).then(() => {
  413. this.$message({
  414. type: 'success',
  415. message: this.$i18n.locale === 'zh' ? '删除成功!' : 'Successfully Deleted'
  416. });
  417. this.getThinkTankConsultations();
  418. })
  419. })
  420. .catch(() => {
  421. });
  422. },
  423. toLookReply(row) {
  424. this.rowConsultations = row;
  425. this.dialogVisible1=true;
  426. },
  427. handleSizeChange(){},
  428. handleSizeChange1(){}
  429. }
  430. }
  431. </script>
  432. <style scoped>
  433. .el-input {
  434. width: 200px;
  435. }
  436. .el-form-item__content,
  437. .el-select {
  438. width: 200px !important;
  439. }
  440. .el-table thead {
  441. background: #eee;
  442. }
  443. .userCenterMyProject >>> .el-pagination .el-pager li,
  444. .userCenterMyProject >>> .el-pagination .btn-next,
  445. .userCenterMyProject >>> .el-pagination .btn-prev {
  446. width: 35px;
  447. height: 35px;
  448. line-height: 35px;
  449. }
  450. .userCenterMyProject
  451. >>> .el-pagination.is-background
  452. .el-pager
  453. li:not(.disabled).active {
  454. background: #0050d8;
  455. }
  456. .taberPhone1 {
  457. border-bottom: 2px solid #0c5afa;
  458. color: #0c5afa;
  459. }
  460. .el-table_body{
  461. color: red;
  462. }
  463. .projectName >>> .el-table__row td:nth-of-type(2){
  464. color: #0a0000af !important;
  465. }
  466. .projectName >>> .hover-row td:nth-of-type(2){
  467. color: #0079ef !important;
  468. }
  469. /* .projectName >>> .el-table__row td:nth-of-type(2){
  470. color: red ;
  471. } */
  472. .projectName >>> .el-table__row td:nth-of-type(2) .cell{
  473. cursor: pointer;
  474. }
  475. </style>