|
@@ -507,7 +507,28 @@
|
|
|
</hc-new-dialog>
|
|
|
<!-- 上传文件 -->
|
|
|
<hc-new-dialog v-model="uploadModal" :footer="false" title="上传文件" widths="38rem" @close="uploadModalClose">
|
|
|
- <HcUpload :datas="uploadData" :file-list="fileListData" :is-canupload="false" action="/api/blade-manager/exceltab/add-bussfile-node" accept="application/pdf" accept-tip="允许格式:pdf" @change="uploadChange" @close="uploadModalClose" />
|
|
|
+ <div class="mb-4">
|
|
|
+ <span style="color: red;">*</span> 选择附件类型:
|
|
|
+ <el-select
|
|
|
+ v-model="typevalue"
|
|
|
+ placeholder="请选择"
|
|
|
+ style="width: 240px"
|
|
|
+ clearable
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="item in typeoptions"
|
|
|
+ :key="item.value"
|
|
|
+ :label="item.label"
|
|
|
+ :value="item.value"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
+ </div>
|
|
|
+ <HcUpload
|
|
|
+ :datas="uploadData" :file-list="fileListData" :is-canupload="false" action="/api/blade-manager/exceltab/add-bussfile-node" accept="application/pdf" accept-tip="允许格式:pdf" :disabled="!typevalue"
|
|
|
+ @change="uploadChange"
|
|
|
+ @close="uploadModalClose"
|
|
|
+ @upload="beforeUpload"
|
|
|
+ />
|
|
|
</hc-new-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
@@ -1974,6 +1995,41 @@ const syncdata = async ()=>{
|
|
|
}
|
|
|
}
|
|
|
//附件添加
|
|
|
+
|
|
|
+const typeoptions = ref([
|
|
|
+{
|
|
|
+ value: '1',
|
|
|
+ label: '模板1',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ value: '2',
|
|
|
+ label: '模板2',
|
|
|
+ },
|
|
|
+])
|
|
|
+const getFileTypeApi = async () => {
|
|
|
+ const { data } = await getDictionary({
|
|
|
+ code: 'wbs_node_type',
|
|
|
+ })
|
|
|
+ //处理数据
|
|
|
+ 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']),
|
|
|
+ })
|
|
|
+ }
|
|
|
+ typeoptions.value = newArr
|
|
|
+}
|
|
|
+const typevalue = ref('')
|
|
|
+const beforeUpload = ()=>{
|
|
|
+ console.log(1111111)
|
|
|
+ if (!typevalue.value) {
|
|
|
+ window.$message.warning('请先选择模板')
|
|
|
+ return
|
|
|
+
|
|
|
+ }
|
|
|
+}
|
|
|
const isCanadd = ref(true)
|
|
|
const uploadModal = ref(false)
|
|
|
const fileListData = ref([])
|
|
@@ -1981,6 +2037,8 @@ const uploadData = ref({})
|
|
|
const uploadModalClose = ()=>{
|
|
|
uploadModal.value = false
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
//获取附件添加列表
|
|
|
const getBussFileList = async (pkeyId) => {
|
|
|
const { error, code, data } = await wbsApi.selectTableFileListByTen({
|
|
@@ -1995,10 +2053,12 @@ const getBussFileList = async (pkeyId) => {
|
|
|
const addFilelist = ()=>{
|
|
|
getBussFileList(primaryKeyId.value)
|
|
|
uploadModal.value = true
|
|
|
+ // getFileTypeApi()
|
|
|
//上传的配置
|
|
|
uploadData.value = {
|
|
|
classify:authBtnTabKey.value,
|
|
|
nodeId: primaryKeyId.value,
|
|
|
+ type:typevalue.value,
|
|
|
}
|
|
|
|
|
|
}
|