|
|
@@ -14,8 +14,18 @@
|
|
|
>
|
|
|
<el-row>
|
|
|
<el-col :span="24">
|
|
|
- <el-form-item prop="paperTypeName" label="分类名称">
|
|
|
- <el-input v-model="formData.paperTypeName"/>
|
|
|
+ <el-form-item prop="dictName" label="字典名称">
|
|
|
+ <el-input v-model="formData.dictName"/>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="24">
|
|
|
+ <el-form-item prop="dictType" label="字典类型">
|
|
|
+ <el-input v-model="formData.dictType"/>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="24">
|
|
|
+ <el-form-item prop="remark" label="备注">
|
|
|
+ <el-input v-model="formData.remark"/>
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
@@ -32,7 +42,7 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
<script setup lang="ts">
|
|
|
-import {addPaperInfoType, getPaperInfoType, updatePaperInfoType} from "@/api/baseInfo";
|
|
|
+import {addDictType, getDictTypeInfoById, updateDictType} from "@/api/system";
|
|
|
import type {FormInstance} from 'element-plus'
|
|
|
|
|
|
let dialogVisible = ref(false)
|
|
|
@@ -40,11 +50,13 @@ let dialogTitle = ref("")
|
|
|
const formRef = ref<FormInstance>()
|
|
|
const emit = defineEmits(['dialogChange'])
|
|
|
const formData = reactive({
|
|
|
- paperTypeName: '',
|
|
|
+ dictName: '',
|
|
|
+ dictType: '',
|
|
|
+ remark: '',
|
|
|
id: ""
|
|
|
})
|
|
|
const rules = reactive({
|
|
|
- paperTypeName: [{required: true, message: "请输入产品分类名称", trigger: "blur"}],
|
|
|
+ dictName: [{required: true, message: "请输入字典名称", trigger: "blur"}],
|
|
|
});
|
|
|
|
|
|
function handleSubmit() {
|
|
|
@@ -55,9 +67,9 @@ function handleSubmit() {
|
|
|
//修改
|
|
|
const postData = JSON.stringify(formData)
|
|
|
const params = {
|
|
|
- "infoType": postData,
|
|
|
+ "dictType": postData,
|
|
|
}
|
|
|
- updatePaperInfoType(params).then((response) => {
|
|
|
+ updateDictType(params).then((response) => {
|
|
|
dialogVisible.value = false
|
|
|
if (response.httpCode == 200) {
|
|
|
emit('dialogChange');
|
|
|
@@ -68,9 +80,9 @@ function handleSubmit() {
|
|
|
//增加
|
|
|
const postData = JSON.stringify(formData)
|
|
|
const params = {
|
|
|
- "infoType": postData,
|
|
|
+ "dictType": postData,
|
|
|
}
|
|
|
- addPaperInfoType(params).then((response) => {
|
|
|
+ addDictType(params).then((response) => {
|
|
|
dialogVisible.value = false
|
|
|
if (response.httpCode == 200) {
|
|
|
emit('dialogChange');
|
|
|
@@ -86,7 +98,7 @@ function getItemData(item) {
|
|
|
const data = {
|
|
|
id: item
|
|
|
}
|
|
|
- getPaperInfoType(data).then(response => {
|
|
|
+ getDictTypeInfoById(data).then(response => {
|
|
|
if (response.httpCode == 200) {
|
|
|
const data = response.data
|
|
|
Object.assign(formData, {...data});
|