Ptap.vue 4.42 KB
Newer Older
1
<template>
吴佳 committed
2
  <div>
3
    <c-col v-if="!noRef" :span="24">
吴佳 committed
4
      <c-form-item
5 6 7 8 9 10 11 12
        :label="`${argadr.title}参考号`"
        :prop="`${argadr.grp}.${argadr.rol}.pts.ref`"
      >
        <c-input
          v-model="model[argadr.grp][argadr.rol].pts.ref"
          :placeholder="'请输入' + argadr.title + '参考号'"
          disabled
        ></c-input>
吴佳 committed
13
      </c-form-item>
14 15
    </c-col>

吴佳 committed
16
    <c-col :span="24">
17 18 19 20 21
      <el-form-item
        :label="`${argadr.title}ID`"
        :prop="`${argadr.grp}.${argadr.rol}.pts.extkey`"
        style="width: 100%"
      >
吴佳 committed
22 23 24 25 26 27 28 29 30 31 32 33
        <c-fullbox>
          <c-input
            v-model="model[argadr.grp][argadr.rol].pts.extkey"
            :placeholder="'请输入' + argadr.title + 'Extkey'"
            @keyup.enter.native="
              showGridPromptDialog(`${argadr.grp}.${argadr.rol}.pts.extkey`)
            "
            disabled
            @change="valueChange"
          ></c-input>
          <template slot="footer">
            <c-button
34
              style="margin:0 10px 0 10px;padding: 0 12px;"
吴佳 committed
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52
              size="small"
              type="primary"
              icon="el-icon-search"
              disabled
              @click="onSeainf(`${argadr.grp}.${argadr.rol}.pts.extkey`)"
            >
            </c-button>
            <c-button
              style="margin:0 0"
              size="small"
              type="primary"
              @click="onAplpDet"
              disabled
            >
              {{ $t('buttons.details') }}
            </c-button>
          </template>
        </c-fullbox>
53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68
      </el-form-item>
    </c-col>

    <template v-if="!onlySearch">
      <c-col v-if="isAdrblk" :span="24">
        <el-form-item
          label="名称地址"
          :prop="`${argadr.grp}.${argadr.rol}.pts.adrblk`"
        >
          <c-input
            type="textarea"
            :rows="4"
            v-model="model[argadr.grp][argadr.rol].pts.adrblk"
            maxlength="35"
            show-word-limit
            placeholder="请输入名称地址"
吴佳 committed
69
            disabled
70 71 72 73 74 75 76 77 78 79 80 81 82
          ></c-input>
        </el-form-item>
      </c-col>
      <template v-else>
        <c-col :span="24">
          <el-form-item
            :label="`${argadr.title}名称`"
            :prop="`${argadr.grp}.${argadr.rol}.namelc`"
          >
            <c-input
              type="textarea"
              v-model="model[argadr.grp][argadr.rol].namelc"
              :placeholder="'请输入' + argadr.title + '名称'"
吴佳 committed
83
              disabled
84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100
              :rows="2"
              maxlength="35"
              show-word-limit
            ></c-input>
          </el-form-item>
        </c-col>

        <c-col :span="24">
          <el-form-item
            :label="`${argadr.title}地址`"
            :prop="`${argadr.grp}.${argadr.rol}.adrelc`"
          >
            <c-input
              type="textarea"
              :rows="2"
              v-model="model[argadr.grp][argadr.rol].adrelc"
              :placeholder="'请输入' + argadr.title + '地址'"
吴佳 committed
101
              disabled
102 103 104 105 106 107 108 109 110 111 112
              maxlength="35"
              show-word-limit
            ></c-input>
          </el-form-item>
        </c-col>
      </template>
    </template>
  </div>
</template>
<script>
import Api from "~/service/Api";
wangren committed
113
import commonProcess from "~/mixin/commonProcess";
114 115 116
// 机构信息模块
export default {
  inject: ["root"],
wangren committed
117
  mixins: [commonProcess],
118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183

  props: {
    model: {
      type: Object,
      default: undefined,
    },
    argadr: {
      type: Object,
      default: function () {
        return {
          title: "", //角色名称
          rol: "", //角色
          grp: "", //所属模块
        };
      },
    },
    disabled: {
      //名称地址是否灰显
      type: Boolean,
      default: false,
    },

    isAdrblk: {
      //名称地址是否为大字段
      type: Boolean,
      default: true,
    },
    onlySearch: {
      //是否只展示extkey
      type: Boolean,
      default: false,
    },
    noRef: {
      //无需参考号
      type: Boolean,
      default: false,
    },
  },
  data() {
    return {
      data: [],
    };
  },
  watch: {},
  methods: {
    onSeainf(data) {
      this.$emit("onSeainf", data);
    },

    onAplpDet() {
      this.$emit("onAplpDet");
    },

    valueChange() {
      if (this.onlySearch) return;
      // this.showGridPromptDialog(
      //   `${this.argadr.grp}.${this.argadr.rol}.pts.extkey`
      // );
    },
  },

  created: function () {},
};
</script>
<style>
</style>