Merge branch 'sprint/167' of https://gitlab.zcorp.cc/easycorp/zentaopms into sprint/167

This commit is contained in:
zhujinyong
2021-10-19 19:10:01 +08:00
5 changed files with 9 additions and 13 deletions
+1 -2
View File
@@ -261,7 +261,6 @@ class api extends control
->add('lib', $struct->lib)
->add('editedBy', $userId)
->add('editedDate', $now)
->json('attribute')
->get();
$changes = $this->api->updateStruct($structID, $data);
@@ -614,7 +613,7 @@ class api extends control
{
$this->loadModel('tree');
$childModules = $this->tree->getOptionMenu($libID, 'api');
$select = ($type == 'module') ? html::select('module', $childModules, '', "class='form-control chosen'") : html::select('parent', $childModules, '', "class='form-control chosen'");
$select = ($type == 'module') ? html::select('module', $childModules, '0', "class='form-control chosen'") : html::select('parent', $childModules, '0', "class='form-control chosen'");
die($select);
}
+1 -1
View File
@@ -68,7 +68,7 @@ var app = new Vue({
},
add(data, key, t) {
if (t == "header" || t == 'query') {
data.splice(key + 1, 0, this.defaultHeader);
data.splice(key + 1, 0, {...this.defaultHeader})
}
}
}
+3 -6
View File
@@ -14,9 +14,7 @@ var app = new Vue({
body: "",
response: "",
params: "",
defaultHeader: [
{field: '', required: '', desc: ''}
],
defaultHeader: {field: '', required: '', desc: ''},
attr: [],
api
},
@@ -67,7 +65,6 @@ var app = new Vue({
params: body,
query: queryP,
}
// console.log(params)
this.params = JSON.stringify(params);
},
filterParams(data) {
@@ -89,8 +86,8 @@ var app = new Vue({
},
add(data, key, t) {
if(t == "header" || t == 'query') {
data.splice(key + 1, 0, this.defaultHeader)
data.splice(key + 1, 0, {...this.defaultHeader})
}
}
}
})
})
+1 -1
View File
@@ -69,7 +69,7 @@ js::set('struct_paramsType', $lang->struct->paramsType);
<tr>
<th><?php echo $lang->api->module;?></th>
<td>
<span id='moduleBox'><?php echo html::select('module', $moduleOptionMenu, $moduleID, "class='form-control chosen'");?></span>
<span id='moduleBox'><?php echo html::select('module', $moduleOptionMenu, '', "class='form-control chosen'");?></span>
</td>
<td></td>
</tr>
+3 -3
View File
@@ -164,7 +164,7 @@ js::set('api', $api);
<tbody>
<tr v-for="(item,key) in queryP">
<td class="w-300px">
<input type="text" placeholder="<?php echo $lang->struct->field;?>" autocomplete="off" class="form-control" v-model="item.field">
<input type="text" placeholder="<?php echo $lang->struct->field;?>" autocomplete="off" class="form-control" v-model="queryP[key].field">
</td>
<td class="w-50px">
<div class="checkbox">
@@ -177,8 +177,8 @@ js::set('api', $api);
<input type="text" placeholder="<?php echo $lang->struct->desc;?>" autocomplete="off" class="form-control" v-model="item.desc">
</td>
<td>
<button class="btn btn-link" type="button" @click="add(query, key, 'query')"><?php echo $lang->struct->add;?></button>
<button class="btn btn-link" type="button" @click="del(query, key)"><?php echo $lang->delete;?></button>
<button class="btn btn-link" type="button" @click="add(queryP, key, 'query')"><?php echo $lang->struct->add;?></button>
<button class="btn btn-link" type="button" @click="del(queryP, key)"><?php echo $lang->delete;?></button>
</td>
</tbody>
</table>