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

15
    <c-col :span="24" v-if="!editExtLabel">
zhengxiaokui committed
16
      <el-form-item
17
        :label="`${argadr.title}ID`"
zhengxiaokui committed
18
        :prop="`${argadr.grp}.${argadr.rol}.pts.extkey`"
zhengxiaokui committed
19
        style="width: 100%"
zhengxiaokui committed
20
      >
fukai committed
21 22 23 24 25 26 27 28 29 30 31
        <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`)
            "
            @change="valueChange"
          ></c-input>
          <template slot="footer">
            <c-button
liushikai committed
32
              style="margin:0 10px 0 10;padding: 0 12px;"
fukai committed
33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48
              size="small"
              type="primary"
              icon="el-icon-search"
              @click="onSeainf(`${argadr.grp}.${argadr.rol}.pts.extkey`)"
            >
            </c-button>
            <c-button
              style="margin:0 0"
              size="small"
              type="primary"
              @click="onAplpDet"
            >
              {{ $t('buttons.details') }}
            </c-button>
          </template>
        </c-fullbox>
zhengxiaokui committed
49 50 51
      </el-form-item>
    </c-col>

52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88
    <c-col :span="24" v-else>
      <el-form-item
        :label="`${argadr.title}`"
        :prop="`${argadr.grp}.${argadr.rol}.pts.extkey`"
        style="width: 100%"
      >
        <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`)
            "
            @change="valueChange"
          ></c-input>
          <template slot="footer">
            <c-button
              style="margin:0 10px 0 10;padding: 0 12px;"
              size="small"
              type="primary"
              icon="el-icon-search"
              @click="onSeainf(`${argadr.grp}.${argadr.rol}.pts.extkey`)"
            >
            </c-button>
            <c-button
              style="margin:0 0"
              size="small"
              type="primary"
              @click="onAplpDet"
            >
              {{ $t('buttons.details') }}
            </c-button>
          </template>
        </c-fullbox>
      </el-form-item>
    </c-col>

zhengxiaokui committed
89 90
    <template v-if="!onlySearch">
      <c-col v-if="isAdrblk" :span="24">
zhengxiaokui committed
91
        <el-form-item
zhengxiaokui committed
92 93
          label="名称地址"
          :prop="`${argadr.grp}.${argadr.rol}.pts.adrblk`"
zhengxiaokui committed
94 95
        >
          <c-input
zhengxiaokui committed
96
            type="textarea"
zhengxiaokui committed
97
            :rows="4"
zhengxiaokui committed
98
            v-model="model[argadr.grp][argadr.rol].pts.adrblk"
99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115
            maxlength="150"
            show-word-limit
            placeholder="请输入名称地址"
            :disabled="disabled"
          ></c-input>
        </el-form-item>
      </c-col>
      <c-col v-else-if="!haveAdrLabel" :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="150"
zhengxiaokui committed
116 117
            show-word-limit
            placeholder="请输入名称地址"
zhengxiaokui committed
118
            :disabled="disabled"
zhengxiaokui committed
119 120 121
          ></c-input>
        </el-form-item>
      </c-col>
zhengxiaokui committed
122 123 124
      <template v-else>
        <c-col :span="24">
          <el-form-item
liushikai committed
125
            :label="`${argadr.title}名称`"
liushikai committed
126
            :prop="`${argadr.grp}.${argadr.rol}.namelc`"
zhengxiaokui committed
127 128
          >
            <c-input
liushikai committed
129 130
              type="textarea"
              v-model="model[argadr.grp][argadr.rol].namelc"
zhengxiaokui committed
131 132
              :placeholder="'请输入' + argadr.title + '名称'"
              :disabled="disabled"
liushikai committed
133
              :rows="2"
liushikai committed
134 135
              maxlength="35"
              show-word-limit
zhengxiaokui committed
136 137 138
            ></c-input>
          </el-form-item>
        </c-col>
zhengxiaokui committed
139

zhengxiaokui committed
140 141
        <c-col :span="24">
          <el-form-item
liushikai committed
142
            :label="`${argadr.title}地址`"
liushikai committed
143
            :prop="`${argadr.grp}.${argadr.rol}.adrelc`"
zhengxiaokui committed
144 145
          >
            <c-input
liushikai committed
146
              type="textarea"
liushikai committed
147
              :rows="2"
liushikai committed
148
              v-model="model[argadr.grp][argadr.rol].adrelc"
zhengxiaokui committed
149 150
              :placeholder="'请输入' + argadr.title + '地址'"
              :disabled="disabled"
liushikai committed
151 152
              maxlength="35"
              show-word-limit
zhengxiaokui committed
153 154 155 156
            ></c-input>
          </el-form-item>
        </c-col>
      </template>
zhengxiaokui committed
157
    </template>
zhengxiaokui committed
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
  </div>
</template>
<script>
import Api from "~/service/Api";
import CommonProcess from "~/mixin/CommonProcess";
// 机构信息模块
export default {
  inject: ["root"],
  mixins: [CommonProcess],

  props: {
    model: {
      type: Object,
      default: undefined,
    },
    argadr: {
      type: Object,
      default: function () {
        return {
          title: "", //角色名称
          rol: "", //角色
          grp: "", //所属模块
        };
      },
    },
    disabled: {
zhengxiaokui committed
184
      //名称地址是否灰显
zhengxiaokui committed
185 186 187
      type: Boolean,
      default: false,
    },
zhengxiaokui committed
188 189 190 191 192 193

    isAdrblk: {
      //名称地址是否为大字段
      type: Boolean,
      default: true,
    },
zhengxiaokui committed
194 195 196 197 198 199 200 201 202 203
    onlySearch: {
      //是否只展示extkey
      type: Boolean,
      default: false,
    },
    noRef: {
      //无需参考号
      type: Boolean,
      default: false,
    },
204 205 206 207 208 209 210 211 212 213
    editExtLabel: {
      //自定义ID label
      type: Boolean,
      default: true,
    },
    haveAdrLabel: {
      //有无名称地址 label
      type: Boolean,
      default: true,
    },
zhengxiaokui committed
214 215 216 217 218 219 220 221 222 223 224 225 226 227 228
  },
  data() {
    return {
      data: [],
    };
  },
  watch: {},
  methods: {
    onSeainf(data) {
      this.$emit("onSeainf", data);
    },

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

zhengxiaokui committed
230
    valueChange() {
zhengxiaokui committed
231
      if (this.onlySearch) return;
liushikai committed
232 233 234
      // this.showGridPromptDialog(
      //   `${this.argadr.grp}.${this.argadr.rol}.pts.extkey`
      // );
zhengxiaokui committed
235
    },
zhengxiaokui committed
236
  },
zhengxiaokui committed
237

zhengxiaokui committed
238 239 240 241 242
  created: function () {},
};
</script>
<style>
</style>