Ptap10.vue 2.73 KB
<template>
	<div>
		<el-card class="box-card" :class="[isShowCard ? '' : 'is-show-card']" >
			<c-col :span="24" v-if="isRef">
				<el-form-item 
					:label="label.labelRef" 
					:prop="`${argadr.grp}.${argadr.rol}.pts.extkey`" 
					style="width: 100%"
				>
					<c-input 
						v-model.trim="model[argadr.grp][argadr.rol].pts.extkey" 
						placeholder="" 
						maxlength="16" 
						:disabled="disabledRef"
					>
					</c-input>
				</el-form-item>
			</c-col>
      <c-col :span="24" v-else>
				<el-form-item 
					:label="label.labelRef" 
					:prop="`${argadr.grp}.rec.${refd}`" 
					style="width: 100%"
				>
					<c-input 
						v-model.trim="model[argadr.grp].rec[refd]" 
						placeholder="" 
						maxlength="16" 
						:disabled="disabledRef"
					>
					</c-input>
				</el-form-item>
			</c-col>
			<c-col :span="24">
				<el-form-item 
					:label="label.labelNam"
					:prop="`${argadr.grp}.${argadr.rol}.pts.nam`" 
					style="width: 100%"
				>
					<c-mul-row-input
						type="textarea"
            :rows="rows"
            :cols="cols"
						:charmod="charmod"
						v-model="model[argadr.grp][argadr.rol].pts.nam"
						placeholder=""
						:disabled="disabledNam"
					>
					</c-mul-row-input>
				</el-form-item>
			</c-col>
		</el-card>
	</div>
</template>
<script>
export default {
	inject: ["root"],
  props: {
		model: {
      type: Object,
      default: () => {}
		},
		argadr: {
      type: Object,
      default: function() {
        return {
          rol: "", //角色
          grp: "" //所属模块
        };
      }
    },
    isRef:{
      type:Boolean,
      default: true
    },
    refd:{
      type:String,
      default: ''
    },
		label: {
      type: Object,
      default: function() {
        return {
          labelRef: "", //Ref标题
          labelNam: "" //Nam标题
        };
      }
		},
		charmod: {
      type: Number,
      default: 0
		},
		isShowCard: {
			type: Boolean,
			default: true
		},
    disabledRef: {
      //Ref是否灰显(true:Ref处灰显)
      type: Boolean,
      default: false
    },
    disabledNam: {
      //nam是否灰显(true:nam处灰显)
      type: Boolean,
      default: false
    },
    rows: {
      type: Number,
      default: 4
    },
    cols: {
      type: Number,
      default: 70
    },
  },
  data() {
    return {
    };
  },
  watch: {},
  methods: {},
};
</script>
<style scoped lang="less">
.box-card {
  margin-bottom: 10px;
  /deep/ .el-form-item--mini.el-form-item,
  .el-form-item--small.el-form-item {
    margin-bottom: 10px;
  }
  /deep/ .el-card__body {
    padding: 10px 10px 10px 0px;
  }
}
.is-show-card {
  border: none !important;
  box-shadow: none !important;
  margin-bottom: 0 !important;
  /deep/ .el-card__body {
    padding: 0 !important;
  }
}
</style>