Merge remote-tracking branch 'origin/master'
commit
8cfef8c206
24
package.json
24
package.json
|
@ -39,36 +39,40 @@
|
||||||
"@riophae/vue-treeselect": "0.4.0",
|
"@riophae/vue-treeselect": "0.4.0",
|
||||||
"axios": "0.24.0",
|
"axios": "0.24.0",
|
||||||
"clipboard": "2.0.8",
|
"clipboard": "2.0.8",
|
||||||
|
"codemirror": "^5.65.12",
|
||||||
"core-js": "3.25.3",
|
"core-js": "3.25.3",
|
||||||
"echarts": "5.4.0",
|
"echarts": "5.4.0",
|
||||||
"element-ui": "2.15.14",
|
"element-ui": "2.15.14",
|
||||||
"file-saver": "2.0.5",
|
"file-saver": "2.0.5",
|
||||||
"fuse.js": "6.4.3",
|
"fuse.js": "6.4.3",
|
||||||
"highlight.js": "9.18.5",
|
"highlight.js": "9.18.5",
|
||||||
|
"jquery": "^3.5.1",
|
||||||
"js-beautify": "1.13.0",
|
"js-beautify": "1.13.0",
|
||||||
"js-cookie": "3.0.1",
|
"js-cookie": "3.0.1",
|
||||||
"jsencrypt": "3.0.0-rc.1",
|
"jsencrypt": "3.0.0-rc.1",
|
||||||
"jsplumb": "^2.15.6",
|
"jsplumb": "^2.15.6",
|
||||||
"nprogress": "0.2.0",
|
"nprogress": "0.2.0",
|
||||||
|
"panzoom": "^9.4.1",
|
||||||
"quill": "1.3.7",
|
"quill": "1.3.7",
|
||||||
"screenfull": "5.0.2",
|
"screenfull": "5.0.2",
|
||||||
"sortablejs": "1.10.2",
|
"sortablejs": "1.10.2",
|
||||||
|
"view-design": "^4.5.0-beta.3",
|
||||||
"vue": "2.6.12",
|
"vue": "2.6.12",
|
||||||
|
"vue-click-outside": "^1.1.0",
|
||||||
|
"vue-codemirror": "^4.0.6",
|
||||||
|
"vue-contextmenujs": "^1.3.13",
|
||||||
"vue-count-to": "1.0.13",
|
"vue-count-to": "1.0.13",
|
||||||
"vue-cropper": "0.5.5",
|
"vue-cropper": "0.5.5",
|
||||||
"vue-meta": "2.4.0",
|
"vue-meta": "2.4.0",
|
||||||
"vuedraggable": "2.24.3",
|
|
||||||
"jquery": "^3.5.1",
|
|
||||||
"panzoom": "^9.4.1",
|
|
||||||
"view-design": "^4.5.0-beta.3",
|
|
||||||
"vue-click-outside": "^1.1.0",
|
|
||||||
"vue-contextmenujs": "^1.3.13",
|
|
||||||
"vue-router": "^3.2.0",
|
"vue-router": "^3.2.0",
|
||||||
|
"vuedraggable": "2.24.3",
|
||||||
"vuex": "^3.4.0"
|
"vuex": "^3.4.0"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@vue/cli-plugin-babel": "4.4.6",
|
"@vue/cli-plugin-babel": "4.4.6",
|
||||||
"@vue/cli-plugin-eslint": "4.4.6",
|
"@vue/cli-plugin-eslint": "4.4.6",
|
||||||
|
"@vue/cli-plugin-router": "~4.5.0",
|
||||||
|
"@vue/cli-plugin-vuex": "~4.5.0",
|
||||||
"@vue/cli-service": "4.4.6",
|
"@vue/cli-service": "4.4.6",
|
||||||
"babel-eslint": "10.1.0",
|
"babel-eslint": "10.1.0",
|
||||||
"babel-plugin-dynamic-import-node": "2.3.3",
|
"babel-plugin-dynamic-import-node": "2.3.3",
|
||||||
|
@ -77,17 +81,15 @@
|
||||||
"connect": "3.6.6",
|
"connect": "3.6.6",
|
||||||
"eslint": "7.15.0",
|
"eslint": "7.15.0",
|
||||||
"eslint-plugin-vue": "7.2.0",
|
"eslint-plugin-vue": "7.2.0",
|
||||||
|
"less": "^3.0.4",
|
||||||
|
"less-loader": "^5.0.0",
|
||||||
"lint-staged": "10.5.3",
|
"lint-staged": "10.5.3",
|
||||||
"runjs": "4.4.2",
|
"runjs": "4.4.2",
|
||||||
"sass": "1.32.13",
|
"sass": "1.32.13",
|
||||||
"sass-loader": "10.1.1",
|
"sass-loader": "10.1.1",
|
||||||
"script-ext-html-webpack-plugin": "2.1.5",
|
"script-ext-html-webpack-plugin": "2.1.5",
|
||||||
"svg-sprite-loader": "5.1.1",
|
"svg-sprite-loader": "5.1.1",
|
||||||
"vue-template-compiler": "2.6.12",
|
"vue-template-compiler": "2.6.12"
|
||||||
"@vue/cli-plugin-router": "~4.5.0",
|
|
||||||
"@vue/cli-plugin-vuex": "~4.5.0",
|
|
||||||
"less": "^3.0.4",
|
|
||||||
"less-loader": "^5.0.0"
|
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=8.9",
|
"node": ">=8.9",
|
||||||
|
|
|
@ -16,7 +16,14 @@ export function getEditionList(id) {
|
||||||
method: 'get'
|
method: 'get'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
//
|
|
||||||
|
// 查询规则详细
|
||||||
|
export function getFindByEditionId(id) {
|
||||||
|
return request({
|
||||||
|
url: '/rule/ruleEdition/findByEditionId/' + id,
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
// 新增规则
|
// 新增规则
|
||||||
export function addRule(data) {
|
export function addRule(data) {
|
||||||
return request({
|
return request({
|
||||||
|
|
|
@ -40,7 +40,11 @@ import DictTag from '@/components/DictTag'
|
||||||
import VueMeta from 'vue-meta'
|
import VueMeta from 'vue-meta'
|
||||||
// 字典数据组件
|
// 字典数据组件
|
||||||
import DictData from '@/components/DictData'
|
import DictData from '@/components/DictData'
|
||||||
|
//codemirror
|
||||||
|
import VueCodemirror from 'vue-codemirror'
|
||||||
|
import 'codemirror/lib/codemirror.css'
|
||||||
|
|
||||||
|
Vue.use(VueCodemirror)
|
||||||
// 全局方法挂载
|
// 全局方法挂载
|
||||||
Vue.prototype.getDicts = getDicts
|
Vue.prototype.getDicts = getDicts
|
||||||
Vue.prototype.getConfigKey = getConfigKey
|
Vue.prototype.getConfigKey = getConfigKey
|
||||||
|
|
|
@ -31,84 +31,7 @@
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
|
|
||||||
<el-row :gutter="10" class="mb8">
|
|
||||||
<!-- <el-col :span="1.5">-->
|
|
||||||
<!-- <el-button-->
|
|
||||||
<!-- type="primary"-->
|
|
||||||
<!-- plain-->
|
|
||||||
<!-- icon="el-icon-plus"-->
|
|
||||||
<!-- size="mini"-->
|
|
||||||
<!-- @click="handleAdd"-->
|
|
||||||
<!-- v-hasPermi="['rule:rule:add']"-->
|
|
||||||
<!-- >新增-->
|
|
||||||
<!-- </el-button>-->
|
|
||||||
<!-- </el-col>-->
|
|
||||||
<!-- <el-col :span="1.5">-->
|
|
||||||
<!-- <el-button-->
|
|
||||||
<!-- type="success"-->
|
|
||||||
<!-- plain-->
|
|
||||||
<!-- icon="el-icon-edit"-->
|
|
||||||
<!-- size="mini"-->
|
|
||||||
<!-- :disabled="single"-->
|
|
||||||
<!-- @click="handleUpdate"-->
|
|
||||||
<!-- v-hasPermi="['rule:rule:edit']"-->
|
|
||||||
<!-- >修改-->
|
|
||||||
<!-- </el-button>-->
|
|
||||||
<!-- </el-col>-->
|
|
||||||
<!-- <el-col :span="1.5">-->
|
|
||||||
<!-- <el-button-->
|
|
||||||
<!-- type="danger"-->
|
|
||||||
<!-- plain-->
|
|
||||||
<!-- icon="el-icon-delete"-->
|
|
||||||
<!-- size="mini"-->
|
|
||||||
<!-- :disabled="multiple"-->
|
|
||||||
<!-- @click="handleDelete"-->
|
|
||||||
<!-- v-hasPermi="['rule:rule:remove']"-->
|
|
||||||
<!-- >删除-->
|
|
||||||
<!-- </el-button>-->
|
|
||||||
<!-- </el-col>-->
|
|
||||||
<!-- <el-col :span="1.5">-->
|
|
||||||
<!-- <el-button-->
|
|
||||||
<!-- type="warning"-->
|
|
||||||
<!-- plain-->
|
|
||||||
<!-- icon="el-icon-download"-->
|
|
||||||
<!-- size="mini"-->
|
|
||||||
<!-- @click="handleExport"-->
|
|
||||||
<!-- v-hasPermi="['rule:rule:export']"-->
|
|
||||||
<!-- >导出-->
|
|
||||||
<!-- </el-button>-->
|
|
||||||
<!-- </el-col>-->
|
|
||||||
<!-- <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>-->
|
|
||||||
</el-row>
|
|
||||||
|
|
||||||
<!-- <el-table v-loading="loading" :data="ruleList" @selection-change="handleSelectionChange">-->
|
|
||||||
<!-- <el-table-column type="selection" width="55" align="center" />-->
|
|
||||||
<!-- <el-table-column label="主键" align="center" prop="id" />-->
|
|
||||||
<!-- <el-table-column label="规则名称" align="center" prop="name" />-->
|
|
||||||
<!-- <el-table-column label="规则类型" align="center" prop="ruleType" />-->
|
|
||||||
<!-- <el-table-column label="是否激活" align="center" prop="isActivate" />-->
|
|
||||||
<!-- <el-table-column label="规则描述" align="center" prop="ruleDesc" />-->
|
|
||||||
<!-- <el-table-column label="规则代码" align="center" prop="ruleCode" />-->
|
|
||||||
<!-- <el-table-column label="操作" align="center" class-name="small-padding fixed-width">-->
|
|
||||||
<!-- <template slot-scope="scope">-->
|
|
||||||
<!-- <el-button-->
|
|
||||||
<!-- size="mini"-->
|
|
||||||
<!-- type="text"-->
|
|
||||||
<!-- icon="el-icon-edit"-->
|
|
||||||
<!-- @click="handleMaintain(scope.row)"-->
|
|
||||||
<!-- v-hasPermi="['rule:rule:remove']"-->
|
|
||||||
<!-- >规则维护</el-button>-->
|
|
||||||
|
|
||||||
<!-- <el-button-->
|
|
||||||
<!-- size="mini"-->
|
|
||||||
<!-- type="text"-->
|
|
||||||
<!-- icon="el-icon-delete"-->
|
|
||||||
<!-- @click="handleDelete(scope.row)"-->
|
|
||||||
<!-- v-hasPermi="['rule:rule:remove']"-->
|
|
||||||
<!-- >删除</el-button>-->
|
|
||||||
<!-- </template>-->
|
|
||||||
<!-- </el-table-column>-->
|
|
||||||
<!-- </el-table>-->
|
|
||||||
|
|
||||||
{{ rule.name }}
|
{{ rule.name }}
|
||||||
<el-descriptions class="margin-top" :column="3" border>
|
<el-descriptions class="margin-top" :column="3" border>
|
||||||
|
@ -202,7 +125,7 @@
|
||||||
size="mini"
|
size="mini"
|
||||||
type="text"
|
type="text"
|
||||||
icon="el-icon-edit"
|
icon="el-icon-edit"
|
||||||
@click="handleUpdate(customer.id)"
|
@click="findByIdVersion(customer.id)"
|
||||||
v-hasPermi="['rule:rule:edit']"
|
v-hasPermi="['rule:rule:edit']"
|
||||||
>规格详情
|
>规格详情
|
||||||
</el-button>
|
</el-button>
|
||||||
|
@ -303,6 +226,7 @@
|
||||||
|
|
||||||
<!-- 添加或修改规则对话框 -->
|
<!-- 添加或修改规则对话框 -->
|
||||||
<el-dialog :title="title" :visible.sync="open" width="80%" append-to-body>
|
<el-dialog :title="title" :visible.sync="open" width="80%" append-to-body>
|
||||||
|
<el-button type="primary" @click="generate">生成版本类</el-button>
|
||||||
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
|
||||||
<el-form-item label="版本类" prop="ruleKind">
|
<el-form-item label="版本类" prop="ruleKind">
|
||||||
<el-input v-model="form.ruleKind" placeholder="请输入版本类"/>
|
<el-input v-model="form.ruleKind" placeholder="请输入版本类"/>
|
||||||
|
@ -328,7 +252,9 @@
|
||||||
<el-form-item label="版本" prop="ruleId">
|
<el-form-item label="版本" prop="ruleId">
|
||||||
<el-input v-model="form.ruleId" disabled placeholder="请输入版本"/>
|
<el-input v-model="form.ruleId" disabled placeholder="请输入版本"/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
<!-- 前台web编写代码-->
|
||||||
|
<codemirror ref="mycode" :value="curCode" :options="cmOptions" class="code">
|
||||||
|
</codemirror>
|
||||||
</el-form>
|
</el-form>
|
||||||
<div slot="footer" class="dialog-footer">
|
<div slot="footer" class="dialog-footer">
|
||||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||||
|
@ -336,7 +262,6 @@
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
|
|
||||||
<!-- 添加或修改规则对话框 -->
|
<!-- 添加或修改规则对话框 -->
|
||||||
<!-- <el-dialog :title="title" :visible.sync="opens" width="80%" append-to-body>-->
|
<!-- <el-dialog :title="title" :visible.sync="opens" width="80%" append-to-body>-->
|
||||||
<!-- <el-form ref="form" :model="form" :rules="rules" label-width="80px">-->
|
<!-- <el-form ref="form" :model="form" :rules="rules" label-width="80px">-->
|
||||||
|
@ -375,17 +300,34 @@
|
||||||
<!-- <el-button @click="cancel">取 消</el-button>-->
|
<!-- <el-button @click="cancel">取 消</el-button>-->
|
||||||
<!-- </div>-->
|
<!-- </div>-->
|
||||||
<!-- </el-dialog>-->
|
<!-- </el-dialog>-->
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {getRule, delRule} from "/src/api/rule/rule";
|
import {getRule, delRule} from "/src/api/rule/rule";
|
||||||
import {getEditionList, addRule, enable, disable, updateRule} from "@/api/rule/ruleEdition";
|
import {getEditionList, addRule, enable, disable, updateRule, getFindByEditionId} from "@/api/rule/ruleEdition";
|
||||||
|
|
||||||
|
|
||||||
|
import {codemirror} from 'vue-codemirror'
|
||||||
|
import "codemirror/theme/ambiance.css"; // 这里引入的是主题样式,根据设置的theme的主题引入,一定要引入!!
|
||||||
|
require("codemirror/mode/javascript/javascript"); // 这里引入的模式的js,根据设置的mode引入,一定要引入!
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "Rule",
|
name: "Rule",
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
|
||||||
|
curCode: '测试',
|
||||||
|
cmOptions: {
|
||||||
|
lineNumbers: true, // 显示行号
|
||||||
|
mode: 'text/x-yaml', // 语法model
|
||||||
|
gutters: ['CodeMirror-lint-markers'], // 语法检查器
|
||||||
|
theme: "ambiance",
|
||||||
|
lint: true, // 开启语法检查
|
||||||
|
},
|
||||||
|
|
||||||
ruleAndEditionList: [],
|
ruleAndEditionList: [],
|
||||||
//版本
|
//版本
|
||||||
ruleAndEdition: {},
|
ruleAndEdition: {},
|
||||||
|
@ -429,6 +371,7 @@ export default {
|
||||||
rule: {},
|
rule: {},
|
||||||
// 表单参数
|
// 表单参数
|
||||||
form: {
|
form: {
|
||||||
|
id: '',
|
||||||
ruleKind: '',
|
ruleKind: '',
|
||||||
name: '',
|
name: '',
|
||||||
ruleCoding: '',
|
ruleCoding: '',
|
||||||
|
@ -468,11 +411,20 @@ export default {
|
||||||
console.log(this.rule)
|
console.log(this.rule)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
//根据ID回显版本
|
||||||
|
findByIdVersion(id) {
|
||||||
|
getFindByEditionId(id).then(res => {
|
||||||
|
this.form = res.data[0]
|
||||||
|
this.open = true;
|
||||||
|
console.log(this.form)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
|
||||||
|
|
||||||
/** 客户状态更改触发 */
|
/** 客户状态更改触发 */
|
||||||
handleStatusChange(row) {
|
handleStatusChange(row) {
|
||||||
console.log(row)
|
console.log(row)
|
||||||
if (row.status === "Y") {
|
if (row.ruleActivate === "Y") {
|
||||||
enable(row.id).then((res) => {
|
enable(row.id).then((res) => {
|
||||||
this.$modal.msgSuccess("启用成功")
|
this.$modal.msgSuccess("启用成功")
|
||||||
this.findList()
|
this.findList()
|
||||||
|
@ -533,7 +485,7 @@ export default {
|
||||||
/** 新增按钮操作 */
|
/** 新增按钮操作 */
|
||||||
handleAdd() {
|
handleAdd() {
|
||||||
this.reset();
|
this.reset();
|
||||||
this.open = true;
|
this.open = true;2
|
||||||
this.form.ruleId = this.ruleAndVersion.id
|
this.form.ruleId = this.ruleAndVersion.id
|
||||||
this.title = "添加规则";
|
this.title = "添加规则";
|
||||||
},
|
},
|
||||||
|
@ -594,6 +546,17 @@ export default {
|
||||||
...this.queryParams
|
...this.queryParams
|
||||||
}, `rule_${new Date().getTime()}.xlsx`)
|
}, `rule_${new Date().getTime()}.xlsx`)
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
|
components: {
|
||||||
|
codemirror
|
||||||
|
},
|
||||||
|
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
<style scoped>
|
||||||
|
.information-box >>> .CodeMirror {
|
||||||
|
font-family: monospace;
|
||||||
|
height: 71vh;
|
||||||
|
direction: ltr;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
Loading…
Reference in New Issue