configure.vue 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  1. <template>
  2. <view class="configure-page">
  3. <view class="greyTitle">为结果选项配置后续操作</view>
  4. <view v-for="(item,index) in resultConfigList" :key="index" class="configure-cont">
  5. <text class="contTitle">{{item.name}}</text>
  6. <text class="contCont" v-for="items in configList" v-if="item.resultType == items.key">{{items.name}}</text>
  7. <image src="../../static/查看更多_.png" class="moreImg" @click="showConfig(item,index)"></image>
  8. </view>
  9. <view class="sure-button">
  10. <button @click="sureList">保存</button>
  11. </view>
  12. <view class="recovery" @click="recoveryList">恢复初始配置</view>
  13. <tm-tabbar :permission="1" />
  14. </view>
  15. </template>
  16. <script>
  17. export default {
  18. data() {
  19. return {
  20. resultConfigList:[],
  21. configList:[
  22. {
  23. key:'1',
  24. name:'无需操作',
  25. },{
  26. key:'2',
  27. name:'需改善回复',
  28. },{
  29. key:'3',
  30. name:'需使用改善工具',
  31. }
  32. ],
  33. showPopup:false,
  34. radioVal:null,
  35. index:null,
  36. }
  37. },
  38. created() {
  39. this.getResultConfig()
  40. },
  41. methods: {
  42. //获取最新配置
  43. getResultConfig(){
  44. this.$store.dispatch({
  45. type:'configure/commActions',
  46. payload:{
  47. key:'getResultConfig'
  48. }
  49. }).then(res=>{
  50. this.resultConfigList = res?res:[];
  51. })
  52. },
  53. //恢复最初配置
  54. recoveryList(){
  55. this.$store.dispatch({
  56. type:'configure/commActions',
  57. payload:{
  58. key:'getDefault'
  59. }
  60. }).then((res)=>{
  61. // console.log(res)
  62. // this.resultConfigList = res?res:[];
  63. })
  64. },
  65. //保存配置
  66. sureList(){
  67. this.$store.dispatch({
  68. type:'configure/commActions',
  69. payload:{
  70. key:'postResultConfig',
  71. data:{
  72. list:this.resultConfigList
  73. }
  74. }
  75. }).then(res=>{
  76. // console.log(res,'kkkk')
  77. this.getResultConfig();
  78. // this.resultConfigList = res?res:[];
  79. })
  80. }
  81. },
  82. components: {
  83. }
  84. }
  85. </script>
  86. <style lang="less">
  87. .configure-page{
  88. height: 100%;
  89. background-color: #F5F6FA;
  90. .greyTitle{
  91. padding-left:25rpx;
  92. height: 105rpx;
  93. line-height: 105rpx;
  94. font-size: 30rpx;
  95. color: #292C33;
  96. }
  97. .configure-cont{
  98. padding-left:25rpx;
  99. font-size: 22.5rpx;
  100. line-height: 87.5rpx;
  101. border-bottom: 0.62rpx solid #DADEE6;
  102. background-color: #fff;
  103. .contTitle{
  104. display: inline-block;
  105. width: 175rpx;
  106. color: #525866;
  107. }
  108. .contCont{
  109. color: #292C33;
  110. }
  111. .moreImg{
  112. margin-top: 31.23rpx;
  113. margin-right: 18.68rpx;
  114. padding: 1.89rpx 6.31rpx;
  115. float: right;
  116. width: 12.37rpx;
  117. height: 21.21rpx;
  118. }
  119. }
  120. .configure-cont:nth-child(6){
  121. border-bottom: none;
  122. }
  123. .sure-button{
  124. margin: 35rpx auto;
  125. button{
  126. width: 625rpx;
  127. height: 62.5rpx;
  128. line-height: 62.5rpx;
  129. border-radius: 37.5rpx;
  130. background-color: #3377FF;
  131. color: #fff;
  132. font-size: 22.5rpx;
  133. }
  134. }
  135. .recovery{
  136. text-align: center;
  137. color: #7A8599;
  138. font-size: 22.5rpx;
  139. }
  140. }
  141. </style>