liding
2 天以前 78f67775cd8d880dacd5e8d5be6e17cc9fcbf77c
src/views/basicData/parameterMaintenance/index.vue
@@ -50,7 +50,7 @@
                      prop="paramCode">
          <el-input v-model="formData.paramCode"
                    disabled
                    placeholder="自动生成" />
                    placeholder="保存后自动生成" />
        </el-form-item>
        <el-form-item label="参数名称"
                      prop="paramName">
@@ -82,6 +82,14 @@
                       value="2" />
          </el-select>
        </el-form-item> -->
        <el-form-item label="创建时间"
                      prop="createTime">
          <el-date-picker v-model="formData.createTime"
                          type="date"
                          placeholder="选择日期"
                          value-format="YYYY-MM-DD"
                          style="width: 100%" />
        </el-form-item>
        <el-form-item label="单位"
                      prop="unit">
          <el-input v-model="formData.unit"
@@ -142,9 +150,8 @@
      </el-form>
      <template #footer>
        <span class="dialog-footer">
          <el-button type="primary" @click="handleSubmit">确定</el-button>
          <el-button @click="dialogVisible = false">取消</el-button>
          <el-button type="primary"
                     @click="handleSubmit">确定</el-button>
        </span>
      </template>
    </el-dialog>
@@ -342,6 +349,7 @@
    remark: "",
    isRequired: 0,
    paramFormat: "",
    createTime: "",
  });
  const rules = reactive({
    paramName: [{ required: true, message: "请输入参数名称", trigger: "blur" }],
@@ -520,6 +528,7 @@
    formData.unit = "";
    formData.remark = "";
    formData.isRequired = 0;
    formData.createTime = new Date().toISOString().split("T")[0];
    dialogVisible.value = true;
  };
@@ -566,6 +575,10 @@
  // 提交表单
  const handleSubmit = () => {
    if (formData.paramType == 3 && !formData.paramFormat) {
      ElMessage.warning("下拉字典不能为空!");
      return;
    }
    formRef.value.validate(valid => {
      if (valid) {
        if (formData.id) {