<template>
  <div class="detail-wrap">
    <el-form ref="editForm" :model="logicParam">
      <div class="d-header clearfix">
        <div class="fl">
          <i class="el-icon-info" />
          {{ dataId ? $t1("查看逻辑参数") : $t1("新增逻辑参数") }}
        </div>
        <div class="fr">
          <el-button
            type="primary"
            plain
            class="button-sty"
            @click="$baseReload()"
            icon="el-icon-refresh-right"
          >
            {{ $t1("重置") }}
          </el-button>
          <el-button
            type="primary"
            class="button-sty"
            icon="el-icon-check"
            @click="saveData"
            >{{ $t1("保存") }}
          </el-button>
        </div>
      </div>
      <div class="d-cont">
        <div class="d-item">
          <div class="title first">
            <b>{{ $t1("基本信息") }}</b>
          </div>
          <table class="table-detail">
            <tbody>
              <tr>
                <th>
                  <em class="f-red">*</em>
                  {{ $t1("参数编码") }}
                </th>
                <td colspan="5">
                  <el-form-item
                    prop="paramCode"
                    :rules="[{ required: true, trigger: 'blur' }]"
                  >
                    <el-input
                      type="text"
                      autocomplete="off"
                      v-model="logicParam.paramCode"
                      clearable
                    />
                  </el-form-item>
                </td>
              </tr>
              <tr>
                <th>
                  <em class="f-red">*</em>
                  {{ $t1("组织编码") }}
                </th>
                <td colspan="5">
                  <el-form-item
                    prop="paramCompanyCode"
                    :rules="[{ required: true, trigger: 'blur' }]"
                  >
                    <el-input
                      type="text"
                      autocomplete="off"
                      v-model="logicParam.paramCompanyCode"
                      clearable
                    />
                  </el-form-item>
                </td>
                <td colspan="2">
                  <span class="tips_1">{{ $t1('注：多个用逗号","隔开') }}</span>
                </td>
              </tr>
              <tr>
                <th>
                  {{ $t1("参数值") }}
                </th>
                <td colspan="5">
                  <el-form-item
                    prop="paramValue"
                    :rules="[{ required: false, trigger: 'blur' }]"
                  >
                    <el-input
                      type="textarea"
                      :rows="2"
                      :placeholder="$t1('请输入内容')"
                      size="small"
                      v-model="logicParam.paramValue"
                      clearable
                    ></el-input>
                  </el-form-item>
                </td>
              </tr>
              <tr>
                <th>{{ $t1("参数备注") }}</th>
                <td colspan="5">
                  <el-input
                    type="textarea"
                    :rows="2"
                    :placeholder="$t1('请输入内容')"
                    size="small"
                    v-model="logicParam.remark"
                    clearable
                  ></el-input>
                </td>
              </tr>
              <tr>
                <th>{{ $t1("是否启用") }}</th>
                <td>
                  <el-form-item
                    prop="enabled"
                    :rules="[{ required: false, trigger: 'blur' }]"
                  >
                    <el-radio-group v-model="logicParam.enabled">
                      <el-radio :label="true">{{ $t1("启用") }}</el-radio>
                      <el-radio :label="false">{{ $t1("禁用") }}</el-radio>
                    </el-radio-group>
                  </el-form-item>
                </td>
              </tr>
              <tr>
                <th>{{ $t1("创建人") }}</th>
                <td>{{ logicParam.createBy }}</td>
                <th>{{ $t1("创建时间") }}</th>
                <td>{{ logicParam.createDate }}</td>
                <th>{{ $t1("更新人") }}</th>
                <td>{{ logicParam.modifyBy }}</td>
                <th>{{ $t1("更新时间") }}</th>
                <td>{{ logicParam.modifyDate }}</td>
              </tr>
            </tbody>
          </table>
        </div>
      </div>
    </el-form>
  </div>
</template>

<script>
import editMixin from "./mixins/edit.js";
export default {
  mixins: [editMixin],
};
</script>
