|
|
@@ -6,23 +6,18 @@
|
|
|
<meta name="description" content="制造企业生产过程执行管理系统">
|
|
|
<meta name="author" content="xuwei">
|
|
|
<title>东科软件</title>
|
|
|
- <link rel="stylesheet" type="text/css" href="/plugins/easyui/themes/dongke/easyui.css">
|
|
|
- <link rel="stylesheet" type="text/css" href="/plugins/easyui/themes/icon.css">
|
|
|
- <link rel="stylesheet" type="text/css" href="/plugins/xeasyui/xuwell.css">
|
|
|
- <script type="text/javascript" src="/plugins/easyui/jquery.min.js"></script>
|
|
|
- <script type="text/javascript" src="/plugins/easyui/jquery.easyui.min.js"></script>
|
|
|
- <script type="text/javascript" src="/plugins/easyui/locale/easyui-lang-zh_CN.js"></script>
|
|
|
<link rel="shortcut icon" href="/img/logo.png" />
|
|
|
<link rel="bookmark" href="/img/logo.png" />
|
|
|
<link rel="stylesheet" type="text/css" href="/plugins/easyui/themes/dongke/easyui.css">
|
|
|
<link rel="stylesheet" type="text/css" href="/plugins/easyui/themes/icon.css">
|
|
|
<link rel="stylesheet" type="text/css" href="/plugins/xeasyui/xuwell.css">
|
|
|
+ <script type="text/javascript" src="/plugins/easyui/jquery.min.js"></script>
|
|
|
<script type="text/javascript" src="/plugins/easyui/jquery.easyui.min.js"></script>
|
|
|
<script type="text/javascript" src="/plugins/easyui/locale/easyui-lang-zh_CN.js"></script>
|
|
|
- <script type="text/javascript" src="/plugins/xeasyui/xuwell.js"></script>
|
|
|
- <link href="/plugins/xeasyui/toolbar.min.css" rel="stylesheet" />
|
|
|
+ <script type="text/javascript" src="/plugins/xeasyui/xuwell.js"></script>
|
|
|
+ <link href="/plugins/xeasyui/toolbar.min.css" rel="stylesheet" />
|
|
|
<link href="https://unpkg.com/@wangeditor/editor@latest/dist/css/style.css" rel="stylesheet">
|
|
|
- <style>
|
|
|
+ <style>
|
|
|
.ddd {
|
|
|
padding-top: 10px;
|
|
|
margin: 0 20px;
|
|
|
@@ -30,25 +25,27 @@
|
|
|
}
|
|
|
|
|
|
.inp {
|
|
|
- width: 100%;
|
|
|
+ width:90.5%;
|
|
|
height: 32px;
|
|
|
position: relative;
|
|
|
/* 设置边框样式,以便更容易看到圆角效果 */
|
|
|
- border: 2px solid #ccc;
|
|
|
+ /* border: 2px solid #ccc;*/
|
|
|
+ border:0;
|
|
|
/* 设置圆角半径 */
|
|
|
- border-radius: 10px; /* 你可以根据需要调整这个值 */
|
|
|
+ /* border-radius: 10px; */
|
|
|
}
|
|
|
|
|
|
select {
|
|
|
- width: 100%;
|
|
|
+ width: 80%;
|
|
|
height: 32px;
|
|
|
position: relative;
|
|
|
background-color: #444;
|
|
|
color: #fff;
|
|
|
/* 设置边框样式,以便更容易看到圆角效果 */
|
|
|
- border: 2px solid #ccc;
|
|
|
+ /* border: 2px solid #ccc;*/
|
|
|
+ border: 0;
|
|
|
/* 设置圆角半径 */
|
|
|
- border-radius: 10px; /* 你可以根据需要调整这个值 */
|
|
|
+ /* border-radius: 10px; */
|
|
|
}
|
|
|
|
|
|
.bbb {
|
|
|
@@ -65,12 +62,13 @@
|
|
|
justify-content: space-between; /* 可选,用于在元素之间添加空间,但在这个例子中可能不是必需的 */
|
|
|
width: 100%; /* 确保 .top 容器占据其父容器的全部宽度 */
|
|
|
}
|
|
|
+
|
|
|
#editor—wrapper {
|
|
|
border: 1px solid #ccc;
|
|
|
z-index: 100; /* 按需定义 */
|
|
|
- height:100%;
|
|
|
- width:99%;
|
|
|
- margin:auto;
|
|
|
+ height: 100%;
|
|
|
+ /* width: 90%;*/
|
|
|
+ margin: 0 20px;
|
|
|
}
|
|
|
|
|
|
#toolbar-container {
|
|
|
@@ -78,33 +76,33 @@
|
|
|
}
|
|
|
|
|
|
#editor-container {
|
|
|
- height: 100%;
|
|
|
- }
|
|
|
+ height: 100%;
|
|
|
+ }
|
|
|
</style>
|
|
|
</head>
|
|
|
<body class="easyui-layout">
|
|
|
<div id="toolbarLayout" data-options="border:false,region:'north',title:'',iconCls:'icon-grid'">
|
|
|
<div style="min-height: 100vh; ">
|
|
|
- <div>
|
|
|
+ <div id="tbSearchDiv">
|
|
|
<div class="top">
|
|
|
- <div class="ddd" style=" flex: 1;">
|
|
|
- <span>产品名称:<input id="input_name" class="inp" type="text"></span>
|
|
|
+ <div class="ddd" style=" flex: 1;margin-right:0;">
|
|
|
+ 产品名称:<input id="input_name" style=" width: 80%;" class="inp" type="text">
|
|
|
</div>
|
|
|
- <div class="ddd" style=" flex: 1;">
|
|
|
- <span>产品型号:</span>
|
|
|
+ <div class="ddd" style=" flex: 1;margin-left:0;">
|
|
|
+ 产品型号:
|
|
|
<select id="modelSelect">
|
|
|
<option disabled selected value="">请选择型号</option>
|
|
|
</select>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="ddd">
|
|
|
- <span>参与人员:<input id="input_participants" class="inp" type="text"> </span>
|
|
|
+ 参与人员:<input id="input_participants" class="inp" type="text">
|
|
|
</div>
|
|
|
<div class="ddd">
|
|
|
- <span>解决方式:<input id="input_solution" class="inp" type="text"> </span>
|
|
|
+ 解决方式:<input id="input_solution" class="inp" type="text">
|
|
|
</div>
|
|
|
<div class="ddd">
|
|
|
- <span>解决效果:<input id="input_solutioneffect" class="inp" type="text"> </span>
|
|
|
+ 解决效果:<input id="input_solutioneffect" class="inp" type="text">
|
|
|
</div>
|
|
|
<form enctype="multipart/form-data">
|
|
|
<div id="presetFileName" class="ddd">
|
|
|
@@ -112,25 +110,25 @@
|
|
|
<button type="button" class="ddd" style="padding-top:0; " onclick="deletefile()">删除</button>
|
|
|
<button type="button" class="ddd" style="padding-top:0; " onclick="downfile()">下载已上传文件</button>
|
|
|
</div>
|
|
|
-
|
|
|
+
|
|
|
<div id="isopen" class="ddd">
|
|
|
- 上传附件:
|
|
|
- <input id="ff" type="file" style=" font-size: 20px" data-options="required:true,prompt:'',tipPosition:'bottom',buttonText:'选择文件',buttonAlign:'right',accept='*/*'">
|
|
|
- <button type="button" class="ddd" style="padding-top:0; " onclick="submitForm()">导入</button>
|
|
|
- <span style="color:red">上传附件后请点击导入按钮否则不会上传至服务器</span>
|
|
|
+ 上传附件:
|
|
|
+ <input id="ff" type="file" style="font-size: 20px; " data-options="required:true,prompt:'',tipPosition:'bottom',buttonText:'选择文件',buttonAlign:'right',accept='*/*'">
|
|
|
+
|
|
|
</div>
|
|
|
</form>
|
|
|
- </div>
|
|
|
- <div style=" padding-top:10px">
|
|
|
- <span class="ddd">问题: </span>
|
|
|
- <div id="editor—wrapper">
|
|
|
- <div id="toolbar-container"><!-- 工具栏 --></div>
|
|
|
- <div id="editor-container"><!-- 编辑器 --></div>
|
|
|
- <div id="editor-text-area" class="editor-text-area"></div>
|
|
|
+
|
|
|
+ <div style=" padding-top: 10px; display: flex; align-items: center;" class="ddd">
|
|
|
+ 问题:
|
|
|
+ <div id="editor—wrapper" style="flex:10">
|
|
|
+ <div id="toolbar-container"><!-- 工具栏 --></div>
|
|
|
+ <div id="editor-container"><!-- 编辑器 --></div>
|
|
|
+ <div id="editor-text-area" class="editor-text-area"></div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="ddd" style="text-align:center">
|
|
|
+ <button type="button" class="ddd" style="padding-top: 0; margin:0 auto" onclick="add()">提交/修改</button>
|
|
|
</div>
|
|
|
- </div>
|
|
|
- <div class="ddd" >
|
|
|
- <button type="button" class="ddd" style="padding-top: 0; " onclick="add()">提交/修改</button>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -233,7 +231,15 @@
|
|
|
const key = this.id.replace('input_', '');;
|
|
|
addsb[key] = $(this).val();
|
|
|
});
|
|
|
-
|
|
|
+ /**上传文件子服务器*/
|
|
|
+ document.getElementById('ff').addEventListener('change', function (event) {
|
|
|
+ // 检查是否有文件被选中
|
|
|
+ if (event.target.files.length > 0) {
|
|
|
+ // 调用自定义的 submitForm 方法
|
|
|
+ submitForm();
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
/** 添加/修改按钮 */
|
|
|
const add = async() => {
|
|
|
if (addsb.name == '') {
|
|
|
@@ -283,38 +289,25 @@
|
|
|
if (responseData.errno === 0) {
|
|
|
/**设置addsb.annex为响应中的url */
|
|
|
addsb.annex = responseData.data.url;
|
|
|
- messager(true);
|
|
|
- $.messager.alert("上传附件", "上传成功");
|
|
|
+ // messager(true);
|
|
|
+ $.messager.alert("上传附件", "附件上传至服务器成功");
|
|
|
} else {
|
|
|
console.error('请求成功但发生错误', responseData.errno);
|
|
|
- messager(false);
|
|
|
- $.messager.alert("上传附件", "上传失败");
|
|
|
+ // messager(false);
|
|
|
+ $.messager.alert("上传附件", "附件上传至服务器失败");
|
|
|
}
|
|
|
} catch (e) {
|
|
|
console.error('解析JSON失败', e);
|
|
|
- messager(false);
|
|
|
- $.messager.alert("上传附件", "上传失败");
|
|
|
+ //messager(false);
|
|
|
+ $.messager.alert("上传附件", "附件上传至服务器失败");
|
|
|
}
|
|
|
} else {
|
|
|
console.error('请求失败', xhr.status);
|
|
|
- messager(false);
|
|
|
- $.messager.alert("上传附件", "上传失败");
|
|
|
+ // messager(false);
|
|
|
+ $.messager.alert("上传附件", "附件上传至服务器失败");
|
|
|
}
|
|
|
}
|
|
|
- };
|
|
|
- /**消息提示*/
|
|
|
- const messager = (type) => {
|
|
|
- $.messager.show({
|
|
|
- title: type ? '上传成功' :"上传失败",
|
|
|
- msg: type ?'文件成功上传至服务器':'文件上传服务器失败',
|
|
|
- showType: 'slide',
|
|
|
- style: {
|
|
|
- right: '',
|
|
|
- top: document.body.scrollTop + document.documentElement.scrollTop,
|
|
|
- bottom: ''
|
|
|
- }
|
|
|
- });
|
|
|
- }
|
|
|
+ };
|
|
|
/** 获取产品型号 */
|
|
|
const getproductmodel = () => {
|
|
|
$.get("Richtext.ashx?m=getproductmodel", function (data) {
|