|
@@ -123,7 +123,7 @@
|
|
|
<HcTooltip keys="data-query-resign-title">
|
|
|
<el-button
|
|
|
:disabled="tableCheckedKeys.length <= 0"
|
|
|
- :loading="resignTitleLoading" hc-btn
|
|
|
+ hc-btn
|
|
|
color="#3F9EFF" style="color: white;" @click="resignTitleClick"
|
|
|
>
|
|
|
<HcIcon name="restart" />
|
|
@@ -294,6 +294,42 @@
|
|
|
</el-radio-group>
|
|
|
</div>
|
|
|
</hc-new-dialog>
|
|
|
+
|
|
|
+ <!-- 重置文件题名弹窗 -->
|
|
|
+ <hc-new-dialog v-model="resignTitleModal" title="重置题名" widths="38rem" :loading="resignTitleSaveLoad" @save="resignTitleSave">
|
|
|
+ <div>
|
|
|
+ 是否更改题名规则:
|
|
|
+ <el-button type="primary" hc-btn size="small" @click="changeRuleClick">规则更改</el-button>
|
|
|
+ </div>
|
|
|
+ </hc-new-dialog>
|
|
|
+ <!-- 规则修改弹窗 -->
|
|
|
+ <hc-new-dialog v-model="ruleModal" title="重置题名" widths="88rem" :loading="ruleModalSaveLoad" @close="ruleModalClose" @save="ruleModalSave">
|
|
|
+ <div class="flex justify-between justify-items-center align-middle">
|
|
|
+ <div class="text-orange">
|
|
|
+ <p>* 单条修改在表单下拉框选择规则,批量修改在右侧选规则点击【设置】统一更新所有规则</p>
|
|
|
+ <p class="mt-2">* “修改后”仅为展示,【确认】后才会刷新文件题名</p>
|
|
|
+ </div>
|
|
|
+ <div>
|
|
|
+ <span>批量设置:</span>
|
|
|
+ <el-select v-model="setValue" placeholder="请选择" style="width: 240px" multiple>
|
|
|
+ <el-option
|
|
|
+ v-for="item in nodeTypeData"
|
|
|
+ :key="item.value"
|
|
|
+ :label="item.label"
|
|
|
+ :value="item.value"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
+ <el-button type="primary" hc-btn size="small" class="ml-2" @click="changeRuleClick">设置</el-button>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div style="position: relative; height: 240px" class="mt-2">
|
|
|
+ <hc-table :column="ruleTableColumn" :datas="ruleTableData">
|
|
|
+ <template #color="{ row }">
|
|
|
+ <hc-table-input v-model="row.color" />
|
|
|
+ </template>
|
|
|
+ </hc-table>
|
|
|
+ </div>
|
|
|
+ </hc-new-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -308,6 +344,7 @@ import { toPdfPage } from '~uti/btn-auth'
|
|
|
import wbsApi from '~api/data-fill/wbs'
|
|
|
import website from '~src/config'
|
|
|
import { getDictionaryData } from '~uti/tools'
|
|
|
+import { getDictionary } from '~api/other'
|
|
|
//变量
|
|
|
const useAppState = useAppStore()
|
|
|
const projectId = ref(useAppState.getProjectId)
|
|
@@ -1044,22 +1081,73 @@ const objArr = rows.map(row => ({
|
|
|
const saveAginLoading = ref(false)
|
|
|
|
|
|
//重置文件题名
|
|
|
+const resignTitleModal = ref(false)
|
|
|
const resignTitleClick = async ()=>{
|
|
|
const rows = tableCheckedKeys.value
|
|
|
+ resignTitleModal.value = true
|
|
|
+
|
|
|
+ // const ids = arrToId(rows)
|
|
|
+ // resignTitleLoading.value = true
|
|
|
+ // const { error, code, msg, data } = await queryApi.flushQueryName({
|
|
|
+ // ids: ids,
|
|
|
+ // })
|
|
|
+ // //处理数据
|
|
|
+ // resignTitleLoading.value = false
|
|
|
+ // if (!error && code === 200) {
|
|
|
+ // getTableData().then()
|
|
|
+ // }
|
|
|
+
|
|
|
+}
|
|
|
+const resignTitleSave = ()=>{
|
|
|
|
|
|
- const ids = arrToId(rows)
|
|
|
- resignTitleLoading.value = true
|
|
|
- const { error, code, msg, data } = await queryApi.flushQueryName({
|
|
|
- ids: ids,
|
|
|
+}
|
|
|
+const resignTitleSaveLoad = ref(false)
|
|
|
+
|
|
|
+//规则更改
|
|
|
+const changeRuleClick = ()=>{
|
|
|
+ getWbsNodeTypeApi().then()
|
|
|
+
|
|
|
+ ruleModal.value = true
|
|
|
+}
|
|
|
+const ruleModal = ref(false)
|
|
|
+const ruleModalSaveLoad = ref(false)
|
|
|
+const ruleModalClose = ()=>{
|
|
|
+ ruleModal.value = false
|
|
|
+}
|
|
|
+const ruleModalSave = ()=>{
|
|
|
+
|
|
|
+}
|
|
|
+const setValue = ref('')
|
|
|
+
|
|
|
+const ruleTableColumn = ref([
|
|
|
+ { key: 'name', name: '文件题名' },
|
|
|
+ { key: 'text', name: '修改后' },
|
|
|
+ { key: 'color', name: '题名规则' },
|
|
|
+])
|
|
|
+const ruleTableData = ref([
|
|
|
+ { id: 1, name: '名称1', text: '文本1', color: 'red' },
|
|
|
+ { id: 2, name: '名称2', text: '文本2', color: 'blue' },
|
|
|
+ { id: 3, name: '名称3', text: '文本3', color: '无' },
|
|
|
+
|
|
|
+])
|
|
|
+
|
|
|
+//获取节点类型
|
|
|
+const nodeTypeData = ref([])
|
|
|
+const getWbsNodeTypeApi = async () => {
|
|
|
+ const { data } = await getDictionary({
|
|
|
+ code: 'wbs_node_type',
|
|
|
})
|
|
|
//处理数据
|
|
|
- resignTitleLoading.value = false
|
|
|
- if (!error && code === 200) {
|
|
|
- getTableData().then()
|
|
|
- }
|
|
|
-
|
|
|
+ let newArr = []
|
|
|
+ const newData = getArrValue(data)
|
|
|
+ for (let i = 0; i < newData.length; i++) {
|
|
|
+ newArr.push({
|
|
|
+ label: newData[i]['dictValue'],
|
|
|
+ value: Number(newData[i]['dictKey']),
|
|
|
+ })
|
|
|
+ }
|
|
|
+ nodeTypeData.value = newArr
|
|
|
}
|
|
|
-const resignTitleLoading = ref(false)
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|