修改数据日志全局组件,并添加自动代码生成模板
This commit is contained in:
@ -249,27 +249,6 @@ export async function disable${pascalMainTableName}(ids: string[], mode: ErrorMe
|
||||
: ''
|
||||
}
|
||||
|
||||
${
|
||||
hasDataLogButton?
|
||||
`
|
||||
/**
|
||||
* @description: 获取数据日志${pascalMainTableName}
|
||||
*/
|
||||
export async function getDataLog${pascalMainTableName}(id: string, mode: ErrorMessageMode = 'modal') {
|
||||
return defHttp.post<boolean>(
|
||||
{
|
||||
url: Api.Datalog,
|
||||
data: id,
|
||||
},
|
||||
{
|
||||
errorMessageMode: mode,
|
||||
},
|
||||
);
|
||||
}
|
||||
`
|
||||
:''
|
||||
}
|
||||
|
||||
${
|
||||
hasSetUserIdButton
|
||||
? `
|
||||
@ -683,9 +662,14 @@ export function buildListCode(model: GeneratorConfig): string {
|
||||
? ` <SetRuleUserModal @register="registerRuleUserModal" @success="handleSuccess" />`
|
||||
: ''
|
||||
}
|
||||
<DataLog :logId="logId" :logPath="logPath" v-model:visible="modalVisible"/>
|
||||
</PageWrapper>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
const modalVisible = ref(false);
|
||||
const logId = ref('')
|
||||
const logPath = ref('/${model.outputConfig.outputValue}/${lowerFirstPascalClassName}/datalog');
|
||||
import { DataLog } from '/@/components/pcitc';
|
||||
import { ref, computed, onMounted, onUnmounted, ${
|
||||
hasBatchDeleteButton || hasDeleteButton || (hasSetUserIdButton && !isSetDataAuth)
|
||||
? 'createVNode,'
|
||||
@ -719,7 +703,7 @@ ${hasTemplatePrint ? ' reactive ' : ''}
|
||||
import { useFormConfig } from '/@/hooks/web/useFormConfig';
|
||||
import { useRouter } from 'vue-router';
|
||||
import { setIndexFlowStatus } from '/@/utils/flow/index'
|
||||
import { get${pascalMainTableName} } from '/@/api/${
|
||||
import { get${pascalMainTableName}${hasEnableButton?`,enable${pascalMainTableName},disable${pascalMainTableName}`:''} } from '/@/api/${
|
||||
model.outputConfig.outputValue
|
||||
}/${lowerClassName}';
|
||||
|
||||
@ -1079,6 +1063,11 @@ ${hasTemplatePrint ? ' reactive ' : ''}
|
||||
}
|
||||
btnEvent[code]();
|
||||
}
|
||||
function handleDatalog (record: Recordable) {
|
||||
modalVisible.value = true
|
||||
logId.value = record.id
|
||||
console.log('日志', modalVisible.value, record)
|
||||
}
|
||||
${
|
||||
hasAddButton
|
||||
? `
|
||||
|
||||
Reference in New Issue
Block a user