asd26269546 1 rok temu
rodzic
commit
fde66cc45a

+ 9 - 0
src/components/byForm/index.vue

@@ -32,6 +32,7 @@
           :placeholder="i.placeholder || '请输入'"
           @input="(e) => commonsEmit(e, i)"
           @change="(e) => commonsEmitChange(e, i)"
+          @keydown.native="inputLimit"
           :type="i.itemType ? i.itemType : 'text'"
           :disabled="i.disabled ? i.disabled : false"
           :max="i.max"
@@ -307,6 +308,10 @@ const handleSuccess = (res, file, files) => {
   emit("update:modelValue", formData.value);
 };
 
+const inputLimit = (e, i) => {
+  console.log(e,i)
+};
+
 const handleRemove = (file) => {
   const index = fileListCopy.value.findIndex(
     (x) => x.uid === file.uid || x.id === file.id
@@ -334,6 +339,10 @@ const formData = computed(() => {
 });
 const formDataReset = ref({ ...proxy.modelValue });
 const commonsEmit = (prop, item) => {
+  if(item.type == 'input' && item.itemType == 'number'){
+    console.log(formData.value)
+  }
+    
   if (item.fn) {
     item.fn(prop);
   }

+ 48 - 9
src/components/notice/index.vue

@@ -1,6 +1,5 @@
 <template>
 	<div class="commons-notice">
-		
 		<el-dialog
 			title="系统公告"
 			v-model="value"
@@ -31,18 +30,22 @@
 						:disabled="data.length == index + 1"
 						>下一条</el-button
 					>
-					<el-button
+					<!-- <el-button
 						type="primary"
 						size="small"
 						:disabled="data.length == 0"
 						@click="confirm"
 						>确认已读</el-button
-					>
-					<span class="more" @click="moreFn">查看更多 &gt;</span>
+					> -->
+					<!-- <span class="more" @click="moreFn">查看更多 &gt;</span> -->
 				</span>
 			</template>
 		</el-dialog>
-		<div class="notice-table-warp" :class="noticeTableModal ? 'notice-table-warp-open' : ''" @click.stop="noticeTableModal = false">
+		<div
+			class="notice-table-warp"
+			:class="noticeTableModal ? 'notice-table-warp-open' : ''"
+			@click.stop="noticeTableModal = false"
+		>
 			<div class="notice-table" @click.stop>
 				<div class="tabs">
 					<ul>
@@ -61,12 +64,12 @@
 					</el-table-column>
 					<el-table-column prop="address" label="操作">
 						<template #default="scope">
-							<span style="cursor: pointer;">未读</span>
+							<span style="cursor: pointer">未读</span>
 						</template>
 					</el-table-column>
 				</el-table>
 				<div class="notice-btn-box" style="margin-top: 20px">
-					<el-button  plain>点击清空</el-button>
+					<el-button plain>点击清空</el-button>
 					<el-button type="primary">全部已读</el-button>
 				</div>
 			</div>
@@ -75,6 +78,9 @@
 </template>
 <script setup>
 import { ElMessageBox, ElNotification } from 'element-plus'
+import {
+  getToken
+} from '@/utils/auth'
 let noticeTableModal = ref(false)
 let noticeData = ref([
 	{
@@ -114,6 +120,39 @@ const confirm = () => {
 	value.value = false
 }
 
+const socketInit = () => {
+	window.ws = new WebSocket(
+		'ws://36.134.91.96:9898/test-api/webStock/' +
+			getToken()
+		// 'ws://192.168.1.97:8300/webStock/' + window.localStorage.getItem('token')
+	)
+	//申请一个WebSocket对象,参数是服务端地址,同http协议使用http://开头一样,WebSocket协议的url使用ws://开头,另外安全的WebSocket协议使用wss://开头
+	window.ws.onopen = function () {
+		//当WebSocket创建成功时,触发onopen事件
+		console.log('open')
+	}
+	window.ws.onmessage = function (e) {
+		//当客户端收到服务端发来的消息时,触发onmessage事件,参数e.data包含server传递过来的数据
+
+		var msg = JSON.parse(e.data)
+		console.log(msg)
+		//系统消息
+		if (msg.data.type == 1) {
+			data.value = msg.data
+			value.value = true
+		}
+		
+	}
+	window.ws.onclose = function (e) {
+		//当客户端收到服务端发送的关闭连接请求时,触发onclose事件
+		console.log('close')
+	}
+	window.ws.onerror = function (e) {
+		//如果出现连接、处理、接收、发送数据失败的时候触发onerror事件
+		console.log(error)
+	}
+}
+socketInit()
 const handleClose = () => {
 	value.value = false
 }
@@ -133,7 +172,7 @@ const openBottomBar = (type) => {
 }
 </script>
 <style lang="scss">
-.notice-table-warp{
+.notice-table-warp {
 	position: fixed;
 	right: 0;
 	top: 0;
@@ -146,7 +185,7 @@ const openBottomBar = (type) => {
 	display: none;
 }
 
-.notice-table-warp-open{
+.notice-table-warp-open {
 	opacity: 1;
 	display: block;
 }

+ 11 - 0
src/views/process/processConfig/vueFlow.vue

@@ -831,12 +831,23 @@ const antvInit = () => {
 	})
 	
 }
+const getFlowInfo =	(()=>{
+	proxy.post('/flowDefinition/getDetails', {id:submitFormData.flowInfoId}).then((res) => {
+		console.log(res)
+		
+	})
+})
+
+
 onMounted(() => {
 	antvInit()
 	//获取url router参数
 	const router = useRouter()
 	submitFormData.flowInfoId = router.currentRoute.value.query.id
 	submitFormData.tenantId = router.currentRoute.value.query.tenantId
+	if(submitFormData.flowInfoId) {
+		//getFlowInfo()
+	}
 })
 </script>
 <style lang="scss">