prodnum-MT02.vue 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. <template>
  2. <view>
  3. <view class="control-title">控制面板</view>
  4. <basics ref="basics" />
  5. <division ref="division" />
  6. </view>
  7. </template>
  8. <script>
  9. import basics from "./modules/basics"
  10. import division from "./modules/division"
  11. export default {
  12. name: 'prodnum-MT02',
  13. components: { basics, division },
  14. props: {
  15. control: Object
  16. },
  17. watch: {
  18. control: function (newVal) {
  19. if (newVal) {
  20. try {
  21. this.$refs.basics.ctrlModel = this.__proto__.getControlItem(['Control'], newVal, { Control: "radioNum" })[0];
  22. this.$refs.basics.list = ["MostBad", "FaWei", "NowFlow", "CumFlow"].map(v => newVal.params[v])
  23. switch (this.$refs.basics.ctrlModel.paramValue) {
  24. case '远程不利点模式':
  25. this.$refs.basics.subcontrol = this.__proto__.getControlItem(['Tarb'], newVal)[0];
  26. break;
  27. case '远程开关阀模式':
  28. this.$refs.basics.subcontrol = this.__proto__.getControlItem(['RC'], newVal)[0];
  29. break;
  30. case '恒压控制启动':
  31. this.$refs.basics.subcontrol = this.__proto__.getControlItem(['DownTar'], newVal)[0];
  32. break;
  33. default:
  34. this.$refs.basics.subcontrol = null;
  35. break;
  36. }
  37. } catch (error) {
  38. console.error("MT02控制模式", error)
  39. }
  40. try {
  41. let division = this.$refs.division;
  42. division && division.loadData(newVal)
  43. } catch (error) {
  44. console.error("MT02分时控制", error)
  45. }
  46. } else {
  47. }
  48. }
  49. },
  50. data() {
  51. return {
  52. }
  53. },
  54. }
  55. </script>
  56. <style></style>