|
@@ -345,7 +345,8 @@
|
|
<div class="flex items-center">
|
|
<div class="flex items-center">
|
|
<span class="text-red">*</span>
|
|
<span class="text-red">*</span>
|
|
<el-select
|
|
<el-select
|
|
- v-model="row.rule"
|
|
|
|
|
|
+ v-model="row.rule"
|
|
|
|
+ :class="{ 'error-border': !row.rule || row.rule.length === 0 }"
|
|
placeholder="请选择"
|
|
placeholder="请选择"
|
|
multiple
|
|
multiple
|
|
clearable
|
|
clearable
|
|
@@ -369,19 +370,19 @@
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script setup>
|
|
<script setup>
|
|
-import { onMounted, ref, watch } from 'vue'
|
|
|
|
|
|
+import { nextTick, onMounted, ref, watch } from 'vue'
|
|
import { useAppStore } from '~src/store'
|
|
import { useAppStore } from '~src/store'
|
|
import { getStoreValue, setStoreValue } from '~src/utils/storage'
|
|
import { getStoreValue, setStoreValue } from '~src/utils/storage'
|
|
import { arrToId, arrToKey, downloadBlob, getArrValue, getObjValue, isString } from 'js-fast-way'
|
|
import { arrToId, arrToKey, downloadBlob, getArrValue, getObjValue, isString } from 'js-fast-way'
|
|
import queryApi from '~api/data-fill/query'
|
|
import queryApi from '~api/data-fill/query'
|
|
-import divisionApi from '~api/data-fill/division'
|
|
|
|
|
|
+
|
|
import { eVisaTaskCheckApi } from '~api/other'
|
|
import { eVisaTaskCheckApi } from '~api/other'
|
|
import { toPdfPage } from '~uti/btn-auth'
|
|
import { toPdfPage } from '~uti/btn-auth'
|
|
import wbsApi from '~api/data-fill/wbs'
|
|
import wbsApi from '~api/data-fill/wbs'
|
|
import website from '~src/config'
|
|
import website from '~src/config'
|
|
import { getDictionaryData } from '~uti/tools'
|
|
import { getDictionaryData } from '~uti/tools'
|
|
import { getDictionary } from '~api/other'
|
|
import { getDictionary } from '~api/other'
|
|
-import { reRendering } from 'element-plus/es/components/watermark/src/utils.mjs'
|
|
|
|
|
|
+
|
|
//变量
|
|
//变量
|
|
const useAppState = useAppStore()
|
|
const useAppState = useAppStore()
|
|
const projectId = ref(useAppState.getProjectId)
|
|
const projectId = ref(useAppState.getProjectId)
|
|
@@ -1182,6 +1183,7 @@ const ruleModalSave = async ()=>{
|
|
window.$message.warning('请选择题名规规则')
|
|
window.$message.warning('请选择题名规规则')
|
|
return
|
|
return
|
|
}
|
|
}
|
|
|
|
+
|
|
let arr = []
|
|
let arr = []
|
|
ruleTableData.value.forEach(item=>{
|
|
ruleTableData.value.forEach(item=>{
|
|
arr.push({
|
|
arr.push({
|
|
@@ -1233,7 +1235,7 @@ const batchSetRule = async ()=>{
|
|
})
|
|
})
|
|
})
|
|
})
|
|
let afterArr = await getRuleValue(arr)
|
|
let afterArr = await getRuleValue(arr)
|
|
-console.log(afterArr, 'afterArr')
|
|
|
|
|
|
+
|
|
|
|
|
|
for (let i = 0; i < ruleTableData.value.length; i++) {
|
|
for (let i = 0; i < ruleTableData.value.length; i++) {
|
|
const currentItem = ruleTableData.value[i]
|
|
const currentItem = ruleTableData.value[i]
|
|
@@ -1274,7 +1276,12 @@ const getRuleListData = async (arr) => {
|
|
|
|
|
|
}
|
|
}
|
|
const getRuleValue = async (arr) => {
|
|
const getRuleValue = async (arr) => {
|
|
-
|
|
|
|
|
|
+ // 检查 arr 中每一项的 nameRule 是否有值
|
|
|
|
+ const hasInvalidItem = arr.some(item => !item.nameRule || item.nameRule.length === 0)
|
|
|
|
+ if (hasInvalidItem) {
|
|
|
|
+ window.$message.warning('请选择题名规则')
|
|
|
|
+ return
|
|
|
|
+ }
|
|
getRuleLoad.value = true
|
|
getRuleLoad.value = true
|
|
const { error, code, msg, data } = await queryApi.previewNodeName(arr)
|
|
const { error, code, msg, data } = await queryApi.previewNodeName(arr)
|
|
//处理数据
|
|
//处理数据
|
|
@@ -1311,6 +1318,10 @@ const getWbsNodeTypeApi = async () => {
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
<style lang="scss" scoped>
|
|
@import "../../styles/data-fill/query.scss";
|
|
@import "../../styles/data-fill/query.scss";
|
|
|
|
+
|
|
|
|
+.error-border {
|
|
|
|
+ border: 1px solid red;
|
|
|
|
+}
|
|
.iscusor {
|
|
.iscusor {
|
|
cursor: pointer;
|
|
cursor: pointer;
|
|
}
|
|
}
|