feat(project): 在项目信息表单中将 BG 和行业字段标记为必填

- 在 add.html 和 edit.html 文件中,为项目名称、BG 和行业字段添加了 required 属性
- 在 BG 和行业字段的标签旁边添加了"*"符号,表示这些字段是必填的
master
chenhao 2025-07-07 10:11:07 +08:00
parent 7c53f6173d
commit eda7c8e286
2 changed files with 10 additions and 10 deletions

View File

@ -110,23 +110,23 @@
readonly> readonly>
</td> </td>
<td class="shortTd" style="text-align: right;">项目名称<span class="is-required">*</span></td> <td class="shortTd" style="text-align: right;">项目名称<span class="is-required">*</span></td>
<td colspan="2"><input type="text" name="projectName" maxlength="40" placeholder="限制40个字符" <td colspan="2"><input type="text" name="projectName" maxlength="40" placeholder="限制40个字符" required
class="form-control"></td> class="form-control"></td>
<tr> <tr>
<td class="shortTd">BG</td> <td class="shortTd">BG<span class="is-required">*</span></td>
<td class="inputTd"> <td class="inputTd">
<select name="bgProperty" class="form-control" th:with="type=${@dict.getType('bg_type')}" <select name="bgProperty" class="form-control" th:with="type=${@dict.getType('bg_type')}"
onchange="changeBg()" > onchange="changeBg()" required >
<option value="">请选择BG</option> <option value="">请选择BG</option>
<option th:each="dict : ${type}" th:text="${dict.dictLabel}" <option th:each="dict : ${type}" th:text="${dict.dictLabel}"
th:value="${dict.dictValue}"></option> th:value="${dict.dictValue}"></option>
</select> </select>
</td> </td>
<td class="shortTd">行业</td> <td class="shortTd">行业<span class="is-required">*</span></td>
<td id="industryTypeBox" class="inputTd"> <td id="industryTypeBox" class="inputTd">
<select name="industryType" class="form-control" <select name="industryType" class="form-control" required
> >
<option value="">请先选择BG</option> <option value="">请先选择BG</option>
</select> </select>

View File

@ -125,13 +125,13 @@
</td> </td>
<td class="shortTd" style=" text-align: right;">项目名称<span class="is-required">*</span></td> <td class="shortTd" style=" text-align: right;">项目名称<span class="is-required">*</span></td>
<td colspan="2"><input type="text" th:field="*{projectName}" name="projectName" maxlength="40" <td colspan="2"><input type="text" th:field="*{projectName}" name="projectName" maxlength="40"
placeholder="限制40个字符" placeholder="限制40个字符" required
class="form-control"></td> class="form-control"></td>
</tr> </tr>
<tr> <tr>
<td class="shortTd">BG</td> <td class="shortTd">BG<span class="is-required">*</span></td>
<td class="inputTd"> <td class="inputTd">
<select name="bgProperty" th:field="*{bgProperty}" class="form-control" <select name="bgProperty" th:field="*{bgProperty}" class="form-control" required
th:with="type=${@dict.getType('bg_type')}" th:with="type=${@dict.getType('bg_type')}"
onchange="changeBg()" > onchange="changeBg()" >
<option value="">请选择BG</option> <option value="">请选择BG</option>
@ -139,9 +139,9 @@
th:value="${dict.dictValue}"></option> th:value="${dict.dictValue}"></option>
</select> </select>
</td> </td>
<td class="shortTd">行业</td> <td class="shortTd">行业<span class="is-required">*</span></td>
<td id="industryTypeBox" class="inputTd"> <td id="industryTypeBox" class="inputTd">
<select name="industryType" th:field="*{industryType}" class="form-control" <select name="industryType" th:field="*{industryType}" class="form-control" required
> >
<option value="">请先选择BG</option> <option value="">请先选择BG</option>
</select> </select>