|
@@ -49,6 +49,7 @@
|
|
|
</div>
|
|
|
</template>
|
|
|
<script lang="tsx" setup>
|
|
|
+import dayjs from "dayjs";
|
|
|
import configure from '@/api/system/configure'
|
|
|
import { computed, nextTick, ref, watch } from 'vue'
|
|
|
import { ElMessage, ElMessageBox, ElTree } from 'element-plus'
|
|
@@ -73,7 +74,7 @@ const formsDialog = [
|
|
|
rules: [{ required: true, message: '请输入标题', trigger: 'blur' }]
|
|
|
},
|
|
|
{
|
|
|
- prop: 'key',
|
|
|
+ prop: 'keyword',
|
|
|
label: '关键字',
|
|
|
itemType: 'input',
|
|
|
rules: [{ required: true, message: '请输入关键字', trigger: 'blur' }]
|
|
@@ -115,7 +116,7 @@ const forms = ref([
|
|
|
placeholder: '请输入分类'
|
|
|
},
|
|
|
{
|
|
|
- prop: 'key',
|
|
|
+ prop: 'keyword',
|
|
|
label: '关键字:',
|
|
|
itemType: 'input',
|
|
|
placeholder: '请输入关键字'
|
|
@@ -148,7 +149,7 @@ const columns = [
|
|
|
minWidth: 250
|
|
|
},
|
|
|
{
|
|
|
- prop: 'key',
|
|
|
+ prop: 'keyword',
|
|
|
label: '关键字',
|
|
|
minWidth: 150
|
|
|
},
|
|
@@ -265,7 +266,7 @@ const submitHandler = async params => {
|
|
|
formOptions.value.formConfig.submitLoading = true
|
|
|
try {
|
|
|
params.status = params.status ? 1 : 0
|
|
|
- params.expire = params.expire + ' 00:00:00'
|
|
|
+ params.expire = params.expire ? params.expire + ' 00:00:00' : dayjs(new Date()).format("YYYY-MM-DD HH:mm:ss")
|
|
|
params.id = activeData.value.id ? activeData.value.id : null
|
|
|
await configure.configureAddOrEditSaveApi(params)
|
|
|
ElMessage.success(`${isCreate.value ? '新增' : '修改'}成功~`)
|