basics.vue 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. <template>
  2. <view class="reset" v-if="ctrlModel.funcname">
  3. <view class="update-line">
  4. <view class="label">
  5. {{ ctrlModel.funcname }}
  6. </view>
  7. <view
  8. class="content"
  9. hover-class="navigator-hover"
  10. @click="onClick(ctrlModel)"
  11. >复位
  12. </view>
  13. </view>
  14. <My_input ref="MyInput" />
  15. </view>
  16. </template>
  17. <script>
  18. export default {
  19. name: "basics",
  20. data() {
  21. return {
  22. ctrlModel: {},
  23. };
  24. },
  25. methods: {
  26. onClick() {
  27. let that = this;
  28. uni.showModal({
  29. title: "提示",
  30. content: "确定复位吗?",
  31. success: ({ confirm }) => {
  32. if (confirm) {
  33. let paramName = that.ctrlModel.paramName;
  34. for (const key in paramName) {
  35. paramName[key] = 0;
  36. }
  37. that.$refs.MyInput.submit(that.ctrlModel.w_functionid, paramName);
  38. }
  39. },
  40. });
  41. },
  42. },
  43. };
  44. </script>
  45. <style lang="scss" scoped>
  46. .reset {
  47. margin-bottom: 12px;
  48. .update-line {
  49. display: flex;
  50. justify-content: space-between;
  51. align-items: center;
  52. .label {
  53. font-size: 3.7333333333333vw;
  54. color: #fff;
  55. font-weight: bold;
  56. text-indent: 1.6vw;
  57. }
  58. .content {
  59. background-color: #004a92;
  60. font-size: 12px;
  61. padding: 4px 8px;
  62. border-radius: 4px;
  63. box-sizing: border-box;
  64. color: #fff;
  65. }
  66. }
  67. }
  68. </style>