| | |
| | | <el-form-item prop="SupUnit" label="使用状态" style="margin-right: 20px"> |
| | | <el-select |
| | | v-model="dialogForm.isEnable" |
| | | :popper-append-to-body="false" |
| | | style="width: 220px" |
| | | placeholder="请选择" |
| | | > |
| | | <el-option |
| | | v-for="item in SupUnitArr" |
| | | v-for="item in isEnableArr" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | |
| | | </el-form-item> |
| | | </div> |
| | | <el-form-item label="工艺设置" prop="OrgName"> |
| | | <div style="display: flex;width:100%;overflow-y: scroll"> |
| | | <div class="settingDiv"> |
| | | <!-- 实现工艺设置动态添加--> |
| | | <div v-for="(tag,index) in dynamicTags" :key="tag.id" style="display: flex;"> |
| | | <el-tag |
| | | v-if="flag||tag.label!==flagSelected" |
| | | closable |
| | | :disable-transitions="false" |
| | | style="margin-left: 0;width: 100px;" |
| | | :class="tagClass(tag.label)" |
| | | :effect="tag.effect" |
| | | @close="handleTagClose(tag.label)" |
| | | @click="elTagClick(tag)" |
| | | > |
| | | {{ tag.label }} |
| | | <i class="el-icon-edit" @click="tagEdit(tag)" /> |
| | | </el-tag> |
| | | <div v-for="(tag,index) in dynamicTags" :key="tag.id" style="display: flex;align-items: center"> |
| | | <div style="display: flex;align-items: center;position: relative"> |
| | | |
| | | <el-autocomplete |
| | | v-if="!flag&&tag.label===flagSelected" |
| | | :ref="'saveTagInput'+tag.id" |
| | | v-model="value" |
| | | class="input-new-tag" |
| | | size="small" |
| | | :fetch-suggestions="querySearch" |
| | | style="margin-left: 0px;width: 100px;transform: translate(1)" |
| | | autofocus |
| | | @select="handleSelect" |
| | | @keyup.enter.native="handleInputConfirm2" |
| | | /> |
| | | <!-- @blur="handleBlur2"--> |
| | | |
| | | <div v-if="index!==dynamicTags.length-1" style="width: 40px;">----></div> |
| | | <el-tooltip class="item" effect="dark" :content="tag.label" placement="top"> |
| | | <el-tag |
| | | v-if="flag||tag.label!==flagSelected" |
| | | :closable="index!==0" |
| | | :disable-transitions="false" |
| | | class="elTag" |
| | | :class="tagClass(tag.label)" |
| | | :effect="tag.effect" |
| | | @close="handleTagClose(tag.label)" |
| | | @click="elTagClick(tag)" |
| | | > |
| | | <!-- <div class="orderNumber">{{ index }}</div>--> |
| | | {{ tag.label }} |
| | | <i class="el-icon-edit" @click="tagEdit(tag)" /> |
| | | </el-tag> |
| | | </el-tooltip> |
| | | <el-autocomplete |
| | | v-if="!flag&&tag.label===flagSelected" |
| | | :ref="'saveTagInput'+tag.id" |
| | | v-model="value" |
| | | class="input-new-tag" |
| | | size="small" |
| | | :fetch-suggestions="querySearch" |
| | | style="margin-left: 0;width: 200px;transform: translate(1)" |
| | | autofocus |
| | | @select="handleSelect" |
| | | @keyup.enter.native="handleInputConfirm2" |
| | | /> |
| | | <!-- @blur="handleBlur2"--> |
| | | <div v-if="index!==dynamicTags.length-1" style="width: 40px;height: 1px;border: 1px solid #42b983" /> |
| | | </div> |
| | | </div> |
| | | <!-- :disabled="addDisabled"--> |
| | | <el-button type="primary" style="margin-left: 20px;width: 100px;height: 32px;" size="small" @click="showInput">+ |
| | | 添加 |
| | | </el-button> |
| | | <el-button |
| | | type="success" |
| | | class="tagSuccess" |
| | | size="small" |
| | | icon="el-icon-plus" |
| | | @click="showInput" |
| | | /> |
| | | |
| | | </div> |
| | | </el-form-item> |
| | |
| | | page: 1, // 第几页 |
| | | rows: 10 // 每页多少条 |
| | | }, |
| | | isEnable: [ |
| | | isEnableArr: [ |
| | | { label: '是', value: 'Y' }, |
| | | { label: '否', value: 'N' } |
| | | ], |
| | |
| | | this.flag = !this.flag |
| | | }, |
| | | tagEdit(tag) { |
| | | console.log(tag, 2) |
| | | |
| | | this.addDisabled = true |
| | | this.flagSelect = tag.label |
| | | this.flagSelected = tag.label |
| | | this.value = tag.label |
| | | this.flag = !this.flag |
| | | this.$nextTick(_ => { |
| | |
| | | }) |
| | | }, |
| | | elTagClick(tag) { |
| | | console.log(tag) |
| | | console.log(tag, 1) |
| | | |
| | | this.tagSelectedId = tag.id |
| | | if (tag.effect === 'dark') { |
| | |
| | | } |
| | | this.flag = !this.flag |
| | | this.$nextTick(_ => { |
| | | this.$refs['saveTagInput' + this.dynamicTags.length ][0].focus() |
| | | this.$refs['saveTagInput' + this.dynamicTags.length][0].focus() |
| | | }) |
| | | // this.$nextTick(_ => { |
| | | // console.log(this.$refs['saveTagInput'], 321) |
| | |
| | | line-height: 30px; |
| | | } |
| | | |
| | | ::v-deep .el-input__inner:focus { |
| | | border-color: $main_color; |
| | | } |
| | | |
| | | ::v-deep .el-table .caret-wrapper { |
| | | transform: scale(0.8); |
| | | } |
| | |
| | | margin-bottom: 0; |
| | | } |
| | | |
| | | ::v-deep .el-input__inner:focus { |
| | | border-color: $main_color; |
| | | } |
| | | |
| | | ::v-deep .el-select .el-input__inner:focus { |
| | | border-color: $main_color; |
| | | } |
| | | |
| | | ::v-deep .el-select-dropdown__item.selected { |
| | | color: $main_color; |
| | | } |
| | | |
| | | ::v-deep .el-checkbox__inner:hover { |
| | | border-color: $main_color; |
| | | } |
| | | |
| | | ::v-deep .el-textarea__inner:focus { |
| | | border-color: $main_color; |
| | | } |
| | | |
| | | /* |
| | | 实现工艺设置动态添加样式 |
| | | */ |
| | | |
| | | .orderNumber{ |
| | | |
| | | } |
| | | .el-icon-edit { |
| | | width: 16px; |
| | | height: 16px; |
| | | border-radius: 50%; |
| | | padding: 3px 0 0 3px; |
| | | margin-left: 5px; |
| | | cursor: pointer; |
| | | } |
| | | |
| | | .el-icon-edit:hover { |
| | | background-color: #99a9bf; |
| | | color: #FFFFFF; |
| | | } |
| | | |
| | | .el-tag--dark { |
| | | background-color: $main_color; |
| | | border-color: $main_color; |
| | | } |
| | | |
| | | .tagSuccess { |
| | | margin-left: 20px; |
| | | width: 100px; |
| | | height: 32px; |
| | | display: flex; |
| | | justify-content: center; |
| | | color: $main_color; |
| | | } |
| | | |
| | | ::v-deep .el-tag__close { |
| | | padding: 1px 0 0 1px !important; |
| | | } |
| | | ::v-deep .el-tag__close:hover { |
| | | background-color: #99a9bf; |
| | | } |
| | | |
| | | ::v-deep .el-button--success { |
| | | width: 40px !important; |
| | | background-color: #ecf5ff; |
| | | border-radius: 0; |
| | | color: $main_color; |
| | | } |
| | | |
| | | ::v-deep .el-tag { |
| | | //height: 30px; |
| | | border-radius: 0; |
| | | } |
| | | |
| | | ::v-deep .el-input--small .el-input__inner { |
| | | border-radius: 0; |
| | | } |
| | | |
| | | .settingDiv { |
| | | display: flex; |
| | | width: 100%; |
| | | height: 40px; |
| | | overflow-y: scroll; |
| | | align-items: center; |
| | | } |
| | | |
| | | .elTag { |
| | | margin-left: 0; |
| | | width: 100px; |
| | | position: relative; |
| | | } |
| | | |
| | | </style> |