|
|
|
@ -50,7 +50,7 @@
|
|
|
|
<view class="form" v-else>
|
|
|
|
<view class="form" v-else>
|
|
|
|
<uv-form labelAlign="left" labelWidth="auto" labelPosition="left" :model="formField" :rules="rules"
|
|
|
|
<uv-form labelAlign="left" labelWidth="auto" labelPosition="left" :model="formField" :rules="rules"
|
|
|
|
ref="form">
|
|
|
|
ref="form">
|
|
|
|
<uv-form-item :prop="item.key" :label="item.name + ':'" v-for="item in currentTemplate.params">
|
|
|
|
<uv-form-item :prop="item.key" :label="item.name + ':'" v-for="item in (currentTemplate.params?.filter(item => item.enabled) || [])">
|
|
|
|
<uv-input :type="item.type === 'number' ? 'digit' : 'text'" v-model="item.value" color="#000"
|
|
|
|
<uv-input :type="item.type === 'number' ? 'digit' : 'text'" v-model="item.value" color="#000"
|
|
|
|
border="bottom" :placeholderStyle="{ color: '#666778' }" placeholder="请输入"></uv-input>
|
|
|
|
border="bottom" :placeholderStyle="{ color: '#666778' }" placeholder="请输入"></uv-input>
|
|
|
|
</uv-form-item>
|
|
|
|
</uv-form-item>
|
|
|
|
@ -152,7 +152,7 @@
|
|
|
|
const modalRef = ref(null)
|
|
|
|
const modalRef = ref(null)
|
|
|
|
const confirmGenerate = () => {
|
|
|
|
const confirmGenerate = () => {
|
|
|
|
const params = {}
|
|
|
|
const params = {}
|
|
|
|
currentTemplate.value.params.forEach(item => {
|
|
|
|
currentTemplate.value.params?.filter(item => item.enabled).forEach(item => {
|
|
|
|
params[item.name] = item.value
|
|
|
|
params[item.name] = item.value
|
|
|
|
})
|
|
|
|
})
|
|
|
|
RPC.post('/template_create_task', {template_id:currentTemplate.value.id,template_data:params}).then(() => {
|
|
|
|
RPC.post('/template_create_task', {template_id:currentTemplate.value.id,template_data:params}).then(() => {
|
|
|
|
@ -177,8 +177,8 @@
|
|
|
|
page: 1,
|
|
|
|
page: 1,
|
|
|
|
limit: -1
|
|
|
|
limit: -1
|
|
|
|
}).then(res => {
|
|
|
|
}).then(res => {
|
|
|
|
templateList.value = res.rows || []
|
|
|
|
templateList.value = (res.rows || []).filter(item => item.enabled)
|
|
|
|
currentTemplate.value = res.rows[0] ? JSON.parse(JSON.stringify(res.rows[0])) : {}
|
|
|
|
currentTemplate.value = templateList.value[0] ? JSON.parse(JSON.stringify(templateList.value[0])) : {}
|
|
|
|
}).finally(() => {
|
|
|
|
}).finally(() => {
|
|
|
|
loading.value = false
|
|
|
|
loading.value = false
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|